Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] Who's online counter
#11
(12-20-2008, 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

(12-19-2008, 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.
#12
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
#13
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...?
#14
(12-21-2008, 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.
#15
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


Forum Jump:


Users browsing this thread: 1 Guest(s)