Advertisement:

Author Topic: [TIP/TRICK] How to include "Recycled" topics and posts into the Statistics  (Read 3874 times)

Offline Pyrhel

  • Semi-Newbie
  • *
  • Posts: 92
    • FordBG.com
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:
Code: [Select]
case 'topic':
In the "else" clause, you will see:
Code: [Select]
'recycle_board' => !empty($modSettings['recycle_board']) ? $modSettings['recycle_board'] : 0,
Replace that line with:
Code: [Select]
// 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:
Code: [Select]
case 'message':
In the "else" clause you'll find:
Code: [Select]
'recycle_board' => isset($modSettings['recycle_board']) ? $modSettings['recycle_board'] : 0,
Replace that line with:
Code: [Select]
// Include the messages from the Recycle board to the stats
//'recycle_board' => isset($modSettings['recycle_board']) ? $modSettings['recycle_board'] : 0,
'recycle_board' => 0,

Offline Bigguy

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,995
  • Gender: Male
  • Be nice, or else....
    • smfbigguy on GitHub
    • What's Ur Beef
That's a nice little trick there. Thanks for posting.