PDA

View Full Version : Usergroup Conditional


Eclyps19
09-22-2009, 11:42 AM
Very very basic question. I need to add specific items to the postbit based on the usergroups of a member.

What is the variable I need to be looking at?

ie:

<if condition="(usergroup)">
do something
</if>

thanks

Iain M
09-22-2009, 01:10 PM
<if condition="is_member_of($bbuserinfo,5,6,7)">
Code to show
</if>

just change 5,6,7 to the usergroupids you want to show stuff to.

TheLastSuperman
09-22-2009, 01:20 PM
Compliments of Loco.M, Sir Adrian, and Michael Biddle :D

http://forum.vbulletinsetup.com/f18/vbulletin-template-conditionals-list-2185.html

Eclyps19
09-22-2009, 01:43 PM
ahhh sorry... bad logic on my part.

I'm placing something in the postbit template. I need to check the poster's usergroups and then add something based on that.

Any idea how to achieve this?


//Edit: I think I got it with Superman's post. thanks a ton

--------------- Added 1253635994 at 1253635994 ---------------

one more question...

<if condition="$post['usergroupid'] == 6"></if>

can I use ANDs or ORs? Say I need to check for multiple usergroups within a single if statement

--------------- Added 1253636580 at 1253636580 ---------------

aaaaaand one more question... I guess $post['usergroupid'] doesn't count secondary usergroups. How can I include all groups (primary AND secondary) in my conditional?