MyBB Community Forums

Full Version: Center align Posts in Index
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I want to center align the 'Last Post' writing and the last post made. How do I do that? Which file do I have to modify and what would be the modification?

Here's a screenshot marked with red, which I want center aligned.
Post the contents of these templates (they're all under Forum Bit Templates).

forumbit_depth1_cat
forumbit_depth2_cat
forumbit_depth2_forum
As faviouz said, post contents of them.
forumbit_depth1_cat

<div id="tabmenu_{$forum['fid']}">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead" colspan="5">
<div class="expcolimage" style="height:0; margin:0 ;">&nbsp;<img src="{$theme['imgdir']}/{$expcolimage}" id="cat_{$forum['fid']}_img" class="expander" alt="{$expaltext}" title="{$expaltext}" /></div>
<div><strong><a href="{$forum_url}">{$forum['name']}</a></strong><br /><div class="smalltext">{$forum['description']}</div></div>
</td>
</tr>
</thead>
<tbody style="{$expdisplay}" id="cat_{$forum['fid']}_e">
<tr>
<td class="tcat" colspan="2"><span class="smalltext"><strong>&nbsp;{$lang->forumbit_forum}</strong></span></td>
<td class="tcat" width="85" align="right" style="white-space: nowrap"><span class="smalltext"><strong>Stats</strong></span></td>
<td class="tcat" width="200" align="left"><span class="smalltext"><strong>{$lang->forumbit_lastpost}</strong></span></td>
</tr>
{$sub_forums}
</tbody>
</table>
</div>


forumbit_depth2_cat

<tr>
<td class="tcat" colspan="2"><span class="smalltext"><strong>&nbsp;{$lang->forumbit_forum}</strong></span></td>
<td class="tcat" width="85" align="right" style="white-space: nowrap"><span class="smalltext"><strong>Stats</strong></span></td>
<td class="tcat" width="200" align="left"><span class="smalltext"><strong>{$lang->forumbit_lastpost}</strong></span></td>
</tr>


forumbit_depth2_forum

<tr>
<td class="{$bgcolor}" valign="center" align="left" style="white-space: norwap" width="10px"></td>
<td class="{$bgcolor}" valign="top">
<strong><a href="{$forum_url}">{$forum['name']}</a></strong><img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" style="margin-left: 3px; margin-top: 1px;" />{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
</td>
<td class="{$bgcolor}" valign="center" align="right" style="white-space: nowrap">{$posts} posts {$unapproved['unapproved_posts']}<br />{$threads} threads {$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor}" valign="center" align="left" style="white-space: nowrap">{$lastpost}</td>
</tr>
Replace forumbit_depth1_cat with:

<div id="tabmenu_{$forum['fid']}">
<table border="0" cellspacing="{$theme['borderwidth']}" cellpadding="{$theme['tablespace']}" class="tborder">
<thead>
<tr>
<td class="thead" colspan="5">
<div class="expcolimage" style="height:0; margin:0 ;">&nbsp;<img src="{$theme['imgdir']}/{$expcolimage}" id="cat_{$forum['fid']}_img" class="expander" alt="{$expaltext}" title="{$expaltext}" /></div>
<div><strong><a href="{$forum_url}">{$forum['name']}</a></strong><br /><div class="smalltext">{$forum['description']}</div></div>
</td>
</tr>
</thead>
<tbody style="{$expdisplay}" id="cat_{$forum['fid']}_e">
<tr>
<td class="tcat" colspan="2"><span class="smalltext"><strong>&nbsp;{$lang->forumbit_forum}</strong></span></td>
<td class="tcat" width="85" align="right" style="white-space: nowrap"><span class="smalltext"><strong>Stats</strong></span></td>
<td class="tcat" width="200" align="center"><span class="smalltext"><strong>{$lang->forumbit_lastpost}</strong></span></td>
</tr>
{$sub_forums}
</tbody>
</table>
</div>

Replace forumbit_depth2_cat with:

<tr>
<td class="tcat" colspan="2"><span class="smalltext"><strong>&nbsp;{$lang->forumbit_forum}</strong></span></td>
<td class="tcat" width="85" align="right" style="white-space: nowrap"><span class="smalltext"><strong>Stats</strong></span></td>
<td class="tcat" width="200" align="center"><span class="smalltext"><strong>{$lang->forumbit_lastpost}</strong></span></td>
</tr>

Replace forumbit_depth2_forum with:

<tr>
<td class="{$bgcolor}" valign="center" align="left" style="white-space: norwap" width="10px"></td>
<td class="{$bgcolor}" valign="top">
<strong><a href="{$forum_url}">{$forum['name']}</a></strong><img src="{$theme['imgdir']}/{$lightbulb['folder']}.gif" alt="{$lightbulb['altonoff']}" title="{$lightbulb['altonoff']}" class="ajax_mark_read" id="mark_read_{$forum['fid']}" style="margin-left: 3px; margin-top: 1px;" />{$forum_viewers_text}<div class="smalltext">{$forum['description']}{$modlist}{$subforums}</div>
</td>
<td class="{$bgcolor}" valign="center" align="right" style="white-space: nowrap">{$posts} posts {$unapproved['unapproved_posts']}<br />{$threads} threads {$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor}" valign="center" align="center" style="white-space: nowrap">{$lastpost}</td>
</tr>
Thanks! Worked like a charm! Smile

I also figured out the areas to edit, which means I learnt how to do it. Big Grin