CS Nuggets

This blog is for addons, bugs, fixes, and issues pertaining to Community Server.

CS: Deleting Forum Posts from the Database

When you delete a forum post, it doesn't actually get deleted from the database.  It gets moved to the "Deleted Posts" forum in the "Administrators" group.  By default, this forum will hold posts until they have not been viewed for 90 days and then the "Autodelete" feature physically removes the post from the database.  If you have a very large community, you may want to enable the "Autodelete" feature on each of your forums.

To do this, set the "Enable Post Autodelete" and "Auto-Delete Time Window" settings for each forum.  By default, the "Enable Post Autodelete" setting is turned off and "Auto-Delete Time Window" is set to 90 days.  If you turn it on, it will automatically delete posts from the database that have not been viewed within the past 90 days.  Setting the "Auto-Delete Time Window" to 0 will cause the post to be deleted from the database immediately after it is added/moved to that forum.

Here is a little trick you can use too.  Create a new forum in the "Administrators" group, name it something like "DELETE PERMANENTLY", restrict the rights on that forum to yourself and anyone else you trust, set "Enable Post Autodelete" to "Yes", and set "Auto-Delete Time Window" to either 0 (deletes immediately) or 1 (deletes after 1 day).  Move the posts that you want permanently deleted into this forum.  If you set it to 0 days, the post will be deleted immediately.  If you set it to 1 day, it will be deleted the next day.

Leave a Comment

(required) 

(required) 

(optional)

(required)