global $xoopsUser;
if( $xoopsUser )
{
$pm_handler =& xoops_gethandler('privmessage');
$criteria = new CriteriaCompo(new Criteria('read_msg', 0));
$criteria->add(new Criteria('to_userid', $xoopsUser->getVar('uid')));
$pm = $pm_handler->getCount($criteria);
}
if( $pm )
{
echo "<a href="/viewpmsg.php" title="Read your new Private Messages">Private Messages ($pm)</a>n";
}
else
{
echo "No new Private Messagesn";
}
|
Re: using inbox waring global
This doesnt work for me...
It displays the "Inbox" fine but doesn't pick up there is new messages.
I tried just
<a class="highlight" href="<{$xoops_url}>/viewpmsg.php">Inbox (<span style="color:#ff0000; font-weight: bold;"><{$msgcount}></span>)</a>
and it showed "Inbox (0)" even though i had one...?
Edit: wait im using the ipb module it edits core files... ah now what?!