vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Profile info in thread display. (https://vborg.vbsupport.ru/showthread.php?t=126525)

IAWBody 09-13-2006 03:58 PM

Profile info in thread display.
 
I was wondering if there was a way to add information to a user's display when they post a reply to a thread, or start a thread. All I have right now is their join date, and their Location. What I also want on there is their First and Last name, and their vehicle information (year, make, model)

Is there anyway I can make these mandatory for their profile, and make them display in the thread?

You can visit my forum at www.IAWBody.com/forum. It's a Car Enthusiasts website based on W-Body vehicles (Pontiac Grand Prix, Buick Regal, Chevy Monte Carlo, Chevy Impala, and a few others)

Thanks for the help.

Kirk Y 09-13-2006 11:19 PM

Assuming you've made Custom Profile Fields for the fields you'd like to add, you can use this code: (Stick it below Location or wherever in your Postbit/Postbit_legacy template)
Code:

<if condition="$post[fieldX]">First Name: $post[fieldX]</if>
Replace 'X' with the Field Number of whatever Custom Profile Field you're trying to access.

top end ms 09-14-2006 12:03 AM

^---- there it is .. have used this a lot on my forums.. (about 10 or so per post) Anyone know if this will cause too much data retreiving? or if its not a big deal ..

Kirk Y 09-14-2006 12:09 AM

The data has already been retrieved, you're just accessing it. ;)

IAWBody 09-14-2006 01:27 AM

Thanks! I installed it! :D

MediaHound 09-29-2006 11:41 AM

Assuming 99% of the time where you will be adding this, you will break it to a new line, so...
Adding the break after the if instead of before the if is helpful so you don't get a blank line if the users did not fill in the profile field.
Code:

<if condition="$post[fieldX]"><br>First Name: $post[fieldX]</if>
added:
Using a div instead of a break should give you the same effect, you can do that like this:
Code:

<if condition="$post[fieldX]"><div>First Name: $post[fieldX]</div></if>


All times are GMT. The time now is 03:33 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.01972 seconds
  • Memory Usage 1,717KB
  • 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
  • (3)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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