The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Vbulletin <if> statement help.
Vbulletin <if> statement help.
Here is what I am trying to do? I want to add a link to my nav bar that?s only viewable by registered users prompting them to ?upgrade there account?. I half know how <if> statements work in vbulletin but I am not sure on the exact code to make this work. Something along the lines of? HTML Code:
<if condition="$bbuserinfo['userid'] == 2"> <td class="vbmenu_control"><a href="http://www.babeforums.net/imagehost/" target="_blank"><strong><font color="#000000">Test</font></strong></a></td> <else /> </if> Any help is greatly appreciated. Jon |
#2
|
|||
|
|||
As I said on vb.com, the userid is the unique ID of a user, so if you set it to 2, the user with the ID 2 will see the link, and noone else
|
#3
|
|||
|
|||
yup, what he said
u have to use usergroup ids, your only if'ing one person there use this instead <if condition="is_member_of($bbuserinfo, 2)"> this covers secondary groups you can also use this if you dont have secondary groups <if condition="$bbuserinfo[usergroupid]==2"> either one will work in most cases you also dont need the else statement HTML Code:
<if condition="is_member_of($bbuserinfo, 2)"> <td class="vbmenu_control"><a href="http://www.babeforums.net/imagehost/" target="_blank"><strong><font color="#000000">Test</font></strong></a></td> </if> |
#4
|
||||
|
||||
for registerd users use...
Code:
<if condition="$show['member']"> link goes here </if> so if a registered member is in group 6 ... link will not be shown 'cause you are only checking group 2 |
#5
|
||||
|
||||
Thanks for the replys. This has sorted it.
Cheers. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|