The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Custom userfield for ads
Hi,
I am wanting to add a paid subscription to my site where if a user has paid they can have the option to remove ads. I am doing this by creating a custom user field called Remove ads: I then go to my header template style and add the code Code:
<vb:if condition="$bbuserinfo['field14'] == No"> Thanks, Jason |
#2
|
|||
|
|||
Try putting single quotes around No, like
Code:
<vb:if condition="$bbuserinfo['field14'] == 'No'"> |
#3
|
|||
|
|||
Thanks works perfectly
--------------- Added [DATE]1375836489[/DATE] at [TIME]1375836489[/TIME] --------------- On a side note if I also want to do a subscription check too it would be <vb:if condition="$bbuserinfo['field14'] == 'No'" && $bbuserinfo['usergroup'] == X> If their subscription ends a am assuming the field will still be set which is why I need the second condition. Does bbuserinfo['usergroup'] pick up additional user groups too or just primary? Is this correct? |
#4
|
|||
|
|||
The function is_member_of() checks both primary and additional user groups, so something like:
Code:
<vb:if condition="$bbuserinfo['field14'] == 'No' && is_member_of($bbuserinfo, X)"> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|