View Full Version : User Profile Conditional
atrljoe
04-13-2008, 02:04 AM
I created a custom profile field a drop down menu with 3 options, I was wondering how can I create a conditional so that if the 1st option is selected it display a certain code, and if it is the 2nd option then it displays another code, and if it is the 3rd then it displays the another different code. I have tried several combinations and still cant get it to work. I am going to do this on the FORUMHOME template so any help would be great.
Thanks
Opserty
04-13-2008, 09:12 AM
<if condition="$bbuserinfo['fieldX'] == Y">
<else />
<if conditon="$bbuserinfo['fieldX'] == Z">
</if>
</if>
atrljoe
04-13-2008, 02:12 PM
I get this
The following error occurred when attempting to evaluate this template:
The conditional on line 283 appears to be missing its beginning tag (<if>). This may cause unexpected behavior.
Thanks for your help
Lynne
04-13-2008, 02:15 PM
What exactly did you add because Opserty's code looks correct (two beginning ifs and two ending ifs).
edit: I looked in my postbit and I use something more along these line:
<if condition="$vbulletin->userinfo[fieldX] == Y">
<else />
<if conditon="$vbulletin->userinfo[fieldW] == Z">
</if>
</if>
atrljoe
04-14-2008, 07:12 PM
Thanks for your help Im not sure what was causing it, but we just created a plugin, that is going to do what we need. And Now it works thanks again
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.