1
Hi Folks,
I'm replacing my usermenu with one of my tinycontent menus. I'm using this code for inboxes, and am wondering if I can display the notification link only if there are new notifications as well.
<{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}>
**** Code from menu block ***
<{if $msgcount > 0}>
<{/if}>
**** End ****
What I would like is a conditional link like this for notifications. Anybody have a snippet laying around for this?
Thanks for your time!
Todd