'Uncounting' user posts retroactively from forums with post count disabled

Saeed

Well-known member
Hi guys. :)

As most of you would already know, 1.1 is shipping with the ability to disable post counts at a 'per forum' level. This may be useful for test and game forums. However, this function applies only to posts made after disabling them, and does not work retroactively.

I have seen many others asking this on the forums here, and am myself interested as well...so my question is, is it possible to 'uncount' posts made prior to disabling post counts in particular forums? Would this be possible by running any queries? Could this be done on a large scale?

Any help in this regard would be appreciated. :)
 
Yes, you could run a query that counts posts by users in a particular forum and subtracts that value from their post count, if you wanted to.
 
Thank you, Kier. :)

I believe that would mean that the subtraction would have to be done individually for every user. Could the query be run only once and count and output the post count of all users perhaps in the form of a table, from where the subtraction may be done manually one by one for the users?

Maybe someone could help with the exact query to run. I'm sorry, but they didn't really teach that in medical school. :oops:
 
It's going to be a tricky query as the xf_post table doesn't store node_id information, but it does store thread_id data.
Similarly, the xf_thread table stores node_id but no post_id.

So it will have to be a query between the xf_user, xf_post and xf_thread tables.

Where's Jake when you need him :D
 
Top Bottom