Template editing
4 posters
Page 1 of 1
Template editing
Hey, I need some assistance with editing the template viewtopic_body.
I need this to be modified so that the poster name, rank, avatar, and rank image, stays centered, but the profile fields are all to the left. Can anyone give me the correct code for this, please?
<!-- BEGIN postrow -->
<!-- BEGIN displayed -->
<tr class="post">
<td class="{postrow.displayed.ROW_CLASS}"{postrow.displayed.THANK_BGCOLOR} valign="top" width="200" align="center">
<span class="name"><a name="{postrow.displayed.U_POST_ID}"></a><strong>{postrow.displayed.POSTER_NAME}<br>{postrow.displayed.POSTER_RANK}<br></strong></span>
<span class="postdetails poster-profile">
<br>{postrow.displayed.POSTER_AVATAR}<br><br>{postrow.displayed.RANK_IMAGE}<br>
<!-- BEGIN profile_field -->
{postrow.displayed.profile_field.LABEL}{postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
<!-- END profile_field -->
{postrow.displayed.POSTER_RPG}
</span><br />
<img src="https://2img.net/i/empty.gif" alt="" style="width:150px;height:1px" />
</td>
I need this to be modified so that the poster name, rank, avatar, and rank image, stays centered, but the profile fields are all to the left. Can anyone give me the correct code for this, please?
LasTemptation- Forumember
- Posts : 50
Reputation : 0
Language : English
Location : United States
Re: Template editing
Hello,
Can you tell me what version are you using? phpBB2 or punBB?
Can you tell me what version are you using? phpBB2 or punBB?
ankillien- Energetic
- Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL
Re: Template editing
Oh, phpBB2. Sorry about that.
LasTemptation- Forumember
- Posts : 50
Reputation : 0
Language : English
Location : United States
Re: Template editing
So.. can anyone help me out? Dx
LasTemptation- Forumember
- Posts : 50
Reputation : 0
Language : English
Location : United States
Re: Template editing
Try adding this code to your CSS...
- Code:
.post td[width="200"] {
text-align : center !important;
}
ankillien- Energetic
- Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL
Re: Template editing
Nope.. didn't work.
You notice here,
That code in the template centers everything in the miniprofile. I tried to add a new "td class" in under what I wanted centered, and make that align=left, but that actually severely messed up the forum so I had to remove it. So I'm stumped on how to do that..
You notice here,
<td class="{postrow.displayed.ROW_CLASS}"{postrow.displayed.THANK_BGCOLOR} valign="top" width="200" align="center">
That code in the template centers everything in the miniprofile. I tried to add a new "td class" in under what I wanted centered, and make that align=left, but that actually severely messed up the forum so I had to remove it. So I'm stumped on how to do that..
LasTemptation- Forumember
- Posts : 50
Reputation : 0
Language : English
Location : United States
Re: Template editing
Centering the <td> will center the whole post profile.
You can add a <div> tag to center align the name, avatar and rank only.
Your template code should look like this...
You can add a <div> tag to center align the name, avatar and rank only.
Your template code should look like this...
<tr class="post">
<td class="{postrow.displayed.ROW_CLASS}"{postrow.displayed.THANK_BGCOLOR} valign="top" width="150">
<div align="center"><span class="name"><a name="{postrow.displayed.U_POST_ID}"></a><strong>{postrow.displayed.POSTER_NAME}</strong></span><br />
<span class="postdetails poster-profile">
{postrow.displayed.POSTER_RANK}<br />
{postrow.displayed.RANK_IMAGE}{postrow.displayed.POSTER_AVATAR}<br /><br /></div>
<!-- BEGIN profile_field -->
ankillien- Energetic
- Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL
Re: Template editing
Its hard for me to understand can some1 explain how to create a script? PLEASE!!
------------------
Pallet Racking
Fitflop Boots
------------------
Pallet Racking
Fitflop Boots
Last edited by lsprix on July 17th 2010, 10:22 am; edited 1 time in total
lsprix- New Member
- Posts : 1
Reputation : 0
Language : english
Re: Template editing
lsprix wrote:Its hard for me to understand can some1 explain how to create a script? PLEASE!!
Hello,
To crate a script of your own, you need to learn HTML and CSS coding.
You can learn here : http://w3schools.com
ankillien- Energetic
- Posts : 5198
Reputation : 129
Language : English, XHTML, CSS, JS, PHP, SQL
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum