Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
0 + 4 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     

Re: Display number of new pm
by Watdehek on 2005/4/25 21:46:55

Is there anybody that can help me with this?
Re: Display number of new pm
by Watdehek on 2005/2/23 10:34:30

When I use your code in my theme.html I get a blank page. Maybe because I'm running Protector? There is nothing in my Protector log BTW.
Re: Display number of new pm
by brash on 2005/2/22 6:16:48

Yep, works a treat . I'll try and find some time tonight to tidy this up and put the PHP in an smarty insert plugin so you don't have PHP in your theme.html file. No functional difference, I just like to keep my logic seperated .
Re: Display number of new pm
by stefan88 on 2005/2/22 6:06:45

I'm using this in my theme file:
le="color: #000000"><?php <{if $xoops_isuser}> <{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}> &nbsp;<a href="<{$xoops_url}>/viewpmsg.php"><img src="<{$xoops_imageurl}>images/prvmsg_on.jpg" alt=You&nbsp;have&nbsp;<{$msgcount}>&nbsp;new&nbsp;message border="0" /></a> <{else}> &nbsp;<a href="<{$xoops_url}>/viewpmsg.php"><img src="<{$xoops_imageurl}>images/prvmsg_off.jpg" alt="You have no new messages" border="0" /></a> <{/if}>

Big thanks to all, that helped me with that...
hope it helps to you too
Re: Display number of new pm
by jdseymour on 2005/2/22 5:24:37

Check your protector, I tried something similar today and it blocked it.

Who's Online

233 user(s) are online (181 user(s) are browsing Support Forums)


Members: 0


Guests: 233


more...

Donat-O-Meter

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

Latest GitHub Commits