Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

the number of deleted posts

edited December 2011 in Vanilla 2.0 - 2.8

does not change the number of deleted messages, message members.


  • Options

    I have also realised this, it takes into account the amount of times you have posted something but does not subtract anything that has been deleted. That is simply how the plugin works and if there is anything in the db that counts amount of deleted messages then should be an easy fix. (I might go have a look)

  • Options

    thanks to you. i am waiting

  • Options

    It seems in gdn_comment there is a datedeleted, which we could use to check if not NULL (meaning it has been deleted) to subtract one (1) of his posts.
    However, I could not find the same in gdn_discussion.

  • Options

    hmmm what can i do :S

  • Options

    Seriously calculating anything like this on the fly is a waste of resources. If you consider this count really important then you need to check you priorities.

    That is why you have a tally, if you want to take into account deleted comment then you need to hook the deletion.

    That wouldn't take into account what what has already been deleted then.

    You can create a monster query with groupby and sum, and as script or more complicated quering to make the subtraction.

    That's all the help I'm giving.

    grep is your friend.

  • Options
    AoleeAolee Hobbyist & Coder ✭✭
    edited January 2012

    hi guys, sorry just got back from my US vacation.

    try these sql , put it in a php and cron it

    `Update GDN_User g set CountDiscussions = (select count(*) FROM GDN_Discussion WHERE InsertUserID = g.UserID);

    Update GDN_User g set CountComments= (select count(*) FROM GDN_Comment WHERE InsertUserID = g.UserID);

    that's the best i can suggest.

    but just my opinion, deleted post should still be counted a post. because it was posted and was just deleted for a reason. so by right the user had posted something from a particular time. i hope you get what i mean.

Sign In or Register to comment.