Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Thema gestartet von: Pyrhel in Januar 03, 2016, 07:22:43 VORMITTAG

Titel: [TIP/TRICK] How to include "Recycled" topics and posts into the Statistics
Beitrag von: Pyrhel in Januar 03, 2016, 07:22:43 VORMITTAG
By default, SMF does not include deleted posts and topics into the statistics page (?action=stats), nor to the bottom of the forum. In my forum for almost 3 years we deleted more than 4000 posts and 1000 topics. I wanted to include them into the full stats, so I have to do two little changes.

If you want to include the deleted topics to the stats:
Open Sources/Subs.php and find:
case 'topic':

In the "else" clause, you will see:
'recycle_board' => !empty($modSettings['recycle_board']) ? $modSettings['recycle_board'] : 0,

Replace that line with:
// Include the topics from the Recycle board to the stats
//'recycle_board' => !empty($modSettings['recycle_board']) ? $modSettings['recycle_board'] : 0,
'recycle_board' => 0,





In case you want to add the deleted posts to the stats, in the same file search for:
case 'message':

In the "else" clause you'll find:
'recycle_board' => isset($modSettings['recycle_board']) ? $modSettings['recycle_board'] : 0,

Replace that line with:
// Include the messages from the Recycle board to the stats
//'recycle_board' => isset($modSettings['recycle_board']) ? $modSettings['recycle_board'] : 0,
'recycle_board' => 0,
Titel: Re: [TIP/TRICK] How to include "Recycled" topics and posts into the Statistics
Beitrag von: Bigguy in Januar 14, 2016, 06:51:29 NACHMITTAGS
That's a nice little trick there. Thanks for posting.