vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   How to get a custom profile field to show up in postbit (https://vborg.vbsupport.ru/showthread.php?t=115917)

Parker Clack 05-17-2006 09:19 PM

How to get a custom profile field to show up in postbit
 
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

Code:

<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

Code:

<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.

Code:

<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
Code:

<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.


All times are GMT. The time now is 07:06 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01019 seconds
  • Memory Usage 1,715KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete