PDA

View Full Version : Hide a bit of code to everyone but mods/admin?


spamgirl
09-09-2011, 01:25 PM
<vb:if condition="$prepared['action']">
<dl class="stats">
<dt>{vb:rawphrase current_activity}</dt>
<dd> {vb:raw prepared.action} {vb:raw prepared.where}</dd>
</dl>
</vb:if>

I'd like to hit that bit of code from everyone but moderators and/or admin. I'm just wondering what the code would be to do that? I checked other things that are mod/admin only, but they have their own specific condition code.

Thanks!

kh99
09-09-2011, 01:42 PM
Try this:


<vb:if condition="is_member_of($bbuserinfo, 5, 6, 7)">
<vb:if condition="$prepared['action']">
<dl class="stats">
<dt>{vb:rawphrase current_activity}</dt>
<dd> {vb:raw prepared.action} {vb:raw prepared.where}</dd>
</dl>
</vb:if>
</vb:if>

spamgirl
09-09-2011, 02:31 PM
Awesome, thank you! This will be super useful to me :)