The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Adding a custom field under the avatar
How can I add a custom field detail for viewing under the avatar next to join date, and post count?
Thanks |
#2
|
|||
|
|||
Are you talking about a custom profile field? You just need to add the field in the adminCP, then edit the postbit or postbit_legacy template and add $post[fieldX] where you want it to appear (of course you'd change X to the actual id number of your custom field).
|
#3
|
|||
|
|||
Yes a custom profile field.
Do I edit both templates or just any of those two? |
#4
|
|||
|
|||
You would edit the one you're using. (There's a "Use Legacy (Vertical) Postbit Template" setting in the adminCP options, under "Help Style & Language Settings"). Basically, if you have all the poster's info on the left side then you're using postbit_legacy. If it's across the top (like this site) then it's postbit.
BTW, in my previous post I orignially had vb4 syntax for adding the variable to the template, but I just fixed it. Sorry if that caused you any problems. |
Благодарность от: | ||
j1mmy |
#5
|
|||
|
|||
OK, so I've found the template, and I guess this is what I need to focus on?
Code:
<div class="smallfont"> <br /> <if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if> <if condition="$post['field8']"><div>$vbphrase[location_perm]: $post[field8]</div></if> <if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if> <div> $vbphrase[posts]: $post[posts] </div> |
#6
|
|||
|
|||
Yes, that's the place, you should just be able to copy one of those lines and make your changes (you don't even have to make a phrase if you don't want to, you can just put your text in there).
I think a user can choose whether or not to have their age displayed, but I don't think there's a global setting. If you dont' want to take it out because you're concerned about figuring out how to replace it, you could do this: Code:
<if condition="0"> <if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if> </if> |
#7
|
|||
|
|||
Thanks. This is how I am putting the code in, but the Occupation starts on the same line as the Education:
Code:
<strong>Education & Occupation</strong><br /> Education: $post[field11] Occupation: $post[field14] --------------- Added [DATE]1319977871[/DATE] at [TIME]1319977871[/TIME] --------------- Also, I've noticed that as I allow unregistered users to post on my board, their post count comes up as n/a. How can I do the same with the custom fields? How can I get them to also show n/a when a guest posts? At the moment its blank. |
#8
|
|||
|
|||
Quote:
You need to use <BR /> to make a new line in html. A div would do it too I think. Quote:
You can do this: Code:
<if condition="$show['member']">code for member<else />code for guest</if> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|