Version: 1.02, by tcs
Developer Last Online: Apr 2014
Version: 3.5.1
Rating:
Released: 11-12-2005
Last Update: 11-15-2005
Installs: 34
Uses Plugins Template Edits
Code Changes
No support by the author.
ported for 3.5.x.
It's a cool hack if you like to look at your total hits in a 24hr day from both members and guests.
1 PHP Modification to includes/cleanup.php
1 Template Mod. to Forumhome
1 Product Pluggin
Instructions and XML are in the zip.
I will support this hack but should be much trouble with it. Been running it since vB 2.2 I think.
When you first install this hack it will only track from the time the last sessions cleanup was completed. After a sessions cleanup it will start over or reset to 1hr again. Then track the hours in increments for 24hrs. Then clean out the sessions table and start over again. Sessions cleanups should normally occur at midnight.
This hack works if you remove the old code in the cleanup.php and replace it with the new information in the readme.
For information cleanout2.php dose not run hourly like implied in the cron tab. It is set for 5 min after midnight. Jelsoft set it that way and not sure why it is titled a hourly cleanup in the scheduled task. In any event it is needed to reset the script for the next day.
Good luck and I will do my best to answer any questions.
Thanks to Paul M. for pointing out a bug I kept overlooking.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
With this code running, I am having the same error others are reporting. The results are for one hour, even though it's been running for several. I am at work right now and won't be able to analyze the code till later. If I figure out what's amiss, I'll let y'all know.
Thanks, Fixed it in the zip file. Also added to change cleanup2.php. I can concede that this might need to be changed even though it works fine on my site without this additional change.
For those that don't wish to download the zip again this is the code. If you don't wish to change it the (( is fine too.
Code:
$vbulletin->db->query_write("
DELETE FROM " . TABLE_PREFIX . "session
WHERE lastactivity < " . intval(TIMENOW - 86400) . "
### Delete stale sessions ###
I'm not so sure about the quality of the data. Right now, it's saying I've had 59 members on in the last 3 hours - but my Total Members that have visited the site today says only 46 have logged in today.
I'm not so sure about the quality of the data. Right now, it's saying I've had 59 members on in the last 3 hours - but my Total Members that have visited the site today says only 46 have logged in today.
Amy
No it is doing what it is meant to do. It is a Hit counter for a day. Counts all the visitors to your site. If you visit your site twice then that is 2 registered members hit's.
Now it has a error, it didn't clean out at midnight last night and I need to figure out why, I am pulling the hack till I get it back to the way I intended it to work.
With this code running, I am having the same error others are reporting. The results are for one hour, even though it's been running for several. I am at work right now and won't be able to analyze the code till later. If I figure out what's amiss, I'll let y'all know.
same here, more than 36hrs running and only see the last hour stats.