The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
IF Conditions
I've tried using a IF Condition in my version 4 to block something out to unregistered users.
I use: Code:
<vb:if condition="$post['usergroupid'] != 1"> BLOCKEDOUTINFOHERE </vb:if> Should I be using... Code:
<vb:if condition="$is_member_of($bbuserinfo,1)"> <vb:else /> BLOCKEDOUTINFOHERE </vb:if> |
#2
|
||||
|
||||
The conditions for vb4 are the same as for vb3 except that you put "vb:" before the line... so <vb:if and </vb:if and <vb:else etc. The actual condition itself though should be the same.
You also didn't tell us what template you are modifying. That is usually essential information when helping out. |
#3
|
||||
|
||||
I'm editing the footer. I have a java script thing that runs at the bottom of the window but I don't want it displaying for unregistered people.
Thanks for that - I will look up a list of the conditions so I can try and figure out what my deal is... |
#4
|
||||
|
||||
The $post variable is not available in the footer. Not only that, but $post['usergroupid'] is the usergroupid of the person making the post, so it makes no sense to use it in the footer. You want $bbuserinfo and yes, you should use is_member_of.
|
#5
|
||||
|
||||
Thanks!
For people that use this thread in the future, I used: Code:
<vb:if condition="!is_member_of($bbuserinfo, 1)"> blahblah </vb:if> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|