Simple Machines Community Forum

Customizing SMF => SMF Coding Discussion => Topic started by: miiitchhh on November 04, 2012, 11:07:57 AM

Title: How can I remove/edit "Total topics" and "Total posts" for each forum
Post by: miiitchhh on November 04, 2012, 11:07:57 AM
Next to each forum on the front page theres the "post" and "topic" count of that forum.

Is there a way to remove this? Is there a way to edit it to display a false number?

Thanks!
LOVE the software, its way better than phpbb and much easier.

Mitch
Title: Re: How can I remove/edit "Total topics" and "Total posts" for each forum
Post by: kat on November 04, 2012, 01:12:58 PM
(http://www.katzy.dsl.pipex.com/SMF/welcome.gif)

I haven't checked this out. So, FFS, keep a copy of the original file, as a backup, in case this is crap, woncha? ;)

In the theme's directory, find the file BoardIndex.template.php.

In that file, find this block of code:

// Show some basic information about the number of posts, etc.
echo '
</td>
<td class="stats windowbg">
<p>', comma_format($board['posts']), ' ', $board['is_redirect'] ? $txt['redirects'] : $txt['posts'], ' <br />
', $board['is_redirect'] ? '' : comma_format($board['topics']) . ' ' . $txt['board_topics'], '
</p>
</td>
<td class="lastpost">';


and delete it.
Title: Re: How can I remove/edit "Total topics" and "Total posts" for each forum
Post by: Antechinus on November 04, 2012, 04:25:50 PM
You've got your tags wrong, K@.  You should only be deleting one table cell, not deleting the end tag for the preceding cell and the opening tag for the next cell as well.

Anyway, you can hide it just with CSS.

.table_list .stats {display: none;}
Title: Re: How can I remove/edit "Total topics" and "Total posts" for each forum
Post by: miiitchhh on November 04, 2012, 06:40:46 PM
Quote from: Antechinus on November 04, 2012, 04:25:50 PM
You've got your tags wrong, K@.  You should only be deleting one table cell, not deleting the end tag for the preceding cell and the opening tag for the next cell as well.

Anyway, you can hide it just with CSS.

.table_list .stats {display: none;}

awesome! what file do i find the .table_list.stats in?

nevermind! found it! YOU ROCK!
Title: Re: How can I remove/edit "Total topics" and "Total posts" for each forum
Post by: kat on November 05, 2012, 06:42:13 AM
I was close-ish. ;)

Ta, Ant. :)