Something like this?
Code:
<if condition="$show['avatar']">
<!-- check for admin -->
<if condition="$post[usergroupid]==6">
<!-- I am an admin so do this -->
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="124" height="82" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="64" width="59" align="right"></td>
</tr>
</table>
</td>
<else />
<if condition="$post[usergroupid]==X">
<!-- I am in this usergroup so do this -->
<td class="alt2">
<table cellpadding="5" cellspacing="0" border="0" width="124" height="82" align="center">
<tr>
<td background="$stylevar[imgdir_misc]/badge2.png" nowrap="nowrap" no-repeat><img src="$post[avatarurl]" height="64" width="59" align="right"></td>
</tr>
</table>
</td>
<else />
<!-- I am not in either of those groups so do this -->
<td class="alt2">
<a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</td>
</if>
</if>
</if>
Oops. Look like the else needs to be else/if .