[ SOLVED + Clarification ] Fake guest count

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Get Involved
Locked
User avatar
EnjoyNIRVANA!
Registered User
Posts: 376
Joined: Mon Apr 18, 2005 12:57 pm
Location: Germany
Contact:

[ SOLVED + Clarification ] Fake guest count

Post by EnjoyNIRVANA! »

Is there any way to manipulate the online guest counter?
Like, if there´s no guest online diplay 10. Or any amount of guests +10.

Regards,
~andrew
Last edited by EnjoyNIRVANA! on Tue Aug 28, 2007 8:03 pm, edited 1 time in total.
User avatar
Jleagle
Registered User
Posts: 340
Joined: Tue Jun 24, 2003 7:40 pm
Location: England
Contact:

Re: Fake guest count

Post by Jleagle »

in page_header.php find this piece of code... these are the base values for the online counters.

Code: Select all

$logged_visible_online = 0;
$logged_hidden_online = 0;
$guests_online = 0;
$online_userlist = '';
$l_online_users = '';
User avatar
EnjoyNIRVANA!
Registered User
Posts: 376
Joined: Mon Apr 18, 2005 12:57 pm
Location: Germany
Contact:

Re: Fake guest count

Post by EnjoyNIRVANA! »

There´s no such file in phpbb3!
User avatar
Myspoonistoobig
Registered User
Posts: 30
Joined: Fri Mar 25, 2005 8:05 am

Re: Fake guest count

Post by Myspoonistoobig »

This time it's in the page_header() function in /includes/functions.php

The variables are mostly the same. Find this part

Code: Select all

// Build online listing
$vars_online = array(
And put your variables right above it. Putting it before that part as opposed to putting it a bit further down will ensure that the correct formatting is applied, like pluralization.

The variables to manipulate are almost identical:

Code: Select all

$total_online_users
$logged_visible_online
$logged_hidden_online
$guests_online
User avatar
EnjoyNIRVANA!
Registered User
Posts: 376
Joined: Mon Apr 18, 2005 12:57 pm
Location: Germany
Contact:

Re: Fake guest count

Post by EnjoyNIRVANA! »

Ok, thanks! But what exactly do i have to change in order to add + 10 guests? :oops:

Code: Select all

// Build online listing
		$vars_online = array(
			'ONLINE'	=> array('total_online_users', 'l_t_user_s'),
			'REG'		=> array('logged_visible_online', 'l_r_user_s'),
			'HIDDEN'	=> array('logged_hidden_online', 'l_h_user_s'),
			'GUEST'		=> array('guests_online', 'l_g_user_s')

		);
Can i just enter + 10 somewhere in the line 'GUEST' ?!
User avatar
EnjoyNIRVANA!
Registered User
Posts: 376
Joined: Mon Apr 18, 2005 12:57 pm
Location: Germany
Contact:

Re: Fake guest count

Post by EnjoyNIRVANA! »

Ok so, for everyone who wants to know this too:

FIND:

Code: Select all

// Skip multiple sessions for one user
if ($row['session_ip'] != $prev_session_ip)
{
	$guests_online++;
}
Under $guests_online++; add

$guests_online = $guests_online + 10;
Locked

Return to “[3.0.x] MOD Requests”