Quote:
Originally Posted by BirdOPrey5
Do you know what is in ['forumread'] ? Is it a date?
|
I think it's a date that comes out of the table "forumread" (the readtime column).
Did you try using "$forum = $vbulletin->forumcache["$forumid"];"? Maybe the forumcache is already set up with that info. If not, it looks like the user-specific info is added by the function cache_ordered_forums in includes/function.php, so maybe you could call that with a 1 for the first parameter. Like
Code:
// cache_ordered_forums(1); // uncomment this if it doesn't work without it
$forum = $vbulletin->forumcache["$forumid"];
Then use $forum as the 3rd param to fetch_forum_lightbulb.
If I had time I'd try it out on my test site, but I don't right now.
ETA: Now that I'm more awake...if you just want the forumread field you might be able to do something like:
Code:
$forum = $vbulletin->db->query_first("SELECT readtime from ".TABLE_PREFIX."forumread AS forumread
WHERE userid =".$vbulletin->userinfo['userid']."
AND forumid=".$forumid);
$forum['forumid'] = $forumid;
Although it would probably be more efficient to check if the info is already being filled in.