When a user creates an post and it is deleted by a moderator, the number remains in his profile.
When a user creates an post and it is deleted by a moderator, the number remains in his profile.
This number is historic and trying to keep it always accurate would require a lot of extra development for little gain.
Content lists on user profiles will eventually be moved to cursor-based pagination (if they aren't already) which desn't count items either.
It could be a simple post counter for mysql table.
"Simple post counter" becomes costful as your forum grows, especially on profiles of top users who have thousands of posts. This is because user's posts COUNT(*)
is greedy, it tries to find as much data as possible, and to be accurate you would need to exclude user's posts invisible to person viewing the profile. So in practice, on forum with more than few thousand posts, COUNT would have to do multiple IO operations on indexes to find out the number of posts. This CPU and disk time would better be spent handling posts and threads queries.
Also, Misago uses PostgreSQL, not MySQL ;)
@rafalp Sorry to worry about this, but a real counter would be needed. He said it was a small profit.
Transparency and credibility, as well as Motivation and recognition.
Profiles with real counters can be more transparent and authentic to users. Due to the hiding of deleted or moderated content, it becomes more difficult to judge the true activity and contribution of profiles. People are usually motivated to create content when they can see how many posts have been shared on a social platform. The real counter recognizes the efforts of users and their commitment to the community.
I understand that it results in high CPU and disk time and you are right. But if someone wants to gain recognition with this and has to intervene with moderation, then the many "stupidities" he has written so far with this and even falsifying the statistics will remain.
I'm not asking for an entire table to be updated every time a post is created. I thought of a button on the administrator tab for synchronization (Or even checked only for selected users.), which checks the table and synchronizes the statistics, even warning that this involves high performance usage.
Ok, lets start with this: what are other forum softwares (Invision, XenForo, phpBB3, MyBB) doing here? What they do to users posts counters when their posts are deleted?
I think that for every new and deleted post, the elements in the post table are counted for the user that belongs to it. But they don't have drastic performance degradation. At least I didn't notice.
I actually think the opposite is true. So who's right there? :D
Or maybe you just add a value to the profile for each new post and lose it when it's deleted.
No. I first want to establish what's the industry standard here.
Invision Community: doesn't recount user posts when their posts are deleted. There's also no UI to see accurate number of posts for user on their profile. And the post counter is not associated with list of their posts - maybe thats how they are avoiding people spotting that counter is inaccurate when posts counter says they have 3 posts, but their posts and threads tabs are empty?
phpBB3: don't see post counter update in their moderation actions code.
Also, do your users know about the Top posters page? That one is always accurate for ranked posts, but its only updated every 24h.
"x best poster from last 30 days." that this will remain for 30 days, and the person who cheats with the activity will also remain here for 30 days, (or not?) by cheating I mean spamming.
If they spam and you delete the posts, they will drop out of ranking. And AFAIR there's an option to exclude selected categories from ranking anyway.