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?


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

  • stuie200

  • Friend of XOOPS

  • Posts: 161

  • Since: 2004/1/4 2


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.


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";


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)


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


Who's Online

69 user(s) are online (43 user(s) are browsing Support Forums)

Members: 0

Guests: 69



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