vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How do I add a line below user title beneath avatar? (https://vborg.vbsupport.ru/showthread.php?t=328209)

Hawk7173 08-26-2020 06:27 PM

How do I add a line below user title beneath avatar?
 
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 [DATE]1598486306[/DATE] at [TIME]1598486306[/TIME] ---------------

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 [DATE]1598488461[/DATE] at [TIME]1598488461[/TIME] ---------------

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 [DATE]1598635737[/DATE] at [TIME]1598635737[/TIME] ---------------

This is the code I used:
PHP Code:

<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

Quote:

Originally Posted by Hawk7173 (Post 2603863)
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.


All times are GMT. The time now is 07:03 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
  • Page Generation 0.01089 seconds
  • Memory Usage 1,731KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete