$mods_online = 0;
$mods_list = '';
foreach ($activeusers AS $user)
{
if (is_member_of($user['userid'], array(5,6,7)))
{
$mods_online++;
$mods_list .= $user['musername'] . ', ';
}
}
$mods_list = rtrim($mods_list, ', ');
if (!$mods_list)
{
$mods_list = 'None';
}
$template_hook['forumhome_wgo_pos2'] .= '<div class="wgo_subblock section">
<h3 class="blocksubhead"><img src="' . $vbulletin->stylevars['imgdir_misc']['imagedir'] . '/users_online.png" alt="Moderators Online"/>Moderators Online: ' . $mods_online . '</h3>
<div>' . $mods_list . '</div>
</div>';