11
V6-Maniac
Re: how do you set theme ?
  • 2006/2/8 22:38

  • V6-Maniac

  • Just popping in

  • Posts: 86

  • Since: 2005/2/15


Quote:

RoMeO wrote:
@V6-Maniac
thank you veryyy much :))

its working !!


Your welcome...!

12
V6-Maniac
Re: how do you set theme ?
  • 2006/2/8 23:01

  • V6-Maniac

  • Just popping in

  • Posts: 86

  • Since: 2005/2/15


Quote:

RoMeO wrote:
@V6-Maniac
thank you veryyy much :))

its working !!


:: OFFTOPIC - MODE::
I saw your registration later on.
And looked in your profile.
Seems you live in a place that my XOOPS thinks it is an #oops# word. LoL
And althougt i have installed Xlanguage the static info issn't translated yet.
Aren't you queries where it is about...


:: ONTOPIC - MODE::

13
RoMeO
Re: how do you set theme ?
  • 2006/2/8 23:21

  • RoMeO

  • Just popping in

  • Posts: 34

  • Since: 2005/8/27




your site is beatifull..
how to do this option? can you tell me ?
Resized Image

14
V6-Maniac
Re: how do you set theme ?
  • 2006/2/8 23:32

  • V6-Maniac

  • Just popping in

  • Posts: 86

  • Since: 2005/2/15


Hack made by Shank... so al the credits go to him.

Save this code as insert.pms.php in the class/smarty/plugins/ folder

<?
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);
}
?>


and in your theme.html this code wherever you want the alert to show.

<{insert name="pms"}>
<
a href="<{$xoops_url}>/viewpmsg.php">
<{if 
$msgcount 0}>
<{if 
$msgcount 1}>You Have <{$msgcount}> New Messages
<{else}>You have <{$msgcount}> New Message
<{/if}>
<{else}>Private 
Messages
<{/if}></a>

15
RoMeO
Re: how do you set theme ?
  • 2006/2/9 14:41

  • RoMeO

  • Just popping in

  • Posts: 34

  • Since: 2005/8/27


thank you @V6-Maniac i will try

16
shank
Re: how do you set theme ?
  • 2006/2/9 18:39

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


<offtopic>

Looks like that thing is getting more use than I thought it was.

I made a new one that will show a pop up on new messages if your interested.

one thing though...

Quote:

V6-Maniac wrote:
and in your theme.html this code wherever you want the alert to show.

<{insert name="pms"}>
<
a href="<{$xoops_url}>/viewpmsg.php">
<{if 
$msgcount 0}>
<{if 
$msgcount 1}>You Have <{$msgcount}> New Messages
<{else}>You have <{$msgcount}> New Message
<{/if}>
<{else}>Private 
Messages
<{/if}></a>


this should be wraped in if $xoops_isuser like so:

<{if $xoops_isuser}><{insert name="pms"}>
<
a href="<{$xoops_url}>/viewpmsg.php">
<{if 
$msgcount 0}>
<{if 
$msgcount 1}>You Have <{$msgcount}> New Messages
<{else}>You have <{$msgcount}> New Message
<{/if}>
<{else}>Private 
Messages
<{/if}></a><{/if}>


or you'll probably get errors

</offtopic>
s l s h a n k l e @ b e l l s o u t h . n e t

17
V6-Maniac
Re: how do you set theme ?
  • 2006/2/9 22:22

  • V6-Maniac

  • Just popping in

  • Posts: 86

  • Since: 2005/2/15


I use this scropt for 2 months now.
And already used the "if user" command.
If no user it wil simple say "login - Register"
But still thank for the tip.
Quote:

shank wrote:
<offtopic>

Looks like that thing is getting more use than I thought it was.

I made a new one that will show a pop up on new messages if your interested.

one thing though...

Quote:

V6-Maniac wrote:
and in your theme.html this code wherever you want the alert to show.

<{insert name="pms"}>
<
a href="<{$xoops_url}>/viewpmsg.php">
<{if 
$msgcount 0}>
<{if 
$msgcount 1}>You Have <{$msgcount}> New Messages
<{else}>You have <{$msgcount}> New Message
<{/if}>
<{else}>Private 
Messages
<{/if}></a>


this should be wraped in if $xoops_isuser like so:

<{if $xoops_isuser}><{insert name="pms"}>
<
a href="<{$xoops_url}>/viewpmsg.php">
<{if 
$msgcount 0}>
<{if 
$msgcount 1}>You Have <{$msgcount}> New Messages
<{else}>You have <{$msgcount}> New Message
<{/if}>
<{else}>Private 
Messages
<{/if}></a><{/if}>


or you'll probably get errors

</offtopic>

18
shank
Re: how do you set theme ?
  • 2006/2/10 15:45

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


I could tell you had it right, I was just specifying that for anyone who reads this and trys it. When you were telling RoMeo how to do it you didn't specify that and if it is not wrapped it errors.

Anytime you tell someone how to do this make sure and tell them the code has to be inside the if user clause. At least the insert part of the code does.

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

Login

Who's Online

186 user(s) are online (124 user(s) are browsing Support Forums)


Members: 0


Guests: 186


more...

Donat-O-Meter

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

Latest GitHub Commits