MyBB Community Forums

Full Version: Forum count thread/posts is not counting subforums
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
On my home page I have forums containing subforums. The subforums threads and posts are not being counted in the home page forums. There are no threads or posts in the top level forums only in the subforums, therefore everything on the home page says ZERO THREADS AND POSTS.

Here is the code for the template forumbit_depth2_forum which is from the Flatty theme.
I did not do any modification to this.

<tr>
<td class="{$bgcolor}" align="center" width="1"><div class="forum_status forum_{$lightbulb['folder']} ajax_mark_read" title="{$lightbulb['altonoff']}" id="mark_read_{$forum['fid']}"><i class="fa fa-comments"></i></div></td>
<td class="{$bgcolor}">
<a href="{$forum_url}" class="ttip">{$forum['name']}<br />
<span class="ttbg">{$lang->forumbit_threads}: {$threads}{$unapproved['unapproved_threads']} &nbsp;//&nbsp; {$lang->forumbit_posts}: {$posts}{$unapproved['unapproved_posts']}</span>
</a>
<span class="smalltext" style="font-weight: 400;">{$forum['description']}</span>{$forum_viewers_text}{$modlist}{$subforums}<br />
</td>
<td class="{$bgcolor} fb-pt" align="center" style="white-space: nowrap">{$threads}{$unapproved['unapproved_threads']}</td>
<td class="{$bgcolor} fb-pt" align="center" style="white-space: nowrap">{$posts}{$unapproved['unapproved_posts']}</td>
<td class="{$bgcolor}" align="right" style="white-space: nowrap;">{$lastpost}</td>
</tr>


As you see above, {$threads} and {$posts} is where it is outputting the total which is NOT including ANYTHING from any of the subforums.

How can I fix this critical major issue so that the forums display the TOTAL count which includes all the subforums?

Additionally, {$lastpost} is NOT getting anything at all but it needs to be getting the latest post from whichever subforums posted the last post.