Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 10 Years, 9 Months, 3 Weeks ago How to exclude specific forums from stats.php
#1
Solved: 10 Years, 9 Months, 3 Weeks ago
Is there a way to exclude specific forums from participating in stats.php?

In my board there are forums with content and chat forum and I'd like to exclude chat forum from showing up on stats.php, because stats.php right now looks like:

the most popular:
  • talk#1
  • talk#2
  • talk#3
  • talk#4

And this information is not very valuable..
#2
Solved: 10 Years, 9 Months, 3 Weeks ago
Go to AdminCP>Forums & Posts>"your forum option button">Edit Forum

Scroll down to "Miscellaneous Options" and uncheck:
Yes, posts in this forum should count towards user post counts
#3
Solved: 10 Years, 9 Months, 3 Weeks ago
That will not stop it showing on the stats.php page.

I think the only option here is to do a core edit:

In inc/class_datacache.php, around line 759 find:
$query = $db->simple_select("threads", "tid, subject, replies, fid", "visible='1'", array('order_by' => 'replies', 'order_dir' => 'DESC', 'limit_start' => 0, 'limit' => $mybb->settings['statslimit']));
and replace it with something like
$query = $db->simple_select("threads", "tid, subject, replies, fid", "visible='1' AND fid NOT IN (1,4,7)", array('order_by' => 'replies', 'order_dir' => 'DESC', 'limit_start' => 0, 'limit' => $mybb->settings['statslimit']));

Just replace the IN (1,4,7) part with the list of forun IDs you don't want it to get threads from.

I've not tested this, but in theory it should work.
#4
Solved: 10 Years, 9 Months, 3 Weeks ago
Thank you, everything works like a charm.
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)