1
shashi_bi
unread messages in newbb module?
  • 2007/2/17 15:36

  • shashi_bi

  • Just popping in

  • Posts: 28

  • Since: 2006/4/24


Hi

how can i get the unread messages of the user.i want to add a block in home page, in that i want to display the unread messages of logged in user.(user based unread messages), any one please give me the idea or query,any help would be appreciated.


thanks
bsk

2
Sublime
Re: unread messages in newbb module?
  • 2007/2/17 18:49

  • Sublime

  • Just popping in

  • Posts: 99

  • Since: 2006/5/23


hhttps://xoops.org/modules/smartfaq/faq.php?faqid=377

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 
"/viewpmsg.php" title="Read your new Private Messages">Private Messages ($pm)n";
}
else
{
  echo 
"No new Private Messagesn";
}

3
_Raquel
Re: unread messages in newbb module?
  • 2007/2/18 3:20

  • _Raquel

  • Just popping in

  • Posts: 1

  • Since: 2007/2/18


Thanks for this solution. I was looking for it too.

Login

Who's Online

243 user(s) are online (135 user(s) are browsing Support Forums)


Members: 0


Guests: 243


more...

Donat-O-Meter

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

Latest GitHub Commits