1
jcoulter
Themes and the Inbox
  • 2005/6/11 17:32

  • jcoulter

  • Just popping in

  • Posts: 21

  • Since: 2005/5/18


I would like to add to my theme a message to indicate a member has new PM. I want to check to see if there is new mail and display the simple message "New Mail Waiting". Can do? How?

Thanks!
JoN

2
coops
Re: Themes and the Inbox
  • 2005/7/25 0:13

  • coops

  • Just popping in

  • Posts: 82

  • Since: 2005/6/15


It's in the FAQ

3
xgarb
Re: Themes and the Inbox
  • 2005/7/31 14:18

  • xgarb

  • Not too shy to talk

  • Posts: 154

  • Since: 2003/3/30


<{php}>
GLOBAL $xoopsUser;
$pm_handler =& xoops_gethandler('privmessage');
$uid = $xoopsUser->getVar('uid');
$criteria = new CriteriaCompo(new Criteria('read_msg', 0));
$criteria->add(new Criteria('to_userid', $uid));
$msgcount = $pm_handler->getCount($criteria);
$GLOBALS['xoopsTpl']->assign('msgcount', $msgcount);
<{/php}>


<{if $msgcount > 0}>

<{else}>

<{/if}>

4
shank
Re: Themes and the Inbox
  • 2005/8/25 22:53

  • shank

  • Not too shy to talk

  • Posts: 144

  • Since: 2004/8/17


Quote:

coops wrote:
It's in the FAQ
That doesn't tell you how to put it in your theme though.

Quote:

xgarb wrote:
<{php}>
GLOBAL $xoopsUser;
$pm_handler =& xoops_gethandler('privmessage');
$uid = $xoopsUser->getVar('uid');
$criteria = new CriteriaCompo(new Criteria('read_msg', 0));
$criteria->add(new Criteria('to_userid', $uid));
$msgcount = $pm_handler->getCount($criteria);
$GLOBALS['xoopsTpl']->assign('msgcount', $msgcount);
<{/php}>


<{if $msgcount > 0}>

<{else}>

<{/if}>
This will work too, but I suggest DOING IT THIS WAY!
s l s h a n k l e @ b e l l s o u t h . n e t

5
LazyBadger
Re: Themes and the Inbox

Smarty-way is definitely nicer way... Thanks, added to bookmarks
Quis custodiet ipsos custodes?

Webmaster of
XOOPS2.RU
XOOPS Modules Proving Ground
XOOPS Themes Exhibition

Login

Who's Online

992 user(s) are online (66 user(s) are browsing Support Forums)


Members: 0


Guests: 992


more...

Donat-O-Meter

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

Latest GitHub Commits