Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 11-06-2006, 11:46 AM
jailer jailer is offline
 
Join Date: Jun 2006
Location: Manchester, UK
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default VBA problem? Need a bit of coding help please.

Not posting on the VBA forum yet, chances of a reply there are slim to none.


The Most Ever Users Online was 1 on 01 01 1970


I've got that showing on my forum home page after the forum hit over 100 members online and 'broke'.
As per: http://www.vbulletin.com/forum/showthread.php?t=203222
(pages 4 & 5)
I've tried loads to fix it to no avail.
I'm told now I have to remove VBAdvanced for the problem to go away..
I'm not prepared to do this, so I'm looking for help in manually editing a template or PHP file that shows this info in the What's Going On box.

Any pointers would be very much appreciated.
It looks terrible.

Thanks in advance.
Reply With Quote
  #2  
Old 11-06-2006, 02: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

To fix the VBA usersonline module (for vb 3.6) either use the copy in CMPS 2.2.1 or read this post, which is where I asked them to fix the incorrect code they use.
Reply With Quote
  #3  
Old 11-06-2006, 05:43 PM
jailer jailer is offline
 
Join Date: Jun 2006
Location: Manchester, UK
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Paul and much as appreciate 100% your coding skills and opinions, altering that code still doesn't work for me.
I re ran the query:

Code:
UPDATE datastore
SET data = ''
WHERE title = 'maxloggedin'
afterwards too, but after a refresh, the forum still shows 01-01-1970



:edit:
Just uploaded the copy from 2.2.1 also - still no difference.
Sorry to be a pain.


As you suggested in the other thread, I've downloaded all my non-standard files and scanned them for maxloggedin

The only two files I find it in are:

vba_cmps_include_template.php
forum.php (which is VB's index.php renamed)

________


:edit 2:

OK, think I've fixed it.

Following your code with the serializing, I have altered the code in the VB forum.php (originally index.php) as so:

Code:
	// ### MAX LOGGEDIN USERS ################################
	if (intval($vbulletin->maxloggedin['maxonline']) <= $totalonline)
	{
		$vbulletin->maxloggedin['maxonline'] = $totalonline;
		$vbulletin->maxloggedin['maxonlinedate'] = TIMENOW;
		build_datastore('maxloggedin', serialize($vbulletin->maxloggedin));
	}
Is now:

Code:
	// ### MAX LOGGEDIN USERS ################################
	if (intval($vbulletin->maxloggedin['maxonline']) <= $totalonline)
	{
		$vbulletin->maxloggedin['maxonline'] = $totalonline;
		$vbulletin->maxloggedin['maxonlinedate'] = TIMENOW;
		build_datastore('maxloggedin', serialize($vbulletin->maxloggedin), 1);
	}
Added the , 1

Seems to have done the trick.
Does this sound abnormal to you Paul?


Hopefully those with a similar problem might search and find a solution.
Reply With Quote
  #4  
Old 11-07-2006, 09:42 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

That looks exactly correct, if the ',1' is missing from the build_datastore() call then it will almost certainly break the 'maxloggedin' values on a vbulletin 3.6 installation.
Reply With Quote
  #5  
Old 11-07-2006, 09:44 AM
jailer jailer is offline
 
Join Date: Jun 2006
Location: Manchester, UK
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow. A VB bug then perhaps?
Reply With Quote
  #6  
Old 11-07-2006, 06:34 PM
Kidswap Kidswap is offline
 
Join Date: Feb 2005
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I did a check and all of my maxloggedin already have the '1'. I deleted everything that had to do with vbcmps and still no luck fixing this.
Reply With Quote
  #7  
Old 11-08-2006, 03:56 AM
newbe_haselina newbe_haselina is offline
 
Join Date: May 2006
Location: Germany near Stuttgart
Posts: 44
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Jailor,

that's terriffic !!! :laugh: It works! I can't tell you how happy I am!

Thank you very much, and thanks to all the others trying to give me a little help.

But I'm wondering, if it's a bug?! I mentioned, that I set for security reasons some files to CHMOD 644, also the index.php ... is it possible that the index.php was not updated? Just a guess why this happened.

But anyway, works fine now and I am really thankfull.
Reply With Quote
  #8  
Old 11-10-2006, 11:38 AM
jailer jailer is offline
 
Join Date: Jun 2006
Location: Manchester, UK
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yep, I think it's a bug - glad you got it sorted. Must say, I was thrilled myself.

Kidswap, have you tried adding the , 1 to your VB index.php ..?
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 05:44 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06424 seconds
  • Memory Usage 2,234KB
  • Queries Executed 13 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (8)postbit
  • (8)postbit_onlinestatus
  • (8)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_postinfo_query
  • fetch_postinfo
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete