MyBB Community Forums

Full Version: Forum replies instead of post
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So... I have noticed with a lot of forums & templates there is only post on the forumbit templates. What I mean is displayed below:

Post 
[Image: 83bf1bf2734bb580947a9915e987a2f8.png]

Replies
[Image: 4ad09373b7edbf5fcb721699dbc2d1d5.png]

To solve this problem I had found to switch from post to replies is a very weird one but it worked for me.

So first goto this location: AdminCP > Templates & Styles > Templates > (your theme's templates) > Forum bit Templates > forumbit_depth2_forum

Once you are there your code for post should look something like this:
<td class="{$bgcolor}" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>


That will show the number of post, the part I didn't like is that the number of post included threads and replies

Change the inner HTML of this tag from

This:
{$post}{#unapproved['unapproved_post']}


To This:
<b id="replies{$forum['fid']}"></b> Replies

This will make a tag with the ID corresponding to the forum it is on. Now put this code at the very bottom of the template.

<script>
var replies{$forum['fid']} = {$posts} - {$threads};
document.getElementById("replies{$forum['fid']}").innerHTML = replies{$forum['fid']};
</script>

This code will subtract the number of threads from the number of post and place it within the tag with the ID of replies(forumID). The final output should look something like this:
[Image: aaa5559e5553f59a232e574fd6518c65.png]


Sorry if this is mostly just me blabboring and no one feels the same about this as me.