Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Visitor Totals Last 24hrs Details »»
Visitor Totals Last 24hrs
Version: 1.02, by tcs tcs is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

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.

Comments
  #12  
Old 11-13-2005, 11:48 AM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks!
Reply With Quote
  #13  
Old 11-13-2005, 12:47 PM
lexx27's Avatar
lexx27 lexx27 is offline
 
Join Date: May 2005
Location: Athens
Posts: 166
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It worked for the 2 first hours. No it hasnt changed for 2 or 3 hours.
Reply With Quote
  #14  
Old 11-13-2005, 01:34 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tcs
It uses sessions table in the mysql. It changes the cleanup.php to leave the sessions table alone for 24hrs to collect the data.
Will this screw-up the who's online displays then ?
Reply With Quote
  #15  
Old 11-13-2005, 01:36 PM
JTyson JTyson is offline
 
Join Date: Apr 2005
Location: This Thread
Posts: 140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
Will this screw-up the who's online displays then ?
Doesnt seem to, http://www.fuo-motorsports.com/forum/

I had to change cleanup2.php aswell
Reply With Quote
  #16  
Old 11-13-2005, 02:26 PM
tcs's Avatar
tcs tcs is offline
 
Join Date: Jun 2002
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
Will this screw-up the who's online displays then ?
No it will not. Online Sessions are closed and changed by the timeout settings in you admincp.


Quote:
Originally Posted by bspiller82
I got that error to. Are you saying if you wait an hour then run it, the error will not happen?

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?

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.
Reply With Quote
  #17  
Old 11-13-2005, 02:36 PM
caliman's Avatar
caliman caliman is offline
 
Join Date: Jan 2005
Location: California
Posts: 256
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

tcs ... is there a fix for this? i am holding off because of this error.

Quote:
Parse error: parse error, unexpected ']' in /home/gsnforce/public_html/forum/includes/cron/cleanup.php on line 26
Reply With Quote
  #18  
Old 11-13-2005, 03:34 PM
tcs's Avatar
tcs tcs is offline
 
Join Date: Jun 2002
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Lines 24 to 28 should look like this:
Code:
$vbulletin->db->query_write("
	DELETE FROM " . TABLE_PREFIX . "session
	WHERE lastactivity < " . intval((TIMENOW - 86400]) . "
	### Delete stale sessions ###
");
You are looking for a ] extra, missing or out if place.

Post you lines and I will see if I can find it.
Reply With Quote
  #19  
Old 11-13-2005, 11:45 PM
JTyson JTyson is offline
 
Join Date: Apr 2005
Location: This Thread
Posts: 140
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tcs
Lines 24 to 28 should look like this:
Code:
$vbulletin->db->query_write("
	DELETE FROM " . TABLE_PREFIX . "session
	WHERE lastactivity < " . ntval((TIMENOW - 86400]) . "
	### Delete stale sessions ###
");
You are looking for a ] extra, missing or out if place.

Post you lines and I will see if I can find it.
Might want to update your readme file as the error is in the code.

Code:
$vbulletin->db->query_write("
	DELETE FROM " . TABLE_PREFIX . "session
	WHERE lastactivity < " . intval((TIMENOW - 86400]) . "
        ### Delete stale sessions ###
Reply With Quote
  #20  
Old 11-14-2005, 02:50 AM
tcs's Avatar
tcs tcs is offline
 
Join Date: Jun 2002
Posts: 130
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #21  
Old 11-14-2005, 04:41 AM
caliman's Avatar
caliman caliman is offline
 
Join Date: Jan 2005
Location: California
Posts: 256
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

tcs -

Is this mod compatible with 'who has visited today?'

https://vborg.vbsupport.ru/showthread.php?t=82769
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:49 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04060 seconds
  • Memory Usage 2,301KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (3)bbcode_code
  • (6)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete