Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Most ever Visitors, Posters & Chatters (Add-on) Details »»
Most ever Visitors, Posters & Chatters (Add-on)
Version: 2.04, by Paul M Paul M is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.x Rating:
Released: 10-19-2005 Last Update: 05-14-2006 Installs: 190
 
No support by the author.

This modification is no longer available or supported.

Warning: Do not run this vb 3.5 version on a vb 3.6 forum.

This is an add-on for the following hacks ;

FlashChat - Who is in the chat
Members who have visited the forum (Today or last 24 hours)
Members who have posted on the forum (Today or last 24 hours)

If you don't have any of these installed then this add-on will do precisely nothing. [high]Please note that you should have the latest version of the above hacks installed for this to work properly.[/high] If you do have any of these installed then this will add a "most ever" count similar to the one in the active users display.

Just download the product XML file and import using the Product Manager.


Note: Obviously it will only count from the time you install it, neither it nor I can see backwards in time.



History:

v2.02 : First Release.
v2.03 : Changed logic of IF statement.
v2.04 : Minor changes, no update necessary.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #72  
Old 04-26-2006, 06:05 PM
kennn kennn is offline
 
Join Date: Mar 2006
Location: Cumberland, Maryland, USA
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm...well it definitely happened and I see no signs of database corruption. Guess I'll just have to keep an eye on it and see how it goes. Thanks for the response.
Reply With Quote
  #73  
Old 04-26-2006, 08:40 PM
kennn kennn is offline
 
Join Date: Mar 2006
Location: Cumberland, Maryland, USA
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This really has me curious and I happened to do a MySQL dump yesterday to back up my database, so I decided to do another one today and compare files.

From 04/25/2006:

Code:
INSERT INTO `vb_datastore` VALUES ('maxloggedin', 'a:6:{s:9:"maxonline";i:5;s:13:"maxonlinedate";i:1144430493;s:11:"maxvisitors";i:8;s:15:"maxvisitorsdate";i:1145928403;s:10:"maxposters";i:6;s:14:"maxpostersdate";i:1145918246;}');
From 04/26/2006:

Code:
INSERT INTO `vb_datastore` VALUES ('maxloggedin', 'a:6:{s:9:"maxonline";i:5;s:13:"maxonlinedate";i:1146065294;s:10:"maxposters";i:5;s:14:"maxpostersdate";i:1146067830;s:11:"maxvisitors";i:6;s:15:"maxvisitorsdate";i:1146065007;}');
As you can see, yesterday the maxvisitors was 8 and maxposters was 6 and today they are 6 and 5.

I did a file comparison between both database dumps and there is nothing out of the ordinary - just the usual changes from new posts, events, cron jobs running, etc. No sign of hacking or any corruption that I can see.

I would love to know how these records got changed. All other stats and information are spot on as they should be, even the "most online at once" which VB itself maintains is still correct.
Reply With Quote
  #74  
Old 04-26-2006, 09:24 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

Well something is resetting the counts - possibly you have something that is rewriting the maxloggedin record without the maxposters & maxvisitors data.
Reply With Quote
  #75  
Old 04-26-2006, 10:37 PM
kennn kennn is offline
 
Join Date: Mar 2006
Location: Cumberland, Maryland, USA
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

These are the hacks I've got installed:

Number of Threads in User Profile
Show An Avatar On Who's Online
Mood Hack 3.5
bbSpoiler
Timezone Image In Profile
Members Who Have Posted Today
Who Has Read A Thread
Borgs BBCode Pack
Forum Skin In Profile
Join Days
Simple Breadcrumb Below Last Post
Separate Sticky & Normal Threads
Members Who Have Visited Today
Most Ever Visitors, Posters, Chatters

I've gone through the code of each and none of them make any reference to the maxloggedin datastore (except of course for "most ever visitors, posters, chatters").

I am also running vbAdvanced CMPS which does have a "who's online" module which makes references to maxloggedin. Do you think it could be the culprit? Thanks.
Reply With Quote
  #76  
Old 04-26-2006, 10:43 PM
kennn kennn is offline
 
Join Date: Mar 2006
Location: Cumberland, Maryland, USA
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think this is the salient portion of the onlineusers module for CMPS:

Code:
	$maxusers['maxonline'] = $vbulletin->maxloggedin['maxonline'];

	if ($vbulletin->maxloggedin['maxonline'] <= $totalonline)
	{
		$maxusers['maxonline'] = $totalonline;
		$maxusers['maxonlinedate'] = TIMENOW;
		$db->query_write("UPDATE " . TABLE_PREFIX . "datastore SET data='" . addslashes(serialize($maxusers)) . "' WHERE title = 'maxloggedin'");
	}

	$recordusers = $maxusers['maxonline'];
	$recorddate = vbdate($vbulletin->options['dateformat'], $vbulletin->maxloggedin['maxonlinedate'], 1);
	$recordtime = vbdate($vbulletin->options['timeformat'], $vbulletin->maxloggedin['maxonlinedate']);
If you think this might be the culprit, do you have any suggestions on changes I could make to the CMPS module to keep its functionality but prevent it from overwriting your plugin's data (if that is what it is doing)?

I guess I could always turn off that module but I would like to keep it if possible. Thanks!
Reply With Quote
  #77  
Old 04-27-2006, 07:27 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ouch, yes, that is the culprit - it's using an sql query to directly write the maxloggedin record, erasing the maxposters and visitors data, that's very bad of whoever wrote it, the correct way is to use the build_datastore() function;

Try changing this line ;

PHP Code:
$db->query_write("UPDATE " TABLE_PREFIX "datastore SET data='" addslashes(serialize($maxusers)) . "' WHERE title = 'maxloggedin'"); 
to this

PHP Code:
build_datastore('maxloggedin'serialize($vbulletin->maxloggedin)); 
Reply With Quote
  #78  
Old 04-27-2006, 03:01 PM
kennn kennn is offline
 
Join Date: Mar 2006
Location: Cumberland, Maryland, USA
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Much thanks, Paul!

I've added your code change to my CMPS onlineusers module and will see how it goes. Hard to believe I'm the first to encounter this. I assume a lot of people are using vBAdvanced CMPS and your plugin. If this change stops the CMPS onlineusers module from stepping on the "most" plugin's toes, I'll call it to their attention over at vbadvanced.com. Thanks again!
Reply With Quote
  #79  
Old 05-06-2006, 12:41 AM
MorrisMcD's Avatar
MorrisMcD MorrisMcD is offline
 
Join Date: Nov 2003
Location: Cincinnati, Ohio
Posts: 415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kennn
Much thanks, Paul!

I've added your code change to my CMPS onlineusers module and will see how it goes. Hard to believe I'm the first to encounter this. I assume a lot of people are using vBAdvanced CMPS and your plugin. If this change stops the CMPS onlineusers module from stepping on the "most" plugin's toes, I'll call it to their attention over at vbadvanced.com. Thanks again!
Wow.. That is some bull.. Anyway.. I disabled that plugin.. That sucks.. It happened to me so I came in search of answers, and I guess I ran into the same problem.. Its the first time its ever happened though which is weird. Also what is weird is it now says the most guests even online was 266 last night at 2am.. I highly doubt this.. My site usually has no more than 30 members/guests online.. Before the stats were reset I think we managed to have like 100 on a one time.. But never 266 guests!

any idea why?
Reply With Quote
  #80  
Old 05-06-2006, 02:20 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You obviously had 266 guests - probably a load of spiders.
Reply With Quote
  #81  
Old 05-06-2006, 03:32 PM
MorrisMcD's Avatar
MorrisMcD MorrisMcD is offline
 
Join Date: Nov 2003
Location: Cincinnati, Ohio
Posts: 415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
You obviously had 266 guests - probably a load of spiders.

You think so?? I will check the logs.. I just thought it was odd.. I disabled guest access all last week due to the NFL Draft because I run a Bengals site.. Maybe they were queued up just waiting for it lol
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 10:56 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.04409 seconds
  • Memory Usage 2,320KB
  • 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
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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