PDA

View Full Version : How to get a custom profile field to show up in postbit


Parker Clack
05-17-2006, 09:19 PM
I have a custom profile field that is a yes/no option. What conditional would I use in the postbit/postbitlegacy so that if the option is yes the profile field shows up and if no it doesn't?

Thanks,
Parker

peterska2
05-17-2006, 09:32 PM
<if condition="$post[fieldX]=='Yes'">Stuff you want to show</if>

Just change the X to the field number, and then it will work. If you want it to show something else if it is no then use

<if condition="$post[fieldX]=='Yes'">Stuff for yes<else />stuff for no</if>

Parker Clack
05-17-2006, 10:04 PM
Thanks.

I should have been more clear sorry.

What I am wanting to do is if a member doesn't want to see any other member's extra profile field in the post bit how would I go about doing that?

Let's say you have a field where a member can put in their zip code in custom profile field. Several members don't want to see that displayed in their posts how do you allow them to turn this off?

peterska2
05-17-2006, 10:13 PM
ok so you need two profile fields.

Lets imagine that they are set like this

field5 = Zip Code
field6 = show zip code (Yes No options)

what you would need to use is this.

<if condition="$post[field6]=='Yes'"><div class="smallfont">Zip Code: $post[field5]</div></if>

put it somewhere around your posts bit in your postbit template.

look for something like
<div>
$vbphrase[posts]: $post[posts]
</div>


Just change the 5 and 6 to fit your field numbers.

Also, this is assuming that the option to show/hide is radio buttons and the text are Yes and No.

Parker Clack
05-21-2006, 01:21 PM
Thanks.