Hello.
I am trying to check if the specified forum is read in notifications_list hook (to check if user has read forum news). I wrote the following code:
require_once(DIR.'/includes/functions_forumlist.php');
PHP Code:
$fr_forumid = 319;
$fr_foruminfo = fetch_foruminfo($fr_forumid);
$fr_lastpostinfo = $vbulletin->forumcache["$lastpostarray[$fr_forumid]"];
$notifications['fr_unread_forum_news'] = array(
'phrase' => $vbphrase['fr_unread_forum_news'],
'link' => 'http://www.gsmforum.ru/forumdisplay.php?f=319',
'order' => 100
);
$vbulletin->userinfo['fr_unread_forum_news'] = 0;
if(fetch_forum_lightbulb($fr_forumid, $lastpostinfo, $fr_foruminfo)=='new') {
$vbulletin->userinfo['fr_unread_forum_news'] = 1;
}
devdebug('TTTTT: '.fetch_forum_lightbulb($fr_forumid, $fr_lastpostinfo, $fr_foruminfo));
But it always says, that the forum IS read (fetch_forum_lightbulb() returns old every time).
Can you please tell me what is wrong?