Yeah my first hack for vb2.2.7 but then again its compatible with vb2.2.6 as well tested on both
What does this hack do? Just as the title states it calculates the total time online for each user
Configurable::
The time limit before a user is considered inactive is configurable and is included in the install txt file... so if you want a user to be defined as inactive after 3 minutes then there'll be a variable in the script to limit that configure that
Also Configurable is the amount of users to show per page on the leader time online board That is also configurable in the timeonline.php included with the zip...
Features ::
Includes both viewable on the postbit and getinfo templates...
Includes a leader board for the top users time online
What to do? ::
Queries to Run (1)
File Modification (5)
Template Modificatiion (2)
Templates to Add (3)
Files to Upload (1) :: [ timeonline.php ] (forum directory)
It's an easy hack to install (took me a little time to configure) but it looks great imo... probably a hack that will use and that i can see every forum having... why not right Enjoy yet another release... And if you like this hack i would be greatful if you could click install thanks...
Note ::
If for some odd reason you get a division by zero error
find:
PHP Code:
$daysreg = floor((time() - $lead[2]) / 86400);
$daysreg = iif($daysreg == 0,'1','$daysreg'); // checking to see if not registered for more then a day to prevent division by zero
$dotimeperday = floor($lead[3] / $daysreg);
replace with:
PHP Code:
$daysregs = floor((time() - $lead[2]) / 86400);
if($daysregs == 0) { // checking to see if not registered for more then a day to prevent division by zero
$daysreg = 1;
} else {
$daysreg = $daysregs;
}
$dotimeperday = floor($lead[3] / $daysreg);
g-force2k2
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
i really can't see any problems at the moment PsYc... just so you know it doesn't calculate every second the user is online... its probably as close as you can get to the real time that they're online... it doesn't tally each second by second... it does use sessions to keep track of the time online... i don't know if that helps you in your explanation... but i will still be looking for a fix for the reloading issue... regards...
well like it was stated it only counts the time online in a new session... hence another user's time won't be counted unless they complete a new session... and it keeps track by the modifiable timeout code that i created for the admin/sessions.php if you were to count every single second it would probably require enourmous amounts of sqls... here it works when they have a new session within a certain amount of time(time out time) they will recieve that time... it may not be perfect... but it is extremely close regards... and sorry for all the troubles... but it does work no
Originally posted by g-force2k2 btw Psyc and Minifreunde does the time of the other users just not go up? or just not go up untill you revisit via another session? regards i will try to sort everything out... regards...
g-force2k2
Yeah the time goes up in a session. But the fact with the lost connection is still there.
The Links are permanetly down. Even the Backlink to my index.php (main-forumpage) is down too.
I made the changes in the second post (with the zero error) and thats all. All other changes i made was in youre manual... :bored: