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.
Originally posted by g-force2k2 hmm... i'll look into both issues...
Minifreunde make sure that you made the fix on the earlier posts... the links nextpage and the others i forgot to end with </a> could be a problem it was fixed but perhaps you downloaded before hand... regards...
g-force2k2
Hello G!
I downloadet the latest of youre versions, and here is the Link correct (the </a> appears). Ive done anything the manual says, believe me...
And the problem PsYc speaks of, about the metarefresh i get too...my page reloads not....i must reload it with the Refrehbutton of the Browser...
This Hack is great, but this Problems are bad for me...
Minifreunde i will look into it now... as for the metafresh i don't really know... but is it a problem? unless you're sitting their under the timonline.php seeing each user's time go up then its really only their for displaying the time leaders...
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...
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...
yes the time of other go up, but i remember it went up if i reloaded the page before or in the postbit when they are online, but for now it only shows in a new session like you mentioned above
edit: and i only see my time increasing by sec and so on in postbit and on the timeonline.php