MyBB Community Forums

Full Version: [F] Who's online counter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2008-12-20, 02:50 AM)Ryan Gordon Wrote: [ -> ]You guys aren't adding in the # of bots online.

Believe me. I already added the # of bots online. Right now in my forum (there's just me invisible and 2 bots), it shows:

Total: 4
Members: 1
Invisibles: 1
Guests: 0
Bots: 2 (This info is not shown in the index page, but I got it from the who's online page)

And there actually should be:
Total: 3
Members: 1
Invisibles: 1
Guests: 0
Bots: 2

(2008-12-19, 09:12 AM)labrocca Wrote: [ -> ]Well if it's overcounting the invisibles that's easy to fix by just not including them in the total.

Yes, I think this is the solution and that should be done in the next MyBB release.
Okay, so I think I see your point. In index.php find and remove

// If we can see invisible users add them to the count
	if($mybb->usergroup['canviewwolinvis'] == 1)
	{
		$onlinecount += $anoncount;
	}
	
	// If we can't see invisible users but the user is an invisible user incriment the count by one
	if($mybb->usergroup['canviewwolinvis'] != 1 && $mybb->user['invisible'] == 1)
	{
		++$onlinecount;
	}

Let me know if that brings up any regressions.

Thanks,
Ryan
Thanks Ryan. Worked like a charm.

So... is this being fixed for the next MyBB release? Or you guys don't consider this as a bug...?
(2008-12-21, 11:22 PM)EviLito Wrote: [ -> ]Thanks Ryan. Worked like a charm.

So... is this being fixed for the next MyBB release? Or you guys don't consider this as a bug...?

This will be fixed for the next MyBB release. I'm just going to wait for a few confirmations before I commit it.
Thank you for your bug report.

This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated.

With regards,
MyBB Group
Pages: 1 2