![]() |
Visitor Totals Last 24hrs
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. |
nice
|
very nice, thank you :D
|
Simple but effective .. thanks
Clicked install |
I forced an Hourly CleanUp and got this error...
Parse error: parse error, unexpected ']' in /home/gsnforce/public_html/forum/includes/cron/cleanup.php on line 26 |
How do I edit it to say 24 hours rather than 1hrs?
It works even with that error. |
Not an error. It counts up to 24 hrs. Check it in another hour.
|
I've been waiting for this! Thanks..
Does this use cookies? IP checks? Just curious... |
It uses sessions table in the mysql. It changes the cleanup.php to leave the sessions table alone for 24hrs to collect the data. Then counts userid's and totals them up. Guests are assigned a userid of 0 by vB to be able to separate them from members.
No cookies (Although cookies are made with sessions information) and no IP checks. |
Quote:
Is there a way to change the time from saying last 1 hours to last 24 if it logs the last 24 why have it say last hour? |
Thanks!
|
It worked for the 2 first hours. No it hasnt changed for 2 or 3 hours.
|
Quote:
|
Quote:
I had to change cleanup2.php aswell |
Quote:
Quote:
The script will count up to 24hrs. It will track visitor throughout the day. You change the code to do an hourly cleanup? Leave the cleanup.php original and it will do an hourly cleanup with no additional code changes. I have never had to mess with cleanup2.php. When you first install this hack it will only track the time from the last sessions cleanup. After a cleanup it will start over or reset to 1hr again. |
tcs ... is there a fix for this? i am holding off because of this error.
Quote:
|
Lines 24 to 28 should look like this:
Code:
$vbulletin->db->query_write(" Post you lines and I will see if I can find it. |
Quote:
Code:
$vbulletin->db->query_write(" |
The one in the readme is the correct one. The code on my test site was wrong and had an error I missed.
The code you posted should work fine. |
tcs -
Is this mod compatible with 'who has visited today?' https://vborg.vbsupport.ru/showthread.php?t=82769 |
How do I fix mine?
Code:
$vbulletin->db->query_write(" Code:
Parse error: parse error, unexpected ']' in /home/a247xtre/public_html/forums/includes/cron/cleanup.php on line 26 |
Quote:
|
Thanks Paul.
|
Hey, mine doesn't seem to work right... if you stay on the site for a while it keeps recounting you as a member and it doesn't seem to go over 1 hour (it's been on past midnight now):
Total users last 1hrs : 13 (10 members and 3 guests) Any ideas? |
I have the same problem.
|
Quote:
|
Still a problem in IE in the Dark Blue style...Map is all over the place.
|
Code:
$vbulletin->db->query_write(" I run "who was online today" and have had no issues or conflicts with them working together. I just installed this on 3 other boards in an attempt to duplicate this problem. So far they are working fine. Check your cleanup2.php and make sure you did not change the original code. This is the only hack I know that changes the cleanup.php you can re upload a new copy and try again to see if that fixes it. |
Typo in the install file.
Code:
$vbulletin->db->query_write(" Code:
$vbulletin->db->query_write(" |
I have NOT been able to test this fully. Or even more than making sure it has no parse errors and the numbers add up. But, here is the plugin code for this mod for those of you using my spider's on the forumhome page.
The forumhome template code needs to change as well. My target audience will know how to do that ;) Code:
$datecut24 = TIMENOW - 86400; |
Quote:
Zip file is updated. |
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.
|
Ive said it before but cleanup2.php also has the same delete statement in it that needs to be modified.
|
Quote:
|
Quote:
Code:
intval((TIMENOW - 86400)) |
So does this thing work for you Paul? Anybody? Seems like the behavior I described earlier is still happening for a few people here.
|
Quote:
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(" |
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 |
Quote:
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. |
Quote:
Will wait till tcs works on the redo :D |
All times are GMT. The time now is 03:00 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|