4
so, i've got the point, but not the whole.
to make indication of a new incoming message:
system_blocks.php user section should look like this:
========
function b_system_user_show()
{
global $xoopsUser;
if (is_object($xoopsUser)) {
$pm_handler =& xoops_gethandler('privmessage');
$block = array();
$block['lang_youraccount'] = _MB_SYSTEM_VACNT;
$block['lang_editaccount'] = _MB_SYSTEM_EACNT;
$block['lang_notifications'] = _MB_SYSTEM_NOTIF;
$block['lang_logout'] = _MB_SYSTEM_LOUT;
$block['lang_adminmenu'] = _MB_SYSTEM_ADMENU;
$block['admin'] = $xoopsUser->isAdmin(0);
$criteria = new CriteriaCompo(new Criteria('read_msg', 0));
$criteria->add(new Criteria('to_userid', $xoopsUser->getVar('uid')));
$block['new_messages'] = $pm_handler->getCount($criteria)-1;
return $block;
}
return false;
}
=========
system_block_user.html make changes like
<{if $block.new_messages > 0}>
<a class="highlight" href="<{$xoops_url}>/viewpmsg.php">Inbox (<span style="color:#ff0000; font-weight: bold;"><{$block.new_messages}></span>)</a>
<{else}>
<a href="<{$xoops_url}>/viewpmsg.php">Inbox</a>
<{/if}>
But this does not solve the problem, because in XOOPS 2.2 there are problem with read/unread messages.
where's my red bull!