The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Need a quick snippet of code for user permissions
I'm looking to add a navbar link for only certain usergroups, basically only have the text show up if the user is in group 1, 2 or 3. Should be pretty straight forward, but I don't see any bits of code I can swipe that look familiar enough to work.
Any insight would be awesome - thanks! Update #1: I found this while searching around, but it's not working. Code:
<if condition="!is_member_of($bbuserinfo, 6)"> Custom Text </if> Got it to work for single usergroups using this: Code:
<if condition="$bbuserinfo['usergroupid'] == '6'"> Text, etc </if> |
#2
|
||||
|
||||
Code:
<if condition="is_member_of($bbuserinfo, X) OR is_member_of($bbuserinfo, Y) OR is_member_of($bbuserinfo, Z)">Show to groups X Y and Z</if> Code:
<if condition="in_array($bbuserinfo['usergroupid'], array(X, Y, Z))">show to groups Z Y and Z</if> |
#3
|
|||
|
|||
That did it - Thank you very much!
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|