vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Show Thread Enhancements - center name, avatar ranking etc or add posts, join date etc inside a box (https://vborg.vbsupport.ru/showthread.php?t=247801)

ShawneyJ 08-01-2010 10:00 PM

center name, avatar ranking etc or add posts, join date etc inside a box
 
1 Attachment(s)
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.

COL NIL SATIS 08-02-2010 07:01 PM

cool....tagged !!!!!!!

kawe 08-06-2010 04:57 PM

why not work for me ?

DJPushpu 08-07-2010 12:48 PM

Its works on 4.02 ?

Kyojii 12-14-2010 08:53 PM

Doesn't work on vB 4.0.8

doesn't center Posts, Rank, and Join Date.

StagKill 12-21-2010 12:10 PM

I am using the iTrader plugin, how do I center the feedback in that?

RobbieZ 12-21-2010 01:40 PM

The MOODS placement on postbit are called from their own template not from your descriptive css im afraid!

ehsanix 01-15-2011 10:55 AM

thanx man
How do you like the first picture box, I mean this Category
https://vborg.vbsupport.ru/external/2011/02/4.jpg

ET 7 02-27-2011 12:23 AM

Quote:

Originally Posted by ehsanix (Post 2149406)
thanx man
How do you like the first picture box, I mean this Category
https://vborg.vbsupport.ru/attachmen...1&d=1280755199

how did you put the texts such as "posts" "location" inside a white box? I have been trying to figure that out for weeks

excessive34 03-04-2011 02:01 AM

Quote:

Originally Posted by ET 7 (Post 2167378)
how did you put the texts such as "posts" "location" inside a white box? I have been trying to figure that out for weeks

same here


All times are GMT. The time now is 07:02 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.01924 seconds
  • Memory Usage 1,751KB
  • 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
  • (11)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete