Something like this might work for you. (this is part of the
whosonlinebit template)
Code:
<td class="alt2" width="35%">
<if condition="in_array($userinfo[displaygroupid], array(5, 6)) AND !is_member_of($bbuserinfo, 5, 6)">
<b>$vbphrase[unknown_location]</b>
<else />
<div>
<span style="float:$stylevar[right]">
<if condition="$show['lockedout']"><img src="$stylevar[imgdir_statusicon]/wol_lockedout.gif" alt="$vbphrase[viewing_forum_closed]" /></if>
<if condition="$show['nopermission']"><img src="$stylevar[imgdir_statusicon]/wol_nopermission.gif" alt="$vbphrase[viewing_no_permission_message]" /></if>
<if condition="$show['errormessage']"><img src="$stylevar[imgdir_statusicon]/wol_error.gif" alt="$vbphrase[viewing_error_message]" /></if>
<if condition="$show['reallocation']"><img src="$stylevar[imgdir_misc]/question_icon.gif" alt="$userinfo[location]" /></if>
</span>
$userinfo[action]
</div>
<if condition="$show['where']">
<div class="smallfont" style="margin-top:1px">
<if condition="$show['subscribed']"><img class="inlineimg" src="$stylevar[imgdir_misc]/subscribed.gif" alt="$vbphrase[you_are_subscribed_to_this_thread]" /></if>
$userinfo[where]
</div>
</if>
</if>
</td>