MyBB Community Forums

Full Version: [where is?] Setting for Who's Online Index page
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys, where is the setting that controls how many people appear online on the index page?
I looked over and over and I can't seem to find it.

[Image: 57123-1340292100-3.PNG]

any help would be really appreciated.
(2014-10-25, 12:37 AM)coxuso Wrote: [ -> ] ? :-)

Hey there, thanks for taking the time to respond to my question,
I really appreciate.

See, I only want to show the latest 9 people who are online on the index page
but I don't see the option to set this:

[Image: Untitled.png]

Do you know how I can set the index page to shows only the latest 9 people online?
Any further help would be sincerely appreciated.

Then it's not possible unless you make som changes to the source.
- Try request it as a plugin.
Indeed, I have no problem modifying the source if I know where to. I'm sure it is just a simple output command but where do I place it? Anyone?

And thanks for responding coxuso! I will wait a couple days before requesing this as a plugin if I can't get an answer, I appreciate the suggestion!
index.php on line 319 :-)
(2014-10-25, 05:36 PM)coxuso Wrote: [ -> ]index.php on line 319 :-)

Hey bud! Thanks for taking the time to reply back, that is awesome! You are great!

Check this out, I would love to get your opinion on this, below is my portal.php, after being manipulated to show "Who's online, on the portal page and
it creates the same who's online as the index page,
but I can't figure out where to manipulate the code to ouput to show only 9 online members online,

this is what it will look like when only 9 members are showing, anything beyond 9 members will screw up the layout, do you think you can take a look at the code and give me your opinion, in all regards, I'm so grateful for the help you've given me!

[Image: 1onlin.png]

portal.php with added codefor user's online

	$timesearch = TIME_NOW - $mybb->settings['wolcutoff'];
	$comma = '';
	$guestcount = $membercount = $botcount = $anoncount = 0;
	$onlinemembers = '';
	$doneusers = array();
	$query = $db->query("
		SELECT s.sid, s.ip, s.uid, s.time, s.location, s.location1, u.username, u.invisible, u.usergroup, u.displaygroup, u.avatar
		FROM ".TABLE_PREFIX."sessions s
		LEFT JOIN ".TABLE_PREFIX."users u ON (s.uid=u.uid)
		WHERE s.time>'$timesearch'
		ORDER BY {$order_by}, {$order_by2}
	while($user = $db->fetch_array($query))

		// Create a key to test if this user is a search bot.
		$botkey = my_strtolower(str_replace("bot=", '', $user['sid']));

		if($user['uid'] == "0")
		elseif(my_strpos($user['sid'], "bot=") !== false && $session->bots[$botkey])
			// The user is a search bot.
			$onlinemembers .= $comma.format_name($session->bots[$botkey], $session->botgroup);
			$comma = $lang->comma;
			if(empty($doneusers[$user['uid']]) || $doneusers[$user['uid']] < $user['time'])

				$doneusers[$user['uid']] = $user['time'];

				// If the user is logged in anonymously, update the count for that.
				if($user['invisible'] == 1)

				if($user['invisible'] == 1)
					$invisiblemark = "*";
					$invisiblemark = '';

				if(($user['invisible'] == 1 && ($mybb->usergroup['canviewwolinvis'] == 1 || $user['uid'] == $mybb->user['uid'])) || $user['invisible'] != 1)
					// Properly format the username and assign the template.
                    // $user['username'] = format_name($user['username'], $user['usergroup'], $user['displaygroup']);
                    // $user['profilelink'] = build_profile_link($user['username'], $user['uid']);
                    $user['profilepath'] = $mybb->settings['bburl'] . '/' . get_profile_link($user['uid']);
                        $user['avatar'] = $mybb->settings['bburl'] . '/imgs/images.png';
                    eval("\$onlinemembers .= \"".$templates->get("portal_whosonline_memberbit", 1, 0)."\";");
                    $comma = $lang->comma;