January 31, 2005

Closing Comments

Someone probably already told everyone about this, but meh, here it is again anyway.

I know there was an earlier post about closing old threads because of spam, and since I often get hammered by spam I was all for it but didn't know how. So I did some searching and found that it can be done either with little plugins/program thingies, or with a (blessidly) simple code.

By using the appropriate code you can control when the comments will close automatically:

Close comments for posts more than 21 days old.
MTCloseComments old="21"

Close comments for posts that are too old to appear on the main index.

MTCloseComments

Close comments for posts that are not on the front page and have been inactive for at least three days.

MTCloseComments inactive="3"

Close comments for posts at least 7 days old and inactive for three or more days.

MTCloseComments old="7" inactive="3"/center>

(Remember to ad the <'s and >'s to the tags)

It gets placed right before "/MTEntryIfAllowComments" tag and seems to work well. Personally I'm just going to use the first one and not worry about the inactive stuff.

I will admit that it has its drawbacks because I know I still have a few threads that get googled sometimes and people leave comments, but I'd personally rather loose the comments then deal with the spam. I'd call it a fair trade.

I found it here.

Posted by Mookie at January 31, 2005 08:07 PM
Comments
#1

That's one of the best tips I've seen in a while. Thanks for sharing!

Posted by CD at February 1, 2005 04:21 AM
#2

I'm confused. In which template do you put it? The main template? It gets activated when the main template is updated?

Posted by David Boxenhorn at February 8, 2005 10:36 AM
#3

Okay, I couldn't get the main-page feature to work, but here's the documentation.

Posted by David Boxenhorn at February 8, 2005 01:42 PM
Live Comment Preview
Post a comment









Remember personal info?