PDA

View Full Version : Centering Post bit



Alexz0r
17-07-2008, 03:37 AM
How do I do that, Which template do I edit, which part do I put the center tags in?

thanks.

Alexz0r
17-07-2008, 06:45 AM
buuump

Favourtism
17-07-2008, 02:01 PM
It depends if your posbit is vertical or horizontal. Tell me which

Alexz0r
17-07-2008, 04:34 PM
Vertical :P

today
19-07-2008, 11:43 AM
http://www.yf4l.com/images/favourtism/center_postbit_logo.png




This tutorial will help you learn how to center the postbit.


Example:


http://uploadpicz.com/images/JWW3KUC.png

Username
Find the following code

<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>And change it to


<center><a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a></center>
Usertitle
Find the following code

<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
And change it to


<center><if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if></center>
Avatar
Find the following code


<if condition="$show['avatar']">
<div class="smallfont">
&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if>and change it to


<center><if condition="$show['avatar']">
<div class="smallfont">
&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if></center>
Stats

Find the following code


<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
$template_hook[postbit_userinfo_right_after_posts]
<if condition="$show['infraction']"><div>$vbphrase: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
$template_hook[postbit_userinfo_right]
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div>
and change it to


<center><if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
$template_hook[postbit_userinfo_right_after_posts]
<if condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
$template_hook[postbit_userinfo_right]
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div></center>
Notes
If a user has not filled in the field, then nothing will appear there. If the user has filled in the profile field, then an image of their Habbo shall be there which also links to their Habbo Home.

If you want it to be compulsory for a user to have their Habbo then simply choose 'Yes' under 'Field Required' then adding the Profile Field.

You can change the way the habbo is facing etc by altering the img src links numbers, such as changing the 'head_direction=2' to 'head_direction=1'.

You can center the Habbo Image by putting a <center> tag at the begining of the code and a </center> tag at the end.

You can put the code anywhere you want in the postbit however, this tutorial puts it below the stats (join date, rep etc).



__________________________________________________ ___


Please note that this tutorial is designed to work with postbit_legacy and may not work with the normal postbit. To change your posbit to legacy, see below.



+ How do I change my postbit so it is horizontal or vertical?
- Open up your Administrator Contol Panel and select Vbulletin Options. Then select Style and Language Settings which will bring you to a list of options. Then you can select 'Yes' in order to have your postbit vertical or 'No' to have your postbit horizontal. Note that some of the things in this tutorial may not work for the horizontal template and that they have only been tested on the Legacy Templates.


http://uploadpicz.com/images/9FKMFGZ.png


__________________________________________________ ___



[I]Notice:
This tutorial was based upon the default vBulletin Style without any modified templates or coding, we cannot promise all coding will be the same if the templates on your styles are already modified in anyway due to the coding may not be the same thus the coding we supply you with to find may already be removed. If this is the case then you may be best to revert your template. If you have any problems with this tutorial then please private message the creator. The tutorial was written specially for yf4l.com only.

Favourtism
19-07-2008, 02:18 PM
Was debating whether to post that or not :p

edit: the notes part was from a dif tut lol

Alexz0r
19-07-2008, 05:09 PM
Thanks, I haven't tried it but it looks promising :P :)

Snex
19-07-2008, 08:50 PM
http://www.yf4l.com/images/favourtism/center_postbit_logo.png




This tutorial will help you learn how to center the postbit.


Example:


http://uploadpicz.com/images/JWW3KUC.png

Username
Find the following code

<a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a>And change it to


<center><a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a></center>
Usertitle
Find the following code

<if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if>
And change it to


<center><if condition="$post['usertitle']"><div class="smallfont">$post[usertitle]</div></if></center>
Avatar
Find the following code


<if condition="$show['avatar']">
<div class="smallfont">
&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if>and change it to


<center><if condition="$show['avatar']">
<div class="smallfont">
&nbsp;<br /><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a>
</div>
</if></center>
Stats

Find the following code


<if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
$template_hook[postbit_userinfo_right_after_posts]
<if condition="$show['infraction']"><div>$vbphrase: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
$template_hook[postbit_userinfo_right]
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div>
and change it to


<center><if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if>
<if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if>
<if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if>
<div>
$vbphrase[posts]: $post[posts]
</div>
$template_hook[postbit_userinfo_right_after_posts]
<if condition="$show['infraction']"><div>$vbphrase[infractions]: $post[warnings]/$post[infractions] ($post[ipoints])</div></if>
<if condition="$show['reputation']"><div><if condition="$show['reppower']">$vbphrase[reppower]: <span id="reppower_$post[postid]_$post[userid]">$post[reppower]</span> </if><span id="repdisplay_$post[postid]_$post[userid]">$post[reputationdisplay]</span></div></if>
$template_hook[postbit_userinfo_right]
<div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div>
</div></center>
Notes
If a user has not filled in the field, then nothing will appear there. If the user has filled in the profile field, then an image of their Habbo shall be there which also links to their Habbo Home.

If you want it to be compulsory for a user to have their Habbo then simply choose 'Yes' under 'Field Required' then adding the Profile Field.

You can change the way the habbo is facing etc by altering the img src links numbers, such as changing the 'head_direction=2' to 'head_direction=1'.

You can center the Habbo Image by putting a <center> tag at the begining of the code and a </center> tag at the end.

You can put the code anywhere you want in the postbit however, this tutorial puts it below the stats (join date, rep etc).



__________________________________________________ ___


Please note that this tutorial is designed to work with postbit_legacy and may not work with the normal postbit. To change your posbit to legacy, see below.



+ How do I change my postbit so it is horizontal or vertical?
- Open up your Administrator Contol Panel and select Vbulletin Options. Then select Style and Language Settings which will bring you to a list of options. Then you can select 'Yes' in order to have your postbit vertical or 'No' to have your postbit horizontal. Note that some of the things in this tutorial may not work for the horizontal template and that they have only been tested on the Legacy Templates.


http://uploadpicz.com/images/9FKMFGZ.png


__________________________________________________ ___



[I]Notice:
This tutorial was based upon the default vBulletin Style without any modified templates or coding, we cannot promise all coding will be the same if the templates on your styles are already modified in anyway due to the coding may not be the same thus the coding we supply you with to find may already be removed. If this is the case then you may be best to revert your template. If you have any problems with this tutorial then please private message the creator. The tutorial was written specially for yf4l.com only.

If you want to center the whole of the postbit

Find:

<td class="alt2" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px">

and change it to:

<td class="alt2" align="center" width="175" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px; border-bottom: 0px">

It's both much quicker and is CSS valid instead of making about 5 edits which you are told to do above.

- Snex.

today
19-07-2008, 10:01 PM
I simply copied & pasted :)

Snex
19-07-2008, 10:10 PM
I simply copied & pasted :)
No problem, it was just for the sites future reference and anyone who wants to do it as it's much quicker my way.

Favourtism
20-07-2008, 04:26 PM
There are certain aspects of the postbit which look better without being centered imo which is why mines like that.

Alexz0r
20-07-2008, 07:25 PM
k now, it didn't center the icons like the rep, ip, report ect. how do I do that, I used Snex's code for this?

Snex
20-07-2008, 08:53 PM
k now, it didn't center the icons like the rep, ip, report ect. how do I do that, I used Snex's code for this?


<td class="alt2" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">

Change to:


<td class="alt2" align="center" style="border: $stylevar[cellspacing]px solid $stylevar[tborder_bgcolor]; border-top: 0px">

Fehm
29-07-2008, 02:05 PM
Today, thats an awesome tutorial ^^ thanks for posting its helped me out to!

Want to hide these adverts? Register an account for free!