1
kings
Inbox Notification
  • 2007/10/10 14:53

  • kings

  • Just popping in

  • Posts: 5

  • Since: 2007/4/21


I have a title bar with inbox in there, my problem is at the moment it does not let you know if there is a pm in your inbox. I was wondering how to change it so that it shows up that there is a message waiting like in the user menu. I have turned the user menu off and cannot find where the block content for the user menu is to get the code. Can someone tell me where i can find it or just tell me the code for it?

Thanks

2
stuie200
Re: Inbox Notification
  • 2007/10/10 15:14

  • stuie200

  • Friend of XOOPS

  • Posts: 161

  • Since: 2004/1/4 2


Hi,

I presume the title bar as you call it is in your theme. If it is, directly after your link to your inbox place the following code. Include everything between the dotted lines.

---------------------------------------

<{php}>
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 "($pm)\n";
}
<{/php}>

--------------------------------------------

This will simply display the number of new messages in your inbox (logged on user that is) after your link to the inbox in question.

Example: INBOX (2)

Regards

Stuart
"I'm as confused as a baby in a topless bar."

Login

Who's Online

158 user(s) are online (103 user(s) are browsing Support Forums)


Members: 0


Guests: 158


more...

Donat-O-Meter

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

Latest GitHub Commits