Dynamic Board Stats
Author Message
By default, the total number of posts and threads displayed in the footer of the index page, and the stats.php page is "static" (same for all users).
This plugin will adjust the statistics depends on the user's permissions.  For example, if you have two forums, first one with 10 posts and the second one, which the user cannot see, with 5 posts, the default behaviour will say that there's 15 posts on the board, whereas, with this plugin, it will say 10 posts.

Note that users' post counts aren't affected by this plugin, so in the above example, if only one user made all 15 posts, their post count will still be 15.
(This post was last modified: 12-09-2014 04:48 PM by ZiNgA BuRgA.)
Find all posts by this user
Quote this message in a reply
Download: dynamicstats.php (1.87 KB)
Plugin Version: 1.2
Last Updated: 03-27-2010, 04:00 PM

Downloads: 1,085
MyBB Compatibility: 1.2.x, 1.4.x, 1.6.x, 1.8.x
Plugin License: WTFPLv2
Uploader: ZiNgA BuRgA
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #11
RE: Dynamic Board Stats
Similar != same.
This plugin is based on what users can view.  XThreads is defined by the admin, regardless of what the user can see.
Note that there isn't actually any exclusion, so it is possible for the two counts to conflict.

My Blog
(This post was last modified: 06-26-2012 11:04 AM by ZiNgA BuRgA.)
06-26-2012 11:02 AM
Find all posts by this user Quote this message in a reply
Sama34 Offline
Senior Member
****
Posts: 490
Joined: May 2011
Post: #12
RE: Dynamic Board Stats
I tried to read your code in xThreads to see if it was the same feature, but your code is too advanced for me, to be honest.

I just feel like asking to see I could remove one extra query.

I suppose xThreads just removes forums from the search feature using the "Count posts in stats" setting it provides for each forum.

Thanks for the reply.

Support PM's will be ignored. Yipi
Plugins: Announcement Bars - Custom Reputation - Mark PM As Unread
06-26-2012 11:39 AM
Visit this user's website Find all posts by this user Quote this message in a reply
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #13
RE: Dynamic Board Stats
(06-26-2012 11:39 AM)Sama34 Wrote:  I tried to read your code in xThreads to see if it was the same feature, but your code is too advanced for me, to be honest.
Actually, it's probably me being too lazy to make it readable.
Most of my code, you'll probably find, is just messy like that.

(06-26-2012 11:39 AM)Sama34 Wrote:  I just feel like asking to see I could remove one extra query.

I suppose xThreads just removes forums from the search feature using the "Count posts in stats" setting it provides for each forum.
Oh I see.  Yeah, that's pretty much it.  If you don't use that feature anywhere, XThreads won't query - it only needs it for the forum counters.

My Blog
06-26-2012 04:52 PM
Find all posts by this user Quote this message in a reply


Forum Jump: