Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 05-06-2012, 07:49 PM
flyrib flyrib is offline
 
Join Date: Sep 2009
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How do I show a custom profile field

Hello, How do I get custom profile field to show up under the username when they post?

I've just added a new mandatory profile field that members have to fill in. But how can I make this field is always visible in posts, showing under their username?

thank you in advance :up:
Reply With Quote
  #2  
Old 05-06-2012, 07:58 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There's an article on how to do this: https://vborg.vbsupport.ru/showthread.php?t=250418 . (It's a vb4 article but I believe it will still work if you use vb3 template syntax).

The short answer is that if your profile field is text or single selection (menu or radio button), then you just need to put $post[fieldX] in your postbit or postbit_legacy template.
Reply With Quote
  #3  
Old 05-06-2012, 10:15 PM
JacquiiDesigns's Avatar
JacquiiDesigns JacquiiDesigns is offline
 
Join Date: Dec 2008
Location: Tennessee
Posts: 687
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm - I don't think vB 4.x syntax will work with vB 3.x
The following code may be of help though:

Code:
<if condition="$post['fieldX']"> <strong>Field Name:</strong> $post[fieldX]</if>
where "X" is the number of your new custom field.

HTH

J.
Reply With Quote
  #4  
Old 05-06-2012, 10:43 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JacquiiDesigns View Post
Hmmm - I don't think vB 4.x syntax will work with vB 3.x
You're right, that's why I mentioned that you'd need to use vb3 template syntax. I wanted to point out the article anyway because if you want to use a multiple selection profile field it gets a little more complicated.
Reply With Quote
Благодарность от:
JacquiiDesigns
  #5  
Old 05-07-2012, 04:40 AM
flyrib flyrib is offline
 
Join Date: Sep 2009
Posts: 39
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you for your answers, should be a lot of people that have done this with their forums right? Will try this code during the day.
Reply With Quote
  #6  
Old 05-07-2012, 04:45 AM
JacquiiDesigns's Avatar
JacquiiDesigns JacquiiDesigns is offline
 
Join Date: Dec 2008
Location: Tennessee
Posts: 687
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kh99 View Post
You're right, that's why I mentioned that you'd need to use vb3 template syntax. I wanted to point out the article anyway because if you want to use a multiple selection profile field it gets a little more complicated.
Ah okay...
Just as an FYI - here's a list vB 3.x template conditionals. I've bookmarked it and have used it as a resource dozens of times. Should be helpful

J.
Reply With Quote
  #7  
Old 05-10-2012, 01:08 AM
Xp.Warrior Xp.Warrior is offline
 
Join Date: Mar 2012
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Use This Coding
Code:
<if condition="$post['fieldX']"> <strong>Field Name:</strong> $post[fieldX]</if>
And [fieldX] Clear X And write Your Field Number
And Use This Code In Your admincp --> Styles & Templates --> Search in Templates --> postbit_lagacy And Add This Coding Where You Want To Look
i Hope This Is Usefull For You
Reply With Quote
  #8  
Old 05-10-2012, 04:55 PM
JacquiiDesigns's Avatar
JacquiiDesigns JacquiiDesigns is offline
 
Join Date: Dec 2008
Location: Tennessee
Posts: 687
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xp.Warrior View Post
Use This Coding
Code:
<if condition="$post['fieldX']"> <strong>Field Name:</strong> $post[fieldX]</if>
And [fieldX] Clear X And write Your Field Number
And Use This Code In Your admincp --> Styles & Templates --> Search in Templates --> postbit_lagacy And Add This Coding Where You Want To Look
i Hope This Is Usefull For You
Um- You copy/pasted part of my post as if it's new information how...?

J.
Reply With Quote
  #9  
Old 05-10-2012, 11:55 PM
Xp.Warrior Xp.Warrior is offline
 
Join Date: Mar 2012
Posts: 142
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by JacquiiDesigns View Post
Um- You copy/pasted part of my post as if it's new information how...?

J.
admincp --> Styles & Templates --> Search in Templates --> postbit_lagacy And Add This Coding This Is New Information
Reply With Quote
  #10  
Old 05-11-2012, 03:08 PM
JacquiiDesigns's Avatar
JacquiiDesigns JacquiiDesigns is offline
 
Join Date: Dec 2008
Location: Tennessee
Posts: 687
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

oh. okay.
Thanks
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:26 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04547 seconds
  • Memory Usage 2,259KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete