7
Save this code as insert.pms.php in the class/smarty/plugins/ folder
le="color: #000000"><?php <? function smarty_insert_pms() { 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); } ?>
and in your theme place this code wherever you want thealert to show
le="color: #000000"><?php <{insert name="pms"}> <a href="<{$xoops_url}>/viewpmsg.php"> <{if $msgcount > 0}> <{if $msgcount > 1}>You Have <{$msgcount}> New Messages <{else}>You have <{$msgcount}> New Message <{/if}> <{else}>Private Messages <{/if}></a>
s l s h a n k l e @ b e l l s o u t h . n e t