The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
adding users to my "currently active users" list
i just got back into vbulletin
now i am currently working on a mod basically, i want this mod to select 50 random users from the DB, and add them to the "currently active users" list so that people visiting my forum see that its busy. i wrote some code, but so far, its not populating the "currently active users" list on the homepage, but it is showing them in the online.php page. heres my code: Code:
mysql_query("insert into `session` (`sessionhash`, `userid`, `lastactivity`) values ('".md5(uniqid(microtime(), true))."', '$fuid', '".time()."')") or die(mysql_error()); what am i missing? |
#2
|
|||
|
|||
I can't see what's wrong. Maybe try temporarily editing forum.php like this:
Code:
if (fetch_online_status($loggedin) OR 1) { $numbervisible++; $activeusers[] = $loggedin; } to see if the problem is with fetch_online_status() or before that. |
#3
|
|||
|
|||
it selects all results from the `session` table and ignores other filters that are done by the rest of the code.
and it worked PERFECTLY. thank you kh99! |
#4
|
|||
|
|||
Quote:
You're welcome - but it was only meant to be a test to see if something in fetch_online_status() was the problem. Looks like it is. Looking at that code, if lastvisit == lastactivity then it will return false, but if you're setting lastactivity in the session table then I don't know why it would be. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|