The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
if condition question
What are all of the conditions possible for the usergroups? For example, admin would be:
<if condition="$show['admin']"> And guest would be: <if condition="$show['guest']"> But for Super Mods, Mods, Registered Members, etc. what would they be? |
#2
|
||||
|
||||
$show['whatever'] is only available in certain parts of the script (although those 2 I'm not so sure about).
Code:
<if condition="is_member_of($vbulletin->userinfo, X)">This will show to people who are in the usergroupID X.<else />This will show to all others.</if> Code:
<if condition="$vbulletin->userinfo['usergroupid'] == X">yeah</if> |
#3
|
|||
|
|||
How would I go about checking multiple usergroups in a single if condition line?
Ok, I tried the following below and it kind of worked, but didn't work. For myself, being an Admin, it showed "Admin Members" and for another registered member account, it shows "Guest". I'm using two browsers to check these at the same time. What am I doing wrong? <if condition="is_member_of($vbulletin->userinfo, 6)"> Admin <else if condition="is_member_of($vbulletin->userinfo, 2)"> Members <else /> Guests </if> <if condition="$vbulletin->userinfo['usergroupid'] == 6"> Admin <else if condition="$vbulletin->userinfo['usergroupid'] == 2"> Members <else /> Guests </if> I found a solution. I'm using the code below. <if condition="is_member_of($bbuserinfo, 6,9)"> Admin/HelpDesk </if> </else> <if condition="is_member_of($bbuserinfo, 2)"> Members </if> </else> <if condition="is_member_of($bbuserinfo, 1)"> Guests </if> |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|