MyBB Community Forums

Full Version: Change users online to a number
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Is this what your trying to do?

http://prntscr.com/4lkl2k
(2014-09-10, 07:05 PM)zamight Wrote: [ -> ]Is this what your trying to do?

http://prntscr.com/4lkl2k

that would be it yes.
Find line 76 like below.

$adminCount = $superModCount = $modCount = 0;

Insert the following below the line above.

$adminID = 4;
$superModID = 3;
$modID = 6;


Find rough line 100 like where there should be a variable called ++$membercount;. Replace it with the code below.


if($user['usergroup'] == $adminID)
{
++$adminCount;
}
elseif($user['usergroup'] == $superModID)
{
++$superModCount;
}
elseif($user['usergroup'] == $modID)
{
++$modCount;
}
else
{
++$membercount;
}



Next, go to admin cp -> templates & style. Find the template index_whosonline and change line 5 to the following below for ALL TEMPLATES/THEME.

<td class="trow1"><span class="smalltext">Admin ($adminCount) Super Moderator ($superModCount) Moderator($modCount) Member($membercount) Guest($guestcount)</span></td>
That will not check for additional groups nor if the user is a moderator yet not in a moderator group. BTW.
Pages: 1 2