81
shank
Re: Include a block in a theme
  • 2005/8/26 3:10

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


It works in 2.0.13.1

I wil install 2.2.2on my local tomorrow and see if I can figure it out.


Stay tuned.
s l s h a n k l e @ b e l l s o u t h . n e t



82
shank
Re: how to set global smarty variable for a whole module
  • 2005/8/26 2:12

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


Can you say what you are trying to assign to what varible?
s l s h a n k l e @ b e l l s o u t h . n e t



83
shank
Re: Themes and the Inbox
  • 2005/8/25 22:53

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


Quote:

coops wrote:
It's in the FAQ
That doesn't tell you how to put it in your theme though.

Quote:

xgarb wrote:
<{php}>
GLOBAL $xoopsUser;
$pm_handler =& xoops_gethandler('privmessage');
$uid = $xoopsUser->getVar('uid');
$criteria = new CriteriaCompo(new Criteria('read_msg', 0));
$criteria->add(new Criteria('to_userid', $uid));
$msgcount = $pm_handler->getCount($criteria);
$GLOBALS['xoopsTpl']->assign('msgcount', $msgcount);
<{/php}>


<{if $msgcount > 0}>
<a href="<{$xoops_url}>/viewpmsg.php"><img src="<{$xoops_imageurl}>/email.gif" title="You have <{$msgcount}> new PMs" width="22" height="22" /></a>
<{else}>
<a href="<{$xoops_url}>/viewpmsg.php"><img src="<{$xoops_imageurl}>/noemail.gif" title="You have no new PMs" width="22" height="22" /></a>
<{/if}>
This will work too, but I suggest DOING IT THIS WAY!
s l s h a n k l e @ b e l l s o u t h . n e t



84
shank
Re: Include a block in a theme
  • 2005/8/25 22:11

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


Quote:

LazyBadger wrote:
No problem with embedding any block, main problem is transparent I18n'ion of included parts


What is "I18n'ion"?

Stefan,

You could create a file in the class/smarty/plugins/ folder called insert.messages.php with this in it
<?
function 
smarty_insert_pms()
{
GLOBAL 
$xoopsUser;
$pm_handler =& xoops_gethandler('privmessage');
$uid $xoopsUser->getVar('uid');
$criteria = new CriteriaCompo(new Criteria('read_msg'0));
$criteria->add(new Criteria('to_userid'$uid));
$msgcount $pm_handler->getCount($criteria);
$GLOBALS['xoopsTpl']->assign('msgcount'$msgcount);
}
?>


Then erase your <!--php stuff and put in instead <{insert name="messages"}>

That would clean it up a bit.

Also, since the link is the same regardless of new messages or not and only the img, and/or alt text changes, you could put the if statement around the img tags, instead of the anchor tags, and get rid of one of those.

Like this
&nbsp;<a href="<{$xoops_url}>/viewpmsg.php">
<{if 
$msgcount 0}>
<
img src="<{$xoops_imageurl}>images/prvmsg_on.jpg" alt=You&nbsp;have&nbsp;<{$msgcount}>
&
nbsp;new&nbsp;message border="0" />
<{else}>
<
img src="<{$xoops_imageurl}>images/prvmsg_off.jpg"
 
alt="You have no new messages" border="0" /> 
<{/if}></
a>


If you want it to be gramatically correct you could add anouther if statement so that if $msgcount > 1 it says messages with an s.

That is what I did anyway.

Have fun,

Steve
s l s h a n k l e @ b e l l s o u t h . n e t



85
shank
Re: Block is making me nutz
  • 2005/8/25 15:19

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


My guess is you aren't setting the group permissions for it from System->Groups->modify page.

I am probably wrong though, but other than that I can't think of anyreason it wouldn't show for the people you want it to show for.
s l s h a n k l e @ b e l l s o u t h . n e t



86
shank
Re: Block is making me nutz
  • 2005/8/25 2:34

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


Are you putting it in an existing block, or a custom block of its own?
s l s h a n k l e @ b e l l s o u t h . n e t



87
shank
Re: help to add login & password box, top right beside site logo
  • 2005/8/24 21:14

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


Change

<td width="200" align="center">........Along With Everthing between these tags.........</td>


to
<td width="200" align="center"><{if $xoops_isuser}>
    
    <{if 
$xoops_isadmin}>
    <
a href="<{$xoops_url}>/user.php">View/Edit Your Profile</a><br />
    <
a href="<{$xoops_url}>/user.php?op=logout">Log Out</a><br />
    <
a href="<{$xoops_url}>/admin.php">Administration Menu</a><br />
    <{else}>
    <
a href="<{$xoops_url}>/user.php">View/Edit Your Profile</a><br />
    <
a href="<{$xoops_url}>/user.php?op=logout">Log Out</a><br />
    <{/if}>
<{else}>
<
form style="margin-top: 0px;" action="<{$xoops_url}>/user.php" method="post">
Username:<input type="text" name="uname" size="12" value="" maxlength="25" /><br />
Password:<input type="password" name="pass" size="12" maxlength="32" /><br />
<
input type="hidden" name="xoops_redirect" value="<{$xoops_requesturi}>" />
<
input type="hidden" name="PHPSESSID" value="" /><input type="hidden" name="op" value="login" />
<
input type="submit" value="Login" /></form>
<
a href="<{$xoops_url}>/user.php#lost">Lost Password?</a>
&
nbsp;&nbsp;&nbsp;&nbsp;
<
a href="<{$xoops_url}>/register.php">Register Now!</a>
<{/if}></
td>


See if that works.
s l s h a n k l e @ b e l l s o u t h . n e t



88
shank
Re: help to add login & password box, top right beside site logo
  • 2005/8/17 3:21

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


It is simple html code. All you have to know is the targets and stuff, and where to put it is all. There would be no possible why to put scrrenshots, and code for every possible thing to do with html, much less everything people wanted to do.

I personally like doing it, so if you need anymore help send me a email and I'll see what I can do.
s l s h a n k l e @ b e l l s o u t h . n e t



89
shank
Re: help to add login & password box, top right beside site logo
  • 2005/8/16 20:55

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


In your theme.html file after the second < tr> tag after the < body > tag you have a < td> with your logoin it. Set this < td> to a width of 560. then add another < td> by pasting this
<td width="200" align="center"><form style="margin-top: 0px;" action="<{$xoops_url}>/user.php" method="post"><input type="hidden" name="PHPSESSID" value="6494a0b00b340ce50b50fbd541ccd1dc" />Username : <input type="text" name="uname" size="12" value="" maxlength="25" /><br />Password :  <input type="password" name="pass" size="12" maxlength="32" /><br />
    
    <
input type="hidden" name="xoops_redirect" value="/" />
    <
input type="hidden" name="op" value="login" />
    <
input type="submit" value="User Login" /><br />
    
</
form><a href="<{$xoops_url}>/user.php#lost">Lost Password?</a></br>
<
a href="<{$xoops_url}>/register.php">Register now!</a>
</
td>
And try it out before you get rid of your log in block. Let me know if you have troubles.
s l s h a n k l e @ b e l l s o u t h . n e t



90
shank
Re: help to add login & password box, top right beside site logo
  • 2005/8/16 20:15

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


Something like this:

Resized Image
s l s h a n k l e @ b e l l s o u t h . n e t




TopTop
« 1 ... 6 7 8 (9) 10 11 12 ... 15 »



Login

Who's Online

172 user(s) are online (104 user(s) are browsing Support Forums)


Members: 0


Guests: 172


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits