Comments Closed After 30 Days

I've rewritten some basic code to close out comments after 30 days. As much as I love to hear from people, things that are over a month old tend to be stale topics, and I do like to try to respond to things as I can. I have a hard enough time remembering what I ate for lunch much less topics I covered so far back.

For those of you coming here for the code, you can find the zip file here. To add expiration to your comments, extract SaaM.dll and place it into the bin directory of your .Text application. Then open up PostComment.ascx in the skin directory that you are using (or all of them if you're like that). Change the first line to the following

<%@ Control Language="c#" AutoEventWireup="false" Inherits="SaaM.Web.UI.Controls.PostComment" %>

Then, in the <appSettings> section of web.config in the root .Text directory, add the following lines

-- Comment Expiration -->
<add key="ExpirationLimit" value="30" />

You can change this to any number of days you wish to close comments after.

The code for PostComment.cs is also included in case you wish to dingle with it yourself. These instructions are included in the zip file. Enjoy!


posted by by Robb Allen @
Comments have been closed on this topic.