Post count : how can I meddle with what's counted
-
Hello !
Here's my question : I'd like to know if it's possible (through the acp, a plugin or something) to ignore some categories in the post count that's displayed on people's profiles.
I'd prefer it if the posts made in the administration zone of my forum didn't appear in the stats, so I can keep track of the actual public activity on my forum.
Can anyone help with that ? -
Since this topic was active?
Ah, it seems we're no longer just blindly incrementing the post count, but recalculating it based on the user's actual posts...
Users.updatePostCount();
It doesn't fire off any hooks, but if you want to exclude certain categories we could theoretically add a hook in here for you to consume, and adjust the post count.
-
Just FYI on the user profile page the count only shows what you can actually see. https://github.com/NodeBB/NodeBB/blob/master/src/controllers/accounts/helpers.js#L154-L156 So if the user has posts in a hidden category those won't show up in the count if you don't have access to that category.