vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   multiple selection custom profile field in postbit (https://vborg.vbsupport.ru/showthread.php?t=60485)

restless 01-19-2004 10:45 PM

multiple selection custom profile field in postbit
 
i've been trying to add a multiple-selection profile field for "Sex" with the options, "boy", "girl" and "yes, please." to my postbit.

i know how to add a custom field to the postbit, but the multiple-selection thing is putting "1", "2" or "3" in the postbit instead of the actual option names.

Gary King 01-20-2004 01:31 AM

Okay, what variable are you using right now for displaying the field which gives you 1, 2 or 3?

Also, exactly what type of profile field is the Sex one?

restless 01-20-2004 09:16 PM

Code:

<b>Sex:</b> $post[field10]
it's a multiple-selection checkbox.

Gary King 01-20-2004 10:46 PM

You have to unserialize the field, etc. in order to get the proper answer. Maybe someone could help you out with this as I don't have the time to do this at the moment, although it shouldn't take too long to do for most coders :)

Cassidy 01-21-2004 02:20 AM

If your using RC1 or 2:

Change your custom user profile field to: "Yes, including a first blank option" ALSO make sure it's editable by the user.
Then in your postbit (or Postbit legacy) put the code:
PHP Code:

Sex: <if condition="$post[field99]">$post[field99]</if> 

Probebly above 'Rank' would be best.

Change all the "field99" to the number of the profile field. For example if it's 'Biography' it would be profile "field1". And that should work for you.

Gary King 01-21-2004 02:25 AM

Quote:

Originally Posted by Cassidy
If your using RC1 or 2:

Change your custom user profile field to: "Yes, including a first blank option" ALSO make sure it's editable by the user.
Then in your postbit (or Postbit legacy) put the code:
PHP Code:

Sex: <if condition="$post[field99]">$post[field99]</if> 

Probebly above 'Rank' would be best.

Change all the "field99" to the number of the profile field. For example if it's 'Biography' it would be profile "field1". And that should work for you.

That option isn't available for this profile field type.

restless 01-24-2004 12:45 AM

anyone? :nervous:

Princeton 01-24-2004 01:27 AM

use
<if condition="$userinfo[field99]==1">$vbphrase[boy]</if>
<if condition="$userinfo[field99]==2">$vbphrase[girl]</if>
<if condition="$userinfo[field99]==3">$vbphrase[yes_please]</if>

Gary King 01-24-2004 01:53 AM

Quote:

Originally Posted by princeton
use
<if condition="$post[field99]==1">$vbphrase[boy]</if>
<if condition="$post[field99]==2">$vbphrase[girl]</if>
<if condition="$post[field99]==3">$vbphrase[yes_please]</if>

No, it won't work. The values are stored in bitwise format.

Princeton 01-24-2004 02:22 AM

sorry, it should be $bbuserinfo not $post


All times are GMT. The time now is 10:41 PM.

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.01418 seconds
  • Memory Usage 1,741KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete