Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications

Reply
 
Thread Tools
center name, avatar ranking etc or add posts, join date etc inside a box Details »»
center name, avatar ranking etc or add posts, join date etc inside a box
Version: 1.00, by ShawneyJ ShawneyJ is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 4.2.2 Rating:
Released: 08-01-2010 Last Update: Never Installs: 46
Template Edits
Code Changes  
No support by the author.

Some of you, like my self would like to center only title, ranking, reputation, avatar, username and reps.

Well hears a simple edit that works.

To center username, title, ranking, reputation, avatar, username and reps in Postbit Legacy:

Add the following code to your additional.css:
Code:
.postbitlegacy .userinfo  .postuseravatar, .eventbit .userinfo .eventuseravatar {
float:none !important;
text-align:center !important;
}

.postbitlegacy .userinfo .username_container, .postbit_reputation, .postbitlegacy .userinfo .rank, .postbitlegacy .userinfo .usertitle {
text-align:center !important;
}

I have tested on default style vbulletin, and 4 custom styles, all work like a charm, well it does for me, hoping the same for you.

Next - How to add Posts, Location etc inside a box:

Add the following code to your additional.css:
Code:
.post_field {
	background:{vb:stylevar post_field_background_color};
	color:{vb:stylevar post_field_font_color};
	border:{vb:stylevar post_field_border};
	padding:{vb:stylevar post_field_padding};
	margin-top: 2px;
	text-align:left;
}

Next in postbit_legacy template Find:
Code:
<vb:if condition="$post['joindate']"><dt>{vb:rawphrase join_date}</dt><dd>{vb:raw post.joindate}</dd></vb:if>

And wrap this Code around anything you want Boxed:
Code:
<div class="post_field">Text</div>

The <div class="post_field"> must be added just before the <dt> for this to work and the end </div> after </dd> for if conditions only.


Your Code should look like this:
Code:
<vb:if condition="$post['joindate']"><div class="post_field"><dt>{vb:rawphrase join_date}</dt><dd>{vb:raw post.joindate}</dd></div></vb:if>

I did notice for Posts, you would need to wrap the whole small bit of code for this to work. Example:
Code:
<div class="post_field"><dt>{vb:rawphrase posts}</dt> <dd>{vb:raw post.posts}</dd></div>

If you have iTrader, Thanks, or any other addons with a automatic template edit in post bit.

Just wrap the code around the template_hook like this:
Code:
<div class="post_field">{vb:raw template_hook.postbit_userinfo_right_after_posts}</div>

Same for any manual template edits like Moods, Flags Example:

Moods:
Code:
<div class="post_field">{vb:raw vmoods_postbit}</div>

Flags:
Code:
<div class="post_field"><vb:if condition="$post['field5']"><style="text-align:left"> Country:</dt> <img src="{vb:stylevar imgdir_button}/flags/{vb:raw post.field5}.GIF" align="middle" alt="{vb:raw post.field5}" border="" /></vb:if></div>

If you have No Manual Template Edits:

Just Find in postbit_legacy template:
Code:
<vb:if condition="$post['joindate']"><dt>{vb:rawphrase join_date}</dt> <dd>{vb:raw post.joindate}</dd></vb:if>
					<vb:if condition="$post['field2']"><dt>{vb:rawphrase location_perm}</dt> <dd>{vb:raw post.field2}</dd></vb:if>
					<vb:if condition="$post['age']"><dt>{vb:rawphrase age}</dt> <dd>{vb:raw post.age}</dd></vb:if>
					<dt>{vb:rawphrase posts}</dt> <dd>{vb:raw post.posts}</dd>	
					{vb:raw template_hook.postbit_userinfo_right_after_posts}

Remove and Replace with This:
Code:
<vb:if condition="$post['joindate']"><div class="post_field"><dt>{vb:rawphrase join_date}</dt><dd>{vb:raw post.joindate}</dd></div></vb:if>
					<vb:if condition="$post['field2']"><div class="post_field"><dt>{vb:rawphrase location_perm}</dt> <dd>{vb:raw post.field2}</dd></div></vb:if>
					<vb:if condition="$post['age']"><div class="post_field"><dt>{vb:rawphrase age}</dt> <dd>{vb:raw post.age}</dd></div></vb:if>
					<div class="post_field"><dt>{vb:rawphrase posts}</dt> <dd>{vb:raw post.posts}</dd></div>	
					<div class="post_field">{vb:raw template_hook.postbit_userinfo_right_after_posts}</div>

Im hoping i have at least helped 1 or 2 people out here
cheers.

My main reason for this thread was to center username, title, ranking, reputation, avatar, and reps.
Also to help those that want to wrap posts etc in a box.
It SHOULD work for all vb4.x to vb4.2.2

CLICK INSTALL IF I HAVE HELPED IN SOME WAY THANKS

New: vb4.2.2 default style Screenshot added.

