Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
Register FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 04-21-2009, 06:55 PM
FractalizeR's Avatar
FractalizeR FractalizeR is offline
 
Join Date: Oct 2005
Location: Russia, Moscow
Posts: 368
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Check if the forum is read in notifications_list hook

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?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:11 PM.


Powered by vBulletin® Version 3.9.0
Copyright ©2000 - 2017, vBulletin Solutions Inc.