![]() |
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 |
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).
|
Yes a custom profile field.
Do I edit both templates or just any of those two? |
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. |
OK, so I've found the template, and I guess this is what I need to focus on?
Code:
<div class="smallfont"> |
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"> |
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 /> --------------- 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. |
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> |
All times are GMT. The time now is 10:09 PM. |
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:
|