PDA

View Full Version : Question about if statement


dcuellar
11-10-2010, 01:09 AM
I'm trying to put something together that is only shown to the person viewing the thread.

So, for example, if a person is viewing their postbit and they have one of the profile fields empty a message will appear to them saying you have a profile field empty.

How would I do that?

<vb:if condition="What goes here?">You have a profile field empty...</vb:if>

Lynne
11-10-2010, 01:31 AM
<vb:if condition="$post[userid] == $bbuserinfo[userid]">stuff</vb:if>

dcuellar
11-10-2010, 01:36 AM
OK. I figured it out...in case anyone else wanted to know.

This is what goes in the red.
$bbuserinfo[userid] == $post['userid']

Basically, if you are the owner of that post you will see the info.

--------------- Added 1289360242 at 1289360242 ---------------

<vb:if condition="$post[userid] == $bbuserinfo[userid]">stuff</vb:if>

lol

Thanks lynne. I presume either of these ways would work. It's just flipped.

Lynne
11-10-2010, 02:00 AM
Yeah, either will work, the order in this condition doesn't matter.

Michael.A
11-10-2010, 02:04 AM
am guessing this is a vb4.x why is it posted in the 3.8.x?

Lynne
11-10-2010, 02:08 AM
Um, uh.... moved!

Michael.A
11-10-2010, 02:16 AM
lol sorry..