1
Kainaij
What are my inbox options?
  • 2005/3/7 2:37

  • Kainaij

  • Quite a regular

  • Posts: 256

  • Since: 2004/10/5


I am in the process of ridding my site of the "Main Menu" and "User Menu" blocks. I am in the beginning stages of implementing a DHTML drop down menu that I am quite pleased with. My problem is that I NEED the user menu because it is the only way my site users can tell if they have new PM's.

What are my options on PM notification?

2
Beejay
Re: What are my inbox options?
  • 2005/3/7 7:15

  • Beejay

  • Quite a regular

  • Posts: 232

  • Since: 2004/6/5 2


You could use this code in a php block. It shows if a user has a new pm:

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

3
Kainaij
Re: What are my inbox options?
  • 2005/3/7 8:04

  • Kainaij

  • Quite a regular

  • Posts: 256

  • Since: 2004/10/5


Nope, didn't work. No text is showing either way in a Custom PHP Block.

Thanks for the start tho.

4
Kainaij
Re: What are my inbox options?
  • 2005/3/7 8:19

  • Kainaij

  • Quite a regular

  • Posts: 256

  • Since: 2004/10/5


Got it fixed now. Eerily I found the hack on the website. copied the text from there and it worked?!?

Hack was here.

5
Kainaij
Re: What are my inbox options?
  • 2005/3/7 8:40

  • Kainaij

  • Quite a regular

  • Posts: 256

  • Since: 2004/10/5


I do not know PHP well, so how can I color the text to make it stand out a bit more?

Login

Who's Online

370 user(s) are online (308 user(s) are browsing Support Forums)


Members: 0


Guests: 370


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