2
Hi limecity
Edit your theme.html and add :
<{if $xoops_isuser}>
<{php}>
GLOBAL $xoopsUser;
$pm_handler =& xoops_gethandler('privmessage');
$uid = $xoopsUser->getVar('uid');
$last_login = $xoopsUser->getVar('last_login');
if (!empty($last_login)) {
$GLOBALS['xoopsTpl']->assign('last_login', formatTimestamp($last_login,'m'));
}
$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}>
Hello <a href="<{$xoops_url}>/user.php"><{$xoops_uname}>a>, Your Last Login: <{$last_login}>
<{if $msgcount > 0}>
<a class="highlight" href="<{$xoops_url}>/viewpmsg.php">, You have <span style="color:#ff0000; font-weight: bold;"><{$msgcount}>span> Messagea>
<{/if}>
<{/if}>