The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
<vb:if condition="$bbuserinfo['field30'] == YES">
CONTENT </vb:if> So, That is how I thought the code would work. Turns out it didnt. For profile field 30 I just have the option "YES" and blank. I want to be able to show something when that field is set to YES and hide it when its not selected/blank. Any ideas? |
#2
|
||||
|
||||
![]()
When asking for help, it always helps to tell us what template you are using the code in and what isn't working. What is happening when you use that condition? Is CONTENT always posting or never posting? and what template? And who is your target - the user viewing the page, or the user who's page/post you are viewing?
|
#3
|
||||
|
||||
![]()
It is a "20 Most Recent" mod that shows the latest posts on FORUMHOME and I want to allow users to hide it completely with a simple profile field selection. I have created the following
![]() ![]() I would like to allow members the option to either leave this field default (YES) and it display, or change it to blank and it not display. |
#4
|
||||
|
||||
![]()
I think you need to give it another option besides YES.... like NO perhaps? Is the default actually YES (did you check the database - I can never remember what the default is)? And, it's a string, so put single quotes around the YES.
|
#5
|
||||
|
||||
![]()
Thanks, this ended up fixing it.
<vb:if condition="$bbuserinfo['field30'] == 'YES'"> CONTENT </vb:if> The extra ' ' ![]() |
#6
|
||||
|
||||
![]()
Good to know - thanks for posting back with the fix.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|