MyBB Community Forums

Full Version: Status Icons on Forum Team?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm trying to add the images for showing online/offline status for users on the forum team page, what code do I use?
Needing to know what to do soon.
Yet again, I am still waiting for an answer to this.
You would need a mod/plugin for this. You wouldn't be able to do this with template edits.
Moving to mod requests...
Was the 'yet again' comment necessary?? Where else have you had to wait more then 24 hours??
Why do I find that some support guys are rude?
I do get impatient you know. I don't like having to wait ages for a response.

@Polarbear: Thanks for the thread move. Didn't know if it was a template edit, mod or what.
And you don't think it's a bit rude to make a comment like you did??

Even though I'm so rude, I'll still help you. You'll need to modify the query to this:

$query = $db->simple_select("users", "uid, username, displaygroup, usergroup, ignorelist, hideemail, receivepms, away, lastactive, lastvisit, invisible", "displaygroup IN ($groups_in) OR (displaygroup='0' AND usergroup IN ($groups_in)) OR uid IN ($users_in)", array('order_by' => 'username'));

Then use this slightly modified code from ./inc/functions_online.php:

// Determine the status to show for the user (Online/Offline/Away)
$timecut = TIME_NOW - $mybb->settings['wolcutoff'];
if($user['lastactive'] > $timecut && ($user['invisible'] != 1 || $mybb->usergroup['canviewwolinvis'] == 1) && $user['lastvisit'] != $user['lastactive'])
{
	eval("\$user['onlinestatus'] = \"".$templates->get("postbit_online")."\";");
}
else
{
	if($post['away'] == 1 && $mybb->settings['allowaway'] != 0)
	{
		eval("\$user['onlinestatus'] = \"".$templates->get("postbit_away")."\";");
	}
	else
	{
		eval("\$user['onlinestatus'] = \"".$templates->get("postbit_offline")."\";");
	}
}

I put that before this:

if($usergroups[$group] && $group != 6)
{
	$usergroups[$group]['user_list'][$user['uid']] = $user;
}

Then put {$user['onlinestatus']} in the showteam_usergroup_user template and it'll show.

I'd have thought if you were a MyBB Guru like your profile says you'd be able to find this code though...
I'm a MyBB Guru at everything but coding.
I don't think you're rude, I think you just rush things and make assumptions. I like you though Big Grin
o yeah, a mybb guru with posts