Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 02-04-2012, 09:29 AM
Aitorcillo Aitorcillo is offline
 
Join Date: Jun 2011
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to do this

Hello, i open online.php and i look for:
-----
line 631

$totalonline = $numbervisible + $numberguests;

I intend to add to the total a number example:

$totalonline = $numbervisible + $numberguests + 50;

But not working (i don't know php yet...)


So i try another way:

i add $test = 50;

And i try again:

$totalonline = $numbervisible + $numberguests + $test;

What i am doing wrong
Reply With Quote
  #2  
Old 02-04-2012, 10:14 AM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It looks like $totalonline is only used to handle the paging controls. You could do something like:

Code:
$numberguests += 50;
$totalonline = $numbervisible + $numberguests;

which seems to work but you will get paging controls as if there were 50 guests.
Reply With Quote
  #3  
Old 02-04-2012, 11:26 AM
Aitorcillo Aitorcillo is offline
 
Join Date: Jun 2011
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello thank you kh99 but it doesn't work

I changed the code for that and do not appear more guests.

What is wrong?
Reply With Quote
  #4  
Old 02-04-2012, 12:13 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I tried it and it works for me. You're looking at the "who's online" page, right? It only increases the count. Like I said above, it will not produce any fake entries in the list.
Reply With Quote
  #5  
Old 02-04-2012, 12:23 PM
Aitorcillo Aitorcillo is offline
 
Join Date: Jun 2011
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

haha of course i you didn't do wrong...

Sorry mate, i am newbie in vbulletin, could you explain to me what i have to do exactly, i have change the following code in online.php to this parameters...

Code:
$numberguests += 50;
$totalonline = $numbervisible + $numberguests;
But i don't see any change, what i next step thank you
Reply With Quote
  #6  
Old 02-04-2012, 12:38 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's all you should have to do. When I do that on my test site I go to online.php and I see this:

Attachment 136310
Reply With Quote
  #7  
Old 02-04-2012, 12:44 PM
Aitorcillo Aitorcillo is offline
 
Join Date: Jun 2011
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm can you send to me a copy from your online.php file, or attach here, i think i am doing something wrong in my code so i will see your file and look for your code, or directly i will upload your thank you again
Reply With Quote
  #8  
Old 02-04-2012, 12:51 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I can't send you the entire file, sorry. But it's not difficult - you already found the line. It starts looking like this:

PHP Code:
        $onlinebits .= construct_online_bit($val1);
    }
}

$totalonline $numbervisible $numberguests;

// ### MAX LOGGEDIN USERS ################################
if (intval($vbulletin->maxloggedin['maxonline']) <= $totalonline

and you change it to look like this:

PHP Code:
        $onlinebits .= construct_online_bit($val1);
    }
}

$numberguests += 50;
$totalonline $numbervisible $numberguests;

// ### MAX LOGGEDIN USERS ################################
if (intval($vbulletin->maxloggedin['maxonline']) <= $totalonline

If you've done that and it's not working, there's something else wrong.
Reply With Quote
  #9  
Old 02-04-2012, 01:46 PM
Aitorcillo Aitorcillo is offline
 
Join Date: Jun 2011
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok so exactly as I have set in the online.php file, do not understand why it does not work.
Reply With Quote
  #10  
Old 02-04-2012, 01:48 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try inserting something like:

Code:
die("Message in online.php");

and see if any changes are taking effect. If that doesn't cause a blank page with that error message then you are not changing the correct file, or it's being cached or something.
Reply With Quote
Reply

Thread Tools
Display Modes

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 02:00 PM.


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.04231 seconds
  • Memory Usage 2,264KB
  • Queries Executed 12 (?)
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
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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