![]() |
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. |
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> |
^---- 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 ..
|
The data has already been retrieved, you're just accessing it. ;)
|
Thanks! I installed it! :D
|
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> 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|