PDA

View Full Version : How do I add a line below user title beneath avatar?


Hawk7173
08-26-2020, 06:27 PM
Like the title says. I need to add another line beneath the user title line beneath the user's avatar.
Any help would be appreciated.
I am running 4.2.5

snakes1100
08-26-2020, 07:15 PM
AdminCP -> Styles & Templates->Style Manger -> Modify -> [expand list] -> Postbit Templates -> [expand] -> postbit -> [edit]

You will see the 'registered' and 'location' parts towards the top of this template.

Just add
<vb:if condition="$post['fieldX']"><dt>Field Name</dt> <dd>{vb:raw post.fieldX}</dd></vb:if>

after

<vb:if condition="$post['field2']"><dt>{vb:rawphrase location_perm}</dt> <dd>{vb:raw post.field2}</dd></vb:if>

where Field Name is your field name & X is the number of the custom field, to find out the custom field numbers go to:

Admin CP -> User Profile Fields -> Modify

Mouse-over the [edit] links for each field, the number is at the end of the url that shows in the bottom of your browser window.

Hawk7173
08-26-2020, 09:23 PM
When I open up style manager, I get a list of styles. Does this need to be done on each style?

--------------- Added 1598486306 at 1598486306 ---------------

Tried this in one of my styles and while it adds a profile field, it doesnt show up under the user's avatar.

What does show is:

Username
Title
Avatar image
Join date
Location
Post count

I would like this field to show beneath the avatar.

--------------- Added 1598488461 at 1598488461 ---------------

Just to be clear, this needs to show at the left below the avatar on each post the members make

snakes1100
08-28-2020, 07:10 AM
You have to pace the code in the correct place to get it to show up where you want it.

Yes, you have to do it in all styles that are available to be used on the site.

Hawk7173
08-28-2020, 02:35 PM
I placed the code as directed. Does not show on each post.

--------------- Added 1598635737 at 1598635737 ---------------

This is the code I used:
<vb:if condition="$post['field6']"><dt>Veteran?</dt> <dd>{vb:raw post.field6}</dd></vb:if>

snakes1100
08-28-2020, 08:06 PM
Thats a simple post field call, just like a users location, no reason it shouldnt show on every post for that user if its filled out in their usercp.

You can try running a rebuild on thread info if you like.

Hawk7173
08-28-2020, 08:39 PM
Just ran rebuild threads...no joy!

z3r0
08-29-2020, 04:46 AM
I placed the code as directed. Does not show on each post.

Does it show on any posts? if so does it show in every post of certain members but not others?

Hawk7173
08-29-2020, 02:27 PM
Does not show on any posts.