[TIP/TRICK] How to include "Recycled" topics and posts into the Statistics

Started by Pyrhel, January 03, 2016, 07:22:43 AM

Previous topic - Next topic

Pyrhel

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,

Bigguy


Advertisement: