Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved [where is?] Setting for Who's Online Index page
#1
Not Solved
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.
Hey man, what's up?
Reply
#2
Not Solved
www.yoursite.here/admin/index.php?module=config-settings&action=change&gid=6 ? :-)
OBS! For helping, see my forum information here:

Version: 1.8.3
Theme: Square theme
(Download link)
Reply
#3
Not Solved
(10-25-2014, 12:37 AM)coxuso Wrote: www.yoursite.here/admin/index.php?module=config-settings&action=change&gid=6 ? :-)

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.

Thanks!
Hey man, what's up?
Reply
#4
Not Solved
Then it's not possible unless you make som changes to the source.
- Try request it as a plugin.
OBS! For helping, see my forum information here:

Version: 1.8.3
Theme: Square theme
(Download link)
Reply
#5
Not Solved
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!
Hey man, what's up?
Reply
#6
Not Solved
index.php on line 319 :-)
OBS! For helping, see my forum information here:

Version: 1.8.3
Theme: Square theme
(Download link)
Reply
#7
Not Solved
(10-25-2014, 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")
		{
			++$guestcount;
		}
		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;
			++$botcount;
		}
		else
		{
			if(empty($doneusers[$user['uid']]) || $doneusers[$user['uid']] < $user['time'])
			{
				++$membercount;

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

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

				if($user['invisible'] == 1)
				{
					$invisiblemark = "*";
				}
				else
				{
					$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']);
                    if(!$user['avatar'])
                    {
                        $user['avatar'] = $mybb->settings['bburl'] . '/imgs/images.png';
                    }
                    eval("\$onlinemembers .= \"".$templates->get("portal_whosonline_memberbit", 1, 0)."\";");
                    $comma = $lang->comma;
				}
			}
		}
	}
Hey man, what's up?
Reply
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 2 Guest(s)