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 Minifreunde Hello G-Force!!
First Thankx for this great Hack. But theres a Problem with it.
Everytime i try to use the "next" Link in the Navigation of the "timeonline" i get a blank page. When i use the reload-Button the site is there. After this it works for 2-3 Klicks and then i get a white page. The same if i use the backlink in the "Forum-Navigation"....
I promised i make all youre Instruction says and i don?t see any error in my installation. Ok, i get that "zero-error" and make youre fix from Post #2. It works, but the Nav-Problem is a Problem...
Please help!
Heh, and I thought it was just me. Yep, same thing is happening here. At random times, you click on something and it returns a blank page- refresh, and you can see the page again G-Force, have you had time to look into this yet? Although this hack has provided its share of challenges, (probably the most I?ve had to deal with yet), it?s still one of the best ones I?ve seen. Any solutions to this strange anomaly would be appreciated.
I?m running 2.2.7. It?s weird. I checked the page source, and squat! No partial headers, no nothing. It?s almost like it?s not even retrieving the page from the db. It only happens every so often, and yes? It?s most likely to happen when you try to link from anything in the display list. It?s no emergency, but it would be nice to correct the error just the same
okay D. Hollingworth i'll look further into the situation just have college and then i will do my part and do alittle research regards... glad that you like it...
Incase it helps at all, I just tried to 'update counters' in the Admin Panel, and I got a blank page when I clicked update. I guess it might not be limited to just the main forums.
<br><br>
$post[avatar]<br><br><smallfont><a href='timeonline.php?s=$session[sessionhash]&action=view_leader'><b>Time Spent On This Board:</b></a><br> $post[onlinetime] </smallfont><br><br>
in my functions.php. I have all sorts of $post[avatar]=""; occurances instead. Maybe cause it's 2.27. This is getting stranger. My users in the "non-moderated" group are racking up the correct time. The users in the "moderated" section can be hanging around for 30-minutes or more, yet they remain at zero, or at 1-second.
Infact, the only user that 'was' displaying 1-second has now reverted back to 0.0.0. ): Oh well, at least my non-moderated members are displaying correctly