3
Quote:
I wonder why this function only works inside the user menu???
Anyone???
Please fill me in.
the reason is that a function is called. 'function b_system_user_show'. for that block when it is displayed.
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['uid'] = $xoopsUser->getVar('uid');
$block['lang_logout'] = _MB_SYSTEM_LOUT;
$criteria = new CriteriaCompo(new Criteria('read_msg', 0));
$criteria->add(new Criteria('to_userid', $xoopsUser->getVar('uid')));
$block['new_messages'] = $pm_handler->getCount($criteria);
$block['lang_inbox'] = _MB_SYSTEM_INBOX;
$block['lang_adminmenu'] = _MB_SYSTEM_ADMENU;
return $block;
}
return false;
}
and that function specifies what values are in the $block array. i can only tell you why it doesnt work.. i havent tried making it work outside of the block yet. . Good Luck.
CBB / LatestNews / Publisher / XM-Spotlight
(ノ◕ヮ◕)ノ*:・゚✧