PLEASE NOTE: This is NOT copied code from anyone here at vb.org, i have been using this code for a very long while, well since vb4.x.

Screenshots

File Type: jpg default-cap.jpg (31.3 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
fxdigi-cash, livenetc

Comments
  #12  
Old 03-08-2011, 01:50 AM
ET 7 ET 7 is offline
 
Join Date: Jan 2011
Posts: 59
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by excessive34 View Post
same here
no one replies on these boards unless it benefits them or what?

I have several places where posts have gone unanswered for weeks.
Reply With Quote
  #13  
Old 03-08-2011, 10:35 AM
d19rnyxx d19rnyxx is offline
 
Join Date: Dec 2010
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi Guys
I have a question that may annoy some of you, but I still can't figure it after alot of research.

How do you make Username's in postbit larger
Can anyone link me to a detailed tut or be kind enough to make one.
Reply With Quote
  #14  
Old 04-12-2012, 03:30 PM
Hikarin's Avatar
Hikarin Hikarin is offline
 
Join Date: Jun 2011
Location: Australia
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for the tips. I only changed the rank and avatar, but it looks great! =3
But in the user profiles, the rank image is still off to the left. Can someone give me the code to help me fix this?
Reply With Quote
  #15  
Old 04-13-2012, 12:45 PM
HHelp1's Avatar
HHelp1 HHelp1 is offline
 
Join Date: May 2011
Location: Florida
Posts: 275
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well as you could see this thread is no SUPPORT!
Reply With Quote
  #16  
Old 07-08-2014, 01:36 AM
ShawneyJ's Avatar
ShawneyJ ShawneyJ is offline
 
Join Date: Jul 2006
Location: Australia
Posts: 1,758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Better Late than Never. Sorry guys, but i do not use VB4, although i have added for those wanting boxed posts etc.

Quote:
Originally Posted by DJPushpu View Post
Its works on 4.02 ?
Yes

Quote:
Originally Posted by Kyojii View Post
Doesn't work on vB 4.0.8

doesn't center Posts, Rank, and Join Date.
Anyone else having this issue?

Quote:
Originally Posted by StagKill View Post
I am using the iTrader plugin, how do I center the feedback in that?
You can no longer Center Posts etc, the code has changed in VB4.2.2. I cant seem to figure out how to do this with limited time.

Quote:
Originally Posted by RobbieZ View Post
The MOODS placement on postbit are called from their own template not from your descriptive css im afraid!
Do your research.

Quote:
Originally Posted by ET 7 View Post
how did you put the texts such as "posts" "location" inside a white box? I have been trying to figure that out for weeks
Added a How To for those that want this.
Reply With Quote
  #17  
Old 08-06-2014, 12:00 AM
kiD16's Avatar
kiD16 kiD16 is offline
 
Join Date: Nov 2013
Location: Romania
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have 4.2.2 and it doesn't work
Reply With Quote
  #18  
Old 08-06-2014, 01:42 AM
ShawneyJ's Avatar
ShawneyJ ShawneyJ is offline
 
Join Date: Jul 2006
Location: Australia
Posts: 1,758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kiD16 View Post
I have 4.2.2 and it doesn't work
no much info here.
center of avatars etc? or wrap box?
have you tested on a vb default skin or custom skin?

EDIT: seen your home page forum uses this skin?
https://vborg.vbsupport.ru/showthread.php?t=284499

Test Cap.
Attached Images
File Type: jpg test.JPG (12.1 KB, 0 views)
Reply With Quote
  #19  
Old 08-06-2014, 01:32 PM
DR-WoWo DR-WoWo is offline
 
Join Date: Dec 2013
Posts: 23
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have worked all that has been explained in your topic, but something did not happen

on
vBulletin 4.2.0

and i tested on a vb default skin
Reply With Quote
  #20  
Old 08-06-2014, 10:45 PM
ShawneyJ's Avatar
ShawneyJ ShawneyJ is offline
 
Join Date: Jul 2006
Location: Australia
Posts: 1,758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by DR-WoWo View Post
I have worked all that has been explained in your topic, but something did not happen

on
vBulletin 4.2.0

and i tested on a vb default skin
Im not sure what that "something did not happen" is. Or which of the 2 you are having issues with.

All i can think of, is the wrapping of posts code needs to be around the whole code like this:
Code:
<div class="post_field"><dt>{vb:rawphrase posts}</dt> <dd>{vb:raw post.posts}</dd></div>
Other than that, i tested with FF, IE and Chrome. Everything seems fine mate. Could be a none English issue, or you have a very customized post bit, and or conflict with another edit. Im really unsure. Sorry about that.

Just went through my steps in first post with the skin you're are using. Works fine.
Attached Images
File Type: jpg screen2.jpg (24.6 KB, 0 views)
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:31 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07499 seconds
  • Memory Usage 2,346KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (12)bbcode_code
  • (8)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (2)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (3)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete