PDA

View Full Version : If statement for Usergroups


Cledus James
01-15-2012, 08:31 PM
Need somemore help. If this information is already posted somewhere in an article or something then forgive me and please refer me to that thread.

But what I'm trying to do is display an image in the postbit depending on whether or not the posted user (not user viewing the thread) is in a certain usergroup. I did this in vb3 but have no idea how to do it in vb4 since most statements have changed. Also keep in mind I'm a php/vb newbie so I'm having trouble writing the statement myself. Basically jsut need a statement that says "if user is in X group display X image".

Thanks to anyone that can help.

Cledus James
01-17-2012, 12:12 AM
Bump.

HMBeaty
01-17-2012, 12:27 AM
<a href="https://vborg.vbsupport.ru/showthread.php?t=231525" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=231525</a>

LifesGreatestGift
01-17-2012, 12:27 AM
pretty sure it's
<vb:if condition="is_member_of($post, 6,7)">
<!--your code here-->
</vb:if>

the 6,7 being the usergroup(s) ID

and that would go in your postbit(_legacy) template :)

Link to vB4 template conditionals
https://vborg.vbsupport.ru/showthread.php?t=231525

Cledus James
01-17-2012, 03:08 PM
https://vborg.vbsupport.ru/showthread.php?t=231525

Thanks for the help. Sorry I posted about something already answered. Could have sworn I searched everywhere for an answer before I posted. Guess I was wrong. Thanks though.