The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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. |
#2
|
||||
|
||||
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> |
#3
|
|||
|
|||
^---- 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 ..
|
#4
|
||||
|
||||
The data has already been retrieved, you're just accessing it.
|
#5
|
|||
|
|||
Thanks! I installed it!
|
#6
|
|||
|
|||
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> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|