The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Hiding stuff if custom profile field is empty?
Hi. I have a script which is for certain usergroups as demonstrated in this code.
Code:
<vb:if condition="is_member_of($userinfo, 12, 9, 40, 10, 15, 11)"><iframe style='display: none;' id='player' src='https://www.youtube.com/embed/<vb:if condition="$userinfo['field9']">{vb:raw userinfo.field9}</vb:if>?autoplay=1&mute=1&enablejsapi=1' allow='autoplay'></iframe> What code would I need to be using? TIA. |
#2
|
|||
|
|||
Code:
<vb:if condition="$userinfo['field9'] == '' || $userinfo['field9'] == NULL"> |
#3
|
|||
|
|||
When I use this condition around my code it shows the following code if the field is empty, I want it to only show the corresponding code if the field isn't empty - any idea?
|
#4
|
||||
|
||||
Try this.
Code:
<vb:if condition="$userinfo[field9]"> |
#5
|
|||
|
|||
Quote:
Code:
<vb:if condition="$userinfo['field9'] != '' && $userinfo['field9'] != NULL"> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|