MyBB Community Forums

Full Version: Merge threads and posts into one column on Index
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I don't think there's a tutorial on here for this, so since I already typed it out in response to a support question I thought I'd do a bit of copy and paste and create a new thread for the tutorials section.

The following will merge the threads and posts columns on your forum index into one column instead of two.

[attachment=18570]

Tutorial

Go to ACP >> Templates & Style >> Templates >> *Your Theme* Templates

Edit the following:-

forumbit_depth1_cat
Find:
<td class="tcat" width="85" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}</strong></span></td>
<td class="tcat" width="85" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_posts}</strong></span></td>

Replace with:
<td class="tcat" width="85" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}/{$lang->forumbit_posts}</strong></span></td>

forumbit_depth2_cat
Find:
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>

Replace with:
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">Threads: {$threads}{$unapproved['unapproved_threads']}<br />Posts: {$posts}{$unapproved['unapproved_posts']}</td>

forumbit_depth2_forum
Find:
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>

Replace with:
<td class="{$bgcolor}" valign="top" align="center" style="white-space: nowrap">Threads: {$threads}{$unapproved['unapproved_threads']}<br />Posts: {$posts}{$unapproved['unapproved_posts']}</td>

forumdisplay_subforums
Find:
<td class="tcat" width="7%" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}</strong></span></td>
<td class="tcat" width="7%" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_posts}</strong></span></td>

Replace with:
<td class="tcat" width="14%" align="center" style="white-space: nowrap"><span class="smalltext"><strong>{$lang->forumbit_threads}/{$lang->forumbit_posts}</strong></span></td>

I've done this from memory so if there's anything missing or not 100% accurate please let me know so I can change it. Wink
Any screenshots~?
Demo: http://petsmania.net/index.php

On topic: Thanks AJS.
What I've got on Pets Mania is a bit different from this, I've added a screenshot to the OP. Smile
VERY NICE. Thank you.
I can't find the lines you want me to replace...
(2014-01-21, 09:21 PM)chr9ped Wrote: [ -> ]I can't find the lines you want me to replace...

If you are referring to my post:
http://community.mybb.com/thread-150225-...pid1058261

then you have to make change in 2 places:
in 'forumbit_depth2_cat' & 'forumbit_depth2_forum' replace codes will be:

<td class="{$bgcolor}" valign="top" align="left" style="white-space: nowrap">Threads: {$threads}{$unapproved['unapproved_threads']}<br />Posts: {$posts}{$unapproved['unapproved_posts']}</td>
(2014-01-21, 10:07 PM)effone Wrote: [ -> ]
(2014-01-21, 09:21 PM)chr9ped Wrote: [ -> ]I can't find the lines you want me to replace...

If you are referring to my post:
http://community.mybb.com/thread-150225-...pid1058261

then you have to make change in 2 places:
in 'forumbit_depth2_cat' & 'forumbit_depth2_forum' replace codes will be:

<td class="{$bgcolor}" valign="top" align="left" style="white-space: nowrap">Threads: {$threads}{$unapproved['unapproved_threads']}<br />Posts: {$posts}{$unapproved['unapproved_posts']}</td>
I still can't make it work, idk what I am doing wrong. But when I try to replace it, it totally screws up my site :p
How changing only alignment can screw up site layout?

Make sure you have done the tutorial step by strp exactly and only replace the bold text ('left') as I've stated in two templates.
(2014-01-22, 02:17 PM)effone Wrote: [ -> ]How changing only alignment can screw up site layout?

Make sure you have done the tutorial step by strp exactly and only replace the bold text ('left') as I've stated in two templates.
The problem is that I can't find the codes that has to be replaced....