Log in

View Full Version : conditional not working <if condition="$userinfo['field8']!='No'">


CrazyLady
04-14-2005, 03:46 PM
this conditional isn't working... can someone help me out? :ermm:

<if condition="$userinfo['field8']!='No'">
show text
</if>

thanx
CL

RichieBoy67
04-14-2005, 03:49 PM
Can you explain?? which user field is number 8???

CrazyLady
04-14-2005, 06:51 PM
I have created a NEW CUSTOM user field, it's field8. If the condition is met, there is an extra image on their profile, if the condition isn't met, there is no extra image.

lasto
04-14-2005, 07:11 PM
i had a simialr problem - read this thread see if helps

https://vborg.vbsupport.ru/showthread.php?t=79044

Xenon
04-14-2005, 07:11 PM
make sure the cases are correct.

if the option is 'no' then 'No' isn't the same ;)

CrazyLady
04-14-2005, 07:17 PM
cases are good

tgmorris
04-14-2005, 07:38 PM
this conditional isn't working... can someone help me out? :ermm:

<if condition="$userinfo['field8']!='No'">
show text
</if>


thanx
CL
Try using <if condition="$bbuserinfo['field8']!='No'">Stuff</if>

CrazyLady
04-14-2005, 07:57 PM
this condition is not based on the person logged in. Like if I were to view your profile, this condition would need to be based on you, not me.

tgmorris
04-14-2005, 09:24 PM
this condition is not based on the person logged in. Like if I were to view your profile, this condition would need to be based on you, not me.
Gotcha. I know it's an obvious question... are you sure it's defined in the php file and available for use in the template you have it in?

Link14716
04-14-2005, 09:49 PM
Gotcha. I know it's an obvious question... are you sure it's defined in the php file and available for use in the template you have it in?
It is a custom profile field, so yes, it would be.

I don't see anything wrong with the conditional myself.

tgmorris
04-14-2005, 09:54 PM
It is a custom profile field, so yes, it would be.

I don't see anything wrong with the conditional myself.Nor do I. Have you tried putting in a

print_r ($userinfo);

in the php file and see what gets displayed. I find this valuable from time to time to make sure things are really as I think they are. If you are worried about other users seeing it you can wrap the print_r in a conditional so it only executes for admins.

After that I'm out of ideas. :ermm:

Zachery
04-15-2005, 01:14 AM
Nor do I. Have you tried putting in a

print_r ($userinfo);

in the php file and see what gets displayed. I find this valuable from time to time to make sure things are really as I think they are. If you are worried about other users seeing it you can wrap the print_r in a conditional so it only executes for admins.

After that I'm out of ideas. :ermm:
What template are you trying to display this in?

CrazyLady
04-15-2005, 01:25 AM
Memberinfo