| 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}> <a href="<{$xoops_url}>/viewpmsg.php"><img src="<{$xoops_imageurl}>images/prvmsg_on.jpg" alt=You have <{$msgcount}> new message border="0" /></a> <{else}> <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. |