![]() |
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"> Any help is greatly appreciated. Jon |
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 ;)
|
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)"> |
for registerd users use...
Code:
<if condition="$show['member']"> so if a registered member is in group 6 ... link will not be shown 'cause you are only checking group 2 |
Thanks for the replys. This has sorted it. :)
Cheers. |
All times are GMT. The time now is 01:32 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|