« Opening up my plugin code repository | Main | FreeBSD and Subversion »

December 27, 2003

Closing comments on old entries

Based on what Jeremy has worked up already, I have created a small little MT application that will close the entry to comments (and pings if you so desire) for any entries older than a given number of days (defaults to five).

So, download one of the following, unpack it, and place mt-close.cgi in your base MT directory. Be sure to set the permissions of the file so that it can be executed.

Then, to use it, just bring up http://your.mt.url/mt-directory/mt-close.cgi in your browser of choice.

Enjoy!

Update: (2003-12-27 12:10)

The bug Neil found is now fixed. Just download the script again.

Posted by rayners at December 27, 2003 12:11 AM

Trackback Pings

TrackBack URL for this entry:
http://mt.rayners.org/mt-tb.cgi/258

Listed below are links to weblogs that reference Closing comments on old entries:

» Autoclosing MT comments on older entries from Weblog Tools Collection
Jeremy has published perl code to autoclose comments for posts in Moveable Type that have grown old to prevent SPAM in those comments. Here is the link to the hack. Thank him of you use his code! There is another trackback entry in that blog which talk... [Read More]

Tracked on December 27, 2003 10:56 AM

» Closing comments en-masse from Neil's World
How to close comments on entries en-masse, without needing to use an SQL command. [Read More]

Tracked on December 27, 2003 12:22 PM

» Closing comments en-masse from Neil's World
How to close comments on entries en-masse, without needing to use an SQL command. [Read More]

Tracked on December 27, 2003 12:22 PM

» A Better Comment Spam Solution from Ramblings of a Code Monkey
David Raynes just posted a more elegant solution to closing comments than I could come up with. He has developed a CGI which will close entries for the specified number of days for the specified blog(s). While this is similar... [Read More]

Tracked on December 27, 2003 01:45 PM

» A Better Comment Spam Solution from Ramblings of a Code Monkey
David Raynes just posted a more elegant solution to closing comments than I could come up with. He has developed a CGI which will close entries for the specified number of days for the specified blog(s). While this is similar... [Read More]

Tracked on December 27, 2003 01:46 PM

» Plugin for Closing Comments on Older Entries in Movable Type from ETC. Indulging my inner geek
David Raynes: Closing comments on old entries. I'm going to take this one for a spin. When it comes to... [Read More]

Tracked on December 27, 2003 08:58 PM

» Closing Comments on old MT Posts from KevinDonahue.com
David Raynes has come up with yet another great plugin for MovableType. The MT-Close plugin allows you to go through your entire blog and close the entries older than "x" day. So, if you don't want people to comment on... [Read More]

Tracked on December 28, 2003 11:42 AM

» Geek day from When Knitting Was a Manly Art
Today turned into a geek out day. A couple rounds of the Dubblemossa and then decided to bite the bullet... [Read More]

Tracked on December 29, 2003 10:30 PM

» spam and more spam... from jenett.radio

Tracked on January 7, 2004 09:31 AM

» MT-Blacklist from Rover
Comment spam has been bugging me for some time. I've looked at some anti-comment spam solutions and have decided to go with MT-Blacklist at the moment... [Read More]

Tracked on January 10, 2004 11:20 AM

» Goodbye spam! from Mind of Knowledge
Stopped using MT Blacklist Comment Spam [Read More]

Tracked on January 12, 2004 03:41 PM

» Goodbye spam! from Mind of Knowledge
Stopped using MT Blacklist Comment Spam [Read More]

Tracked on January 12, 2004 03:44 PM

» Closing Comments Automatically from Mind of Knowledge
David Raynes: Closing comments on old entries... [Read More]

Tracked on January 12, 2004 03:47 PM

» MT Comment Help from Burningbird
Edited I'm not starting up Burningbird but a lot of good people were hit badly by a very sophisticated comment spam attack, including the Wayward webloggers who I'm responsible to. The attackers this time only posted three comments to each post, each w... [Read More]

Tracked on January 13, 2004 09:09 AM

» MT Comment Help from Burningbird
Edited I'm not starting up Burningbird but a lot of good people were hit badly by a very sophisticated comment spam attack, including the Wayward webloggers who I'm responsible to. The attackers this time only posted three comments to each post, each w... [Read More]

Tracked on January 13, 2004 10:02 AM

» Comments on Comment Spam from LibraryPlanet.com
I haven’t commented on Comment Spam for some time. I haven’t felt the need. Since installing MT-Blacklist, I have had... [Read More]

Tracked on January 13, 2004 11:31 AM

» MT Comment Help from Burningbird
Edited I'm not starting up Burningbird but a lot of good people were hit badly by a very sophisticated comment spam attack, including the Wayward webloggers who I'm responsible to. The attackers this time only posted three comments to each post, each w... [Read More]

Tracked on January 13, 2004 11:49 AM

» Comments are down from Joho the Blog
My web host (friends of mine) unplugged the comments module after the first 1,000 spams came in within two hours. I think you can still read comments but you can't write them. I'm going to try installing David Raynes' script that lets you turn off comm... [Read More]

Tracked on January 13, 2004 02:43 PM

» Auto-Closing Old Posts from Joe Grossberg
In an effort to head off blogspam, I'm now using David Raynes' comment-closing cgi script. From now on, any entries... [Read More]

Tracked on January 13, 2004 03:32 PM

» Auto-Closing Old Posts from Joe Grossberg
update I'm using Dave Sifry's tiny Perl script instead. In an effort to head off blogspam, I'm now using David... [Read More]

Tracked on January 13, 2004 03:51 PM

» MT Comment Help from Burningbird
Edited I'm not starting up Burningbird but a lot of good people were hit badly by a very sophisticated comment spam attack, including the Wayward webloggers who I'm responsible to. The attackers this time only posted three comments to each post, each w... [Read More]

Tracked on January 13, 2004 11:21 PM

» MT 2.66 upgrade from padawan.info
Six Apart releases Movable Type 2.66 which brings new features to protect a weblog against comments spamming: a throttling measure... [Read More]

Tracked on January 15, 2004 03:24 AM

» MT 2.66, mesure anti-spam from padawan.info/fr
Six Apart vient de publier Movable Type 2.66 qui apporte son lot de mesures anti-spam: un dlai configurable entre deux commentaires en provenance de la mme adresse IP le bannissement automatique de l'adresse IP en cas de cration d'un nombre... [Read More]

Tracked on January 15, 2004 03:39 AM

» MT Comment Help from Burningbird
Edited I'm not starting up Burningbird but a lot of good people were hit badly by a very sophisticated comment spam attack, including the Wayward webloggers who I'm responsible to. The attackers this time only posted three comments to each post, each w... [Read More]

Tracked on January 15, 2004 09:58 AM

» MT Comment Help from Burningbird
Edited I'm not starting up Burningbird but a lot of good people were hit badly by a very sophisticated comment spam attack, including the Wayward webloggers who I'm responsible to. The attackers this time only posted three comments to each post, each w... [Read More]

Tracked on January 15, 2004 10:17 AM

» MT Comment Help from Burningbird
Edited I'm not starting up Burningbird but a lot of good people were hit badly by a very sophisticated comment spam attack, including the Wayward webloggers who I'm responsible to. The attackers this time only posted three comments to each post, each w... [Read More]

Tracked on January 15, 2004 10:34 AM

» MT Comment Help from Burningbird
Edited I'm not starting up Burningbird but a lot of good people were hit badly by a very sophisticated comment spam attack, including the Wayward webloggers who I'm responsible to. The attackers this time only posted three comments to each post, each w... [Read More]

Tracked on January 17, 2004 08:56 PM

» MT Comment Help from Burningbird
Edited I'm not starting up Burningbird but a lot of good people were hit badly by a very sophisticated comment spam attack, including the Wayward webloggers who I'm responsible to. The attackers this time only posted three comments to each post, each w... [Read More]

Tracked on January 17, 2004 09:07 PM

» Concerning Spam from Learning Movable Type
Spammers have discovered bloggers and sooner or later if you allow comments or trackback pings on your Movable Type weblog you will get spammed. Weblog spam is appearing in many flavors: 1) Basic comment spam. The spammer leaves a short... [Read More]

Tracked on January 24, 2004 12:00 AM

» Concerning Spam from Learning Movable Type
Spammers have discovered bloggers and sooner or later if you allow comments or trackback pings on your Movable Type weblog you will get spammed. Weblog spam is appearing in many flavors: 1) Basic comment spam. The spammer leaves a short... [Read More]

Tracked on January 24, 2004 12:01 AM

» Concerning Spam from Learning Movable Type
Spammers have discovered bloggers and sooner or later if you allow comments or trackback pings on your Movable Type weblog you will get spammed. Weblog spam is appearing in many flavors: 1) Basic comment spam. The spammer leaves a short... [Read More]

Tracked on January 25, 2004 11:15 PM

» More Comment Spam. from The Wily Filipino
Wrote this last night: Right now I'm just too angry to think straight. Got back home from the faculty party... [Read More]

Tracked on January 27, 2004 04:34 PM

» Spam frittered from thehighrise
As if spammers hadn't yet realised that I'm not interested in enlarging non-existent appendages, or joining an online betting cult,... [Read More]

Tracked on February 1, 2004 05:47 AM

» comments for older entries from TJ's Weblog "Technology, Venture Capital and Entrepreneurship"
I discovered David Raynes wonderful tool to close old comments last night. Now comments for entries older then 30 days will be blocked. If you want to leave me a message please mail me. Sorry but I won't spend my... [Read More]

Tracked on February 3, 2004 11:48 AM

» MT Close Comments from A Sassy Lawyer's Journal
I downloaded and installed a little script to close comments in old entries. I chose those older then 120 days. For some reason, even the recent ones--including those still appearing on the index page--are now closed for comments. And I can't figure ou... [Read More]

Tracked on February 27, 2004 05:22 AM

» automagically closing comments from atog
...with the David Raynes script. works like a charm. thanks David :)... [Read More]

Tracked on March 1, 2004 07:19 AM

» Movable Type and Gallery from Dawning Awareness
I upgraded both Gallery and Movable Type to the current versions. Each of the packages is "just about" to release their next big mondo release, and I can't wait to see if things are about to get better. See, the problem with Gallery is that pictures ar... [Read More]

Tracked on March 10, 2004 01:21 AM

» Closing comments on those old posts from Glimpse of a Grrl
Earlier this week (maybe it was over the weekend?) I installed MT Blacklist. it! Today I installed David Raynes' comment closing script and closed all posts older than 45 days. I'm just tired of the comment spammers. I'll probably install... [Read More]

Tracked on March 11, 2004 08:32 PM

» comment redirects and mt 2.661 from Redsugar Muse
I finally upgraded to MT 2.661. Wanna know why? Because of David Raynes's Optional-Redirect v0.11 That's right. You can mouse over your commenter's names again, without seeing your own url. I know there was a good reason for that feature... [Read More]

Tracked on March 16, 2004 01:28 PM

» MT-Close plugin from Karmakars.com
If you do blogs (Photoblogs, weblogs, mobileblogs) soomer or later your comment entry area becomes prone to spam And this is particularly true when you have old posts left open which you either forgot to close. My first recommendation would... [Read More]

Tracked on March 17, 2004 05:15 PM

» Close comments on older entries from Lynne ydw i
This is the simplest way I've found to close of comments on older entries, so simple in fact it took me less that 10 minutes and it worked first time (unheard of in my world). I've not installed blacklist properly... [Read More]

Tracked on March 20, 2004 09:51 PM

» Closing comments on old posts from Sharondippity - Moveable Type
I installed this script in hopes it will slow down the spam commenters (fucking low lifers). I'm cleaning up my scraggly side yard today. I'm taking lotsa breaks. I couldn't ask for nicer weather. Moxie is helping by napping nearby.... [Read More]

Tracked on March 21, 2004 03:36 PM

» Equal and Opposite Reaction from anthropomorphy
Like many Movable Type bloggers, I have recently received a lot of comment spam on this site, which I am quick to delete but which sorely gripes me. I sat down to solve the problem today and was delighted to... [Read More]

Tracked on March 27, 2004 06:24 PM

» Comment Sp*m from Blogged
Weblog publishers who utilise the Movable Type system are particularly susceptible to comment sp*m. Until Six Apart release an updated version of Movable Type containing fixes for the current vulnerabilities, the only way to counteract comment... [Read More]

Tracked on April 2, 2004 01:13 PM

» Comment Sp*m from Blogged
Weblog publishers who utilise the Movable Type system are particularly susceptible to comment sp*m. Until Six Apart release an updated version of Movable Type containing fixes for the current vulnerabilities, the only way to counteract comment... [Read More]

Tracked on April 2, 2004 01:30 PM

» basta ai commenti paleolitici from Notiziole di .mau.
Non pi possibile commentare notiziole pi vecchie di una settimana. [leggi...] [Read More]

Tracked on April 3, 2004 09:57 AM

» Comment Spam from ArborBlogs
Comment Spam seems to be a big problem with ArborBloggers. Stephen spotted some on the Cool Cities Task Force Blog, and AirBeagle got hit too. Personally, I'm starting to see comment spam every other day on my site. So what's... [Read More]

Tracked on April 5, 2004 09:14 PM

» Dusty Shades from Charleen's Fiberblog
I washed the cotton skeins and put them up to dry today. The grey cotton really gave the colors a dusty look. I used a semi-low immersion method so the variations were expected (and wanted). It wouldn't work for... [Read More]

Tracked on April 10, 2004 12:00 AM

» Dusty Shades from Charleen's Fiberblog
I washed the cotton skeins and put them up to dry today. The grey cotton really gave the colors a dusty look. I used a semi-low immersion method so the variations were expected (and wanted). It wouldn't work for... [Read More]

Tracked on April 10, 2004 12:02 AM

» Dusty Shades from Charleen's Fiberblog
I washed the cotton skeins and put them up to dry today. The grey cotton really gave the colors a dusty look. I used a semi-low immersion method so the variations were expected (and wanted). It wouldn't work for... [Read More]

Tracked on April 10, 2004 12:34 AM

» Closing comments on old posts from Hepatic Portal Vein
Just installed MT-Close, a movabletype plugin which allows one to turn off the ability to leave comments on older posts. It has settings for the age at which comments are turned off. After a couple of strange comments were left... [Read More]

Tracked on May 5, 2004 12:28 AM

» Difendi il tuo blog dallo spam from Linkaggio: storie, attualita', tecnologia e tempo libero...
Gli spammers hanno scoperto i blog, s'intravedono giࠩ primi risultati negli USA, e tra poco anche in Italia le funzioni tipiche d'interazione dei weblog: trackback e commenti saranno presi d'assalto. Ecco le tipologie di spam che possono presentarsi ... [Read More]

Tracked on May 20, 2004 07:01 PM

» Difendi il tuo blog dallo spam from Linkaggio: storie, attualita', tecnologia e tempo libero...
Gli spammers hanno scoperto i blog, s'intravedono giࠩ primi risultati negli USA, e tra poco anche in Italia le funzioni tipiche d'interazione dei weblog: trackback e commenti saranno presi d'assalto. Ecco le tipologie di spam che possono presentarsi ... [Read More]

Tracked on May 20, 2004 07:02 PM

» Victory II from The Politburo Diktat
Update: More complete victory over comment spammers needed. In addition to mt-blacklist, I also installed David Raynes' script to close comments and renamed the basic comments script, from mt-comments.cgi to super-secret encoded name. :) Per Comrade De... [Read More]

Tracked on May 22, 2004 01:53 PM

» Ummmm, yeah... from neoramble
This is why you should - A] Have your blog mail you comment notifications B] Institute a blacklist and comment scanning C] Periodically close older comments We need an afterschool special on this, I swear...... [Read More]

Tracked on May 25, 2004 06:29 AM

» Godsend from Say Uncle
Been inundated with comment spam lately, which just pisses me off to no end. Thanks to this handy plug in by David Raynes, comments will... [Read More]

Tracked on June 3, 2004 04:41 PM

» Buh-Bye Spammers! from Blog-Her :: Pandora's Box
There are ways to fight spam without MT3.0 [Read More]

Tracked on June 6, 2004 07:08 PM

» mt-improve from Quiet Thoughts at the Midnight Caf
I made some changes to the templates and the MT... [Read More]

Tracked on June 9, 2004 08:43 AM

» mt-improve from Sum of all shiny parts
I made some changes to the templates and the MT program today, cos I learnt a bit more about plug-ins.... [Read More]

Tracked on June 17, 2004 01:18 AM

» Old Comments Closed from Opiniatrety
Comment spam got me down, so all threads more than twelve days old will be closed to comments from now on. Thanks to Chris in the comments here for pointing my way to this plugin. Now can anyone tell me... [Read More]

Tracked on June 19, 2004 02:19 PM

» Whose blog is this? from Classical Values
After a long litany of being spammed with many hundreds of comments, being publicly taunted and challenged by a spammer (or spam defender), and after months of abusive comments, I am now almost ready to turn off comments, because it... [Read More]

Tracked on June 29, 2004 10:05 AM

» Chronic Trackback Spam from Mama Write
Well, that was a first... I turned on my computer tonight and found no less than thirty trackback spams. It took a while to remove them, but I added the domain to Blacklist and banned two more IPs. I normally... [Read More]

Tracked on July 2, 2004 09:35 PM

» The Beginning of My Anti-Sp@m Effort from feministe
The quickest fix for all of my troubles, a fix compatible with MT3, is the closing of old comments. No way to post comments, no comment spam. I'm using David Raynes' MT-Close to close all comments over five days old, or posts without any comments whats... [Read More]

Tracked on July 21, 2004 10:49 PM

» Automatically closing comments from Q Daily News
After getting more and more annoyed at the prevalence of comment spam, I went hunting around for a good way to automatically close comments on entries here after a certain number of days. What I stumbled upon was a few... [Read More]

Tracked on September 1, 2004 10:42 PM

» Spam from Bacon, Cheese and Oatcakes
For the first time in a very long time - well since I had mt-blacklist and mt-commentsclosed installed - I've... [Read More]

Tracked on September 10, 2004 06:38 AM

» Amaathugasemdir from Hjali
Fann lti stt forrit sem lokar athugasemdir sem eru eldri en X daga gamlar Movable Type. S a vsu ekki betur en a hafi loka athugasemdir nrri skrifum lka (g valdi 5 daga) en mr er... [Read More]

Tracked on September 13, 2004 09:37 PM

» Amaathugasemdir from Hjali
Fann lti stt forrit sem lokar athugasemdir sem eru eldri en X daga gamlar Movable Type. S a vsu ekki betur en a hafi loka athugasemdir nrri skrifum lka (g valdi 5 daga) en mr er... [Read More]

Tracked on September 13, 2004 09:38 PM

» Amaathugasemdir from Hjali
Fann lti stt forrit sem lokar athugasemdir sem eru eldri en X daga gamlar Movable Type. S a vsu ekki betur en a hafi loka athugasemdir nrri skrifum lka (g valdi 5 daga) en mr er... [Read More]

Tracked on September 13, 2004 09:41 PM

» Amaathugasemdir from Hjali
Fann lti stt forrit sem lokar athugasemdir sem eru eldri en X daga gamlar Movable Type. S a vsu ekki betur en a hafi loka athugasemdir nrri skrifum lka (g valdi 5 daga) en mr er... [Read More]

Tracked on September 13, 2004 09:43 PM

» Spam in blogs.. from The Underground Man
So I seem to be getting an ever-increasing amount of spam comments in my blog these days. I delete them and ban the URLs promptly but it has only kept the problem manageable. Now I've added banning IPs and have... [Read More]

Tracked on October 2, 2004 12:41 PM

» More Spam Control from Cootiehog
I love MT-Blacklist, but sometimes it just doesn't work fast enough with the updates to eliminate all spam - but I appreciate Jay Allen's hard work and think MT-Blacklist is pure genius. But to supplement that plug-in, I've also opted to use Rayne's MT... [Read More]

Tracked on October 8, 2004 12:54 PM

» More Spam Control from Cootiehog
I love MT-Blacklist, but sometimes it just doesn't work fast enough with the updates to eliminate all spam - but I appreciate Jay Allen's hard work and think MT-Blacklist is pure genius. But to supplement that plug-in, I've also opted to use Rayne's MT... [Read More]

Tracked on October 8, 2004 01:01 PM

» Comments Close After 7 Days from Centerfield
Entries on this blog will have their "Post A Comment" box disabled after 7 days. After deleting more than 40,000 spam comments using mt-blacklist, we got another 2000 spam comments over the weekend. Most of these are hitting old entry,... [Read More]

Tracked on October 19, 2004 05:41 PM

» Stop spam now with your gigantic p3n1s!!! from FeralBlog
Even though I have the fantastic MT-Blacklist installed on my site, I still get tons of comment spams, both denials that get blocked but eat up resources, and spams for as-of-yet-un-blacklisted sites that eat up resources and my patience. The... [Read More]

Tracked on November 2, 2004 06:04 PM

» Closing comments on old entries from Phil's NewsPhlash!
Thank you Technodaddy for posting this on your linkblog!! David Raynes has a script that will close old comments. Go get it here..... [Read More]

Tracked on November 4, 2004 09:53 AM

» Comment Spam from Living In Hormoney
All of us get inundated with comment spam. I personally do not want a PW protected blog, at least not just yet, so I have used this MT application to close all the old entries to comments, so that only... [Read More]

Tracked on November 6, 2004 10:17 AM

» Comment Spam from Living In Hormoney
All of us get inundated with comment spam. I personally do not want a PW protected blog, at least not just yet, so I have used this MT application to close all the old entries to comments, so that only... [Read More]

Tracked on November 7, 2004 11:02 AM

» Housekeeping from swirlspice
I usually access my webspace via Fetch. For the while I was without a computer, I poked around in there via my cPanel's File Manager. Come to find out I've been publishing daily archives for a good long while (oops).... [Read More]

Tracked on November 16, 2004 04:16 AM

» good juju on stopping blogspam from Words - big ones and little ones...
stefanos got me onto this one: David Raynes: Closing comments on old entries... [Read More]

Tracked on November 19, 2004 10:59 PM

» Close Old Comments from miceland
Steven pointed me at David Raynes' mt-close script. I used it to close lots of old entries. It is simple but it does seem to work. It may help you in your blog sp@m elimination efforts. More Later,... [Read More]

Tracked on November 20, 2004 01:53 AM

» Close Old Comments from miceland
Steven pointed me at David Raynes' mt-close script. I used it to close lots of old entries. It is simple but it does seem to work. It may help you in your blog sp@m elimination efforts. More Later,... [Read More]

Tracked on November 20, 2004 02:03 AM

» MT fixerier mot spam! from Carinas tankar - Tankeboken
Jag har nu stngt kommentarer och trackbacks fr texter skrivna lngra tillbaks n 14 dagar. Jag har ocks lagt in... [Read More]

Tracked on November 20, 2004 08:09 AM

» Die Spam Die from Burlap Soul
Blogging note: I finally figured out how to install this wonderful script for closing old entries. The amount of daily spam seems to have seriously dropped off as a result. I'm not complaining. However, if you want to leave a... [Read More]

Tracked on November 24, 2004 01:57 AM

» Die Spam Die from Burlap Soul
Blogging note: I finally figured out how to install this wonderful script for closing old entries. The amount of daily spam seems to have seriously dropped off as a result, and that's just in 24 hours. I'm not complaining. However,... [Read More]

Tracked on November 24, 2004 01:59 AM

» Closing comments on old entries. from Throes of Whatever
I hate to have to do this, but I'm going to start closing comments on any entry that's over a week old. The comment spam has been getting insane, and I'm having trouble keeping up even with mt-blacklist. If you're... [Read More]

Tracked on November 26, 2004 10:24 AM

» Is there any particular reason I am getting a shitflood of empty comment spam today? from Black Coffee
I must have received fifty+ spams today... The stupid thing (from their perspective) is that they actually don't have links to any sites. So I don't know what they're benefitting from this. MT-Blacklist misses them because there are no tokens to trigge... [Read More]

Tracked on December 1, 2004 01:26 AM

» MT fixerier mot spam! from Carinas tankar - Tankeboken
Jag har nu stngt kommentarer och trackbacks fr texter skrivna lngre tillbaks n 14 dagar. Jag har ocks lagt in... [Read More]

Tracked on December 17, 2004 07:08 AM

» Ataques masivos de SPAM en sistemas MT from Noticias BlogsEcuador
En las ltimas semanas los weblogs basados en el sistema Movable Type han sido afectados por ataques masivos de blogspam, muchas compaias que brindan hosting corporativa y personalmente quieren desactivar las opciones de comentarios en este tipo de bi... [Read More]

Tracked on December 30, 2004 12:33 PM

» Time Gentlepersons, Please... from Insufficient Time
So, with comment spam coming in with apparently random character URLs now - making Blacklisting impossible - I'm taking more measures. First off is closing comments after 14 days. If you want to comment on an older posting, email me.... [Read More]

Tracked on January 4, 2005 10:30 AM

» Spam! from :: Scottious.net ::
Learning Movable Type: Concerning Spam A couple of weeks ago, I never really thought comment spam could affect me. I had comments wide open to anonymous commenters with the default settings that my CMS, Movable Type, provided. Spam Attack. One... [Read More]

Tracked on January 4, 2005 01:46 PM

» Stop spam now with your gigantic p3n1s!!! from FeralBlog
Even though I have the fantastic MT-Blacklist installed on my site, I still get tons of comment spams, both denials that get blocked but eat up resources, and spams for as-of-yet-un-blacklisted sites that eat up resources and my patience. The... [Read More]

Tracked on January 6, 2005 03:40 PM

» Commenting from life
Due to the noticeable lack of dialogue around here lately (and at least a couple folks -- my wife and... [Read More]

Tracked on January 14, 2005 09:24 AM

» Combatting Spam from NoelHeikkinen.com
{ MOOD: Elated | NOISE: Kid's singing and cleaning } In an effort to battle spam, I have implemented a script that closes old entries to comments. Not many people post comments after a month, so I have chosen that... [Read More]

Tracked on January 14, 2005 07:59 PM

» House Cleaning from Rob Ruff
Finally finished de-gunking my blog of comment and trackback spam. I've implemented some of the suggestions found in the Six... [Read More]

Tracked on January 14, 2005 10:22 PM

» Close Comments from have a nice day.
While MT-Blacklist has been wonderful, it's just been way too much of a hassle having to empty my comments of... [Read More]

Tracked on January 21, 2005 06:43 AM

» Script Help from Res Ipsa Loquitur
I've been trying to install a script today to close trackback pings, and I can't get it to work. Anyone... [Read More]

Tracked on February 1, 2005 06:05 PM

» Script Help from Res Ipsa Loquitur
I've been trying to install a script today to close trackback pings, and I can't get it to work. Anyone... [Read More]

Tracked on February 1, 2005 11:08 PM

» site design and trackback closure from Absoblogginlutely
I've used David Raynes: Closing comments on old entries script to hopefully close trackback on Kristen's blog and at the same time I have started to play with some css for some learning time before I roll out a new... [Read More]

Tracked on February 4, 2005 05:09 PM

» Fighting spam in english from THE RAISING HAMMER
スパム対策の締めくくりとして、過去のコメントとトラックバックをクローズ(受付終了)させる方法を探しました。日本語のサイトにはなかなか良い記事がみつからず、腹をくくって例に... [Read More]

Tracked on February 8, 2005 11:53 AM

» kommentarspam ade? from [i:rrhoblog]
nachdem, wie von einem unkenden kommentator richtig angekndigt, hier ber die letzten tage eine regelrechte kommentarspamwelle hinweggezogen ist, habe ich jetzt erst einmal die notbremse gezogen. kommentare zu beitrgen, die lter als 15 tage sind, si... [Read More]

Tracked on February 9, 2005 05:47 AM

» Closing comments! from shwango! blog
If you've tried to post a comment recently you probably got a 404 message. Due to the amount of comment... [Read More]

Tracked on February 19, 2005 08:58 PM

» Fucking spammers!!! from My Single Mom Life
As a result of massive spamming, you *must* be a TypeKey member in order to comment on an entry. Click here to register with the service or login. I apologize for the inconvenience, but these damn spammners are killing my... [Read More]

Tracked on April 10, 2005 07:24 AM

» God Damn Trackback Spam from Random Access 3.0
I like the idea of trackbacks, I think it's pretty cool because you can see what other people stumble across your incoherent ramblings. I've had to lockdown comments to require you to register with Six Apart and haven't had a... [Read More]

Tracked on April 11, 2005 10:21 PM

» closing comment from trashcan2
ϴ MT blacklistε ȿ ־µ, ٺ ĿƮ ĿƮ ݴ . ù ĿƮ ī̺ ĿƮ ʿ ڴٽ;. װ ݾֳ.... [Read More]

Tracked on April 18, 2005 09:34 AM

» Trackback & Comment Spam: Redux from UNCoRRELATED
Right Wing News had some useful information today, in the form of their experience with a Movabletype plug-in [Movabletype is blogging software if you didn't know...]. I've installed MT-close and opened up comments again to see how it goes. In... [Read More]

Tracked on April 20, 2005 01:27 PM

» Installing MT-Captcha (aka SCode) from Digital Life the OS X way
This site has recently started to attract spammers, extolling the virtues of viagra, cialis, and large penises in general. Since the Movable Type interface is relatively slow, deleting these spams has become a bit of a pain. There are several... [Read More]

Tracked on May 13, 2005 08:37 PM

» Please say the baby from TheDamnDiva
I might have beat spam thanks to this MT diddley-wop that someone came up with where you can close comments on old entries. Spam has become the bane of my MT existence mainly because I refuse to give up and let the spammers win. I spend 10 minutes a da... [Read More]

Tracked on July 7, 2005 05:03 PM

» Comments are back from noise to signal
Looks like Lunarpages shut down commenting on my site because of the high server loads the comment script was generating. We have some disagreement about what's causing that, but they have graciously restored the script as long as it doesn't... [Read More]

Tracked on August 4, 2005 09:48 AM

Comments

Got a problem - when I run it, I get this error from MT: 'Can't modify non-lvalue subroutine call at mt-close.cgi line 88.'. I uploaded it as ASCII and set the permissions correctly, so I'm hoping you'll have some idea. I'm using MySQL as the database, and on most of the entries the comments are closed already anyway.

Posted by: Neil T. at December 27, 2003 09:50 AM

thanks for this plugin mate, but was just wondering if its able to config it so it can only close certain categories, some I wish to keep open

Posted by: shaan at December 28, 2003 07:03 AM

Is there some limitation on the number of days you can set? I tried to shut off comments to all threads older than 45 days, and it appears to have done nothing at all. I posted a couple of test comments myself just to make sure.

Posted by: Patrick Nielsen Hayden at January 13, 2004 12:43 PM

Any chance of making this reversable? Or keeping some sort of record as to which records /used to/ support comments and trackbacks?

Posted by: Bill Kearney at January 13, 2004 08:09 PM

I have it barraging me by the second. I deleted the mt-comment.cgi and am trying to get the mt-close.cgi script to work. I placed it in the cgi-bin where all the other MT cgi script reside and set the permissions so it could do everything, and when I tried to access it, I got this error:

Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@tiglaw.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Apache/1.3.27 Server at tiglaw.com Port 80
I am sure I did something wrong, as it took me a couple of days to install MT initially. HELP!

Posted by: Tiger at January 18, 2004 12:05 AM

Is this reversible? Even manually?

Posted by: gary at February 8, 2004 05:03 PM

This script wont work for me? MT 2.661, MT-Blacklist and Berkeley DB. I select the options on the form. It goes back to the server and then simply comes back to my browser with the same form and no entries have been closed?

Posted by: steve at February 9, 2004 04:52 AM

Just as "steve" reported on Feb 9, the script doesn't seem to work. I can submit the form and a second later it just seems to refresh the page and that's it. I'm guessing it only works on systems setup to use MySQL DB (steve and I are just using Berkeley DB). I'm running MT 2.63.

Can someone please confirm this?

Posted by: Derek Tom at February 24, 2004 10:59 AM

Just as "steve" reported on Feb 9, the script doesn't seem to work. I can submit the form and a second later it just seems to refresh the page and that's it. I'm guessing it only works on systems setup to use MySQL DB (steve and I are just using Berkeley DB). I'm running MT 2.63.

Can someone please confirm this?

Posted by: Derek Tom at February 24, 2004 11:00 AM

Once I've executed and closed all the comments, do I set the permissions back to the way it was before?

Thanks.

Posted by: Lynne at March 20, 2004 09:40 PM

Hello, I'm having the same problem that Steven and Derek Tom are having, posts 41-43. Is this a bug? Can anyone help us?

Posted by: Rodney at April 4, 2004 09:19 PM

i, too, am having the refresh problem cited above by steve et al...using mt 2.661

Posted by: jp at April 7, 2004 02:46 PM

"Me, too!" I'm seeing the same type of problem that has been previously reported. Given that the first occurrences didn't appear to receive any help, I'm not hopeful.

David, can you please offer us any assistance?

Posted by: Kelly at April 8, 2004 09:49 PM

Could mt-close.cgi be modified for "no comments" rather than "closed," that is, 0 rather than 1?

Posted by: Ken at April 11, 2004 12:35 PM

sob I'm getting hammered with comment spam and want to close my old comments, but this script didn't work. It installed correctly, but when I execute it, nothing happens. All my old comments are still open!

Posted by: Noelle at May 2, 2004 06:14 PM

doesnt anyone answer the questions as to why this doesnt work? Someone? Is this mike on?

Posted by: Political Pulpit at May 3, 2004 12:58 AM

Meh. Did not work for me either.

Posted by: Rori at May 9, 2004 08:29 PM

Well, I can run it alright, but then it just sits around forever until it finally 404s without closing anything whatsoever.

Posted by: Misha I at May 24, 2004 09:15 PM

It's not closing any comments for me, either. It just runs and does nothing. I'm running MT 2.661 and the MT Blacklist.

Posted by: Puddle Pirate at May 25, 2004 10:24 PM

From the "Beggars Can't Be Choosers" file, what I would really like to be able to do is, rather than closing comments for posts over n days old, instead close comments for posts that have not been commented on in over n days. Any script hack make that possible?

Posted by: tgirsch at June 4, 2004 11:51 AM

Obviously nobody has any answers here, and obviously MT Close doesn't work here either.

Posted by: Political Pulpit at June 4, 2004 04:38 PM

Obviously nobody answers these questions.

Posted by: Political Pulpit [TypeKey Profile Page] at June 4, 2004 04:43 PM

This script, as is, does not work for me. But... I debugged it a little and changed it so that it will work for me. (I suspect the problem is due to not using mysql but I'm not sure).

I'd like to extend it a bit (so you can turn off comments per category, turn on comments and pings and filter by "activity")?

Posted by: Mark at June 18, 2004 04:00 AM

If anyone's interested, I've e-mailed David Raynes twice and have received no response.

Posted by: Tin Man at June 18, 2004 12:00 PM

So what changes did you make, Mark? I'm also not using mysql, and like many others, this script is doing nothing for me. Can you post your changes so that maybe some of us can get this working (seeing as it appears that David doesn't read these comments)?

Posted by: Drew at June 18, 2004 12:06 PM

Let me start off by apologizing for not speaking up earlier.

Anyways, this was originally just a quick port for a script that somebody else wrote so it could be useful to more MT users (i.e. non-MySQL users). It obviously does not work for everybody, but I do not have the time right now to really look into it. Between the upcoming release at work, the two hours I spend commuting every day, taking care of my family and my house, and working on schoolwork during the semester, I only have so many hours of the day left, most of which I have spent recently working on the new version of SubCategories for the plugin contest.

And, beyond that, what little free time I do have is worth quite a lot to me. In all honesty (and I hate to be so blunt), unless you have a check with my name on it waiting for me, I will do with my time what I choose, and for now that is working on SubCategories, ExtendedComments/CommentThreads/CommentTitles, and MultiBlog.

Now, it appears that a few of you have spent some time working with the code to see what it is that is causing so many problems. I would like to encourage that and suggest that you all work together to see if you can fix this quickie script that I wrote. I certainly cannot help everyone, so please help each other where you can.

Posted by: David Raynes [TypeKey Profile Page] at June 18, 2004 01:04 PM

Hi David,

Its totally understandable, time is precious to us all. I think I have fixed the script (see below).

I'd like to expand the script though? I've started working on it so that you can select to open comments instead of just close them (i.e. to reverse the changes), a way of selecting by specific categories and a way of selecting by "activity" (i.e less that x comments).

-- Mark

The Fix:

Open up mt-close.cgi in your favoriate text editor and scroll through the code until you find this:

  foreach my $blog (@blogs) {
    my @ago = offset_time_list (time - 3600 * 24 * $days, $blog->id);
    my $ago = sprintf "%04d%02d%02d%02d%02d%02d",
        $ago[5]+1900, $ago[4]+1, @ago[3,2,1,0];

    foreach my $term (@terms) {
      my @entries = MT::Entry->load ({ blog_id => $blog->id, 
    created_on => [ 0, $ago ],
    "$term" => 1 }, { range => { created_on => 1 }}) or next;
      foreach my $e (@entries) {
    $e->allow_comments (2) if ($q->param ('close_comments'));
        $e->allow_pings (0) if ($q->param ('close_trackback'));
        $e->save;
    $term =~ s/allow_//g;
        $html .= "<li>'".$e->title."' closed $term</li>\n";
      }
    }
  }

Replace it with this:

  foreach my $blog (@blogs) {
    my @ago = offset_time_list (time - 3600 * 24 * $days, $blog->id);
    my $ago = sprintf "%04d%02d%02d%02d%02d%02d",
        $ago[5]+1900, $ago[4]+1, @ago[3,2,1,0];
      my @entries = MT::Entry->load (
        { blog_id => $blog->id,
          created_on => [ 0, $ago ] },
        { range => { created_on => 1 } }
        ) or next;

      foreach my $e (@entries) 
      {
        $b = 0;
        if( $e->allow_comments == 1 && $q->param( 'close_comments') )
        {
          $e->allow_comments (2) if ($q->param ('close_comments'));
          $html .= "<li>'".$e->title."' closed comments</li>\n";
          $b = 1;
        }

        if( $e->allow_pings == 1 && $q->param( 'close_trackback') )
        {
          $e->allow_pings (0) if ($q->param ('close_trackback'));
          $html .= "<li>'".$e->title."' closed pings</li>\n";
          $b = 1;
        }

        if( $b == 1 )
        {
          $e->save;
        }
      }
  }

... and save.

This should allow you use mt-close.cgi on non-mysql MT installations. Also it should prevent the script from just hanging and throwing up a 404.

For the sake of ease, you can download an already patched version of it @ http://sw.thedeadone.net/mt-close-fix.zip (but be warned that it may not stay there forever).

-- 20th June 2004

Posted by: Mark at June 20, 2004 12:33 PM

Hi all!

I've created a MT-Close2 script which expands on this script. It works on non-MySQL installs of MT, allows you to filter entries by categories, open comments and trackbacks (i.e. reverse changes) and select entries based on number of comments.

Go to http://sw.thedeadone.net/MT-Close2 to download it.

BTW I've moved mt-close-fix.zip to here.

-- Mark

Posted by: Mark at June 24, 2004 10:22 AM

Hi all!

I've created a MT-Close2 script which expands on this script. It works on non-MySQL installs of MT, allows you to filter entries by categories, open comments and trackbacks (i.e. reverse changes) and select entries based on number of comments.

Go to http://sw.thedeadone.net/MT-Close2 to download it.

BTW I've moved mt-close-fix.zip to here.

-- Mark

Posted by: Mark at June 24, 2004 10:24 AM

Thanks Dave and Mark!

Pretty handy!!

Posted by: corredor at June 26, 2004 01:08 AM

thank you soooo much david and mark. i know you guys are busy, but your hard work is soooo greatly appreciated by everyone in the blogosphere. :)

Posted by: xtina at July 5, 2004 05:24 AM

crud. i ran this cgi script and it torqued my entire MT install. my site (http://starjewel.org) is now throwing a 500 internal server error. has anyone else seen any bugs with this? i'm running MT 2.6 and MT-Blacklist. if anyone knows what this breaks and how to fix it, i'd appreciate any help!

Posted by: kim at November 30, 2004 03:58 PM

ok so it appears something else coincidentally broke at the same time. however, the script doesn't appear to actually be closing commenting. do i need to do something else to make it work? it just runs and runs and finishes, but comments are open still on old posts.

Posted by: kim at December 2, 2004 01:48 PM

Stillllll broken.

Posted by: Steve at December 10, 2004 04:32 AM

This script, as is, does not work for me. But... I debugged it a little and changed it so that it will work for me. (I suspect the problem is due to not using mysql but I'm not sure).I love your website it is so user friendly and always makes me laugh. Thanks and keep up the great work! - Matt

Posted by: bill walker at January 19, 2005 10:22 AM

Nice script. I have a CAPTCHA script running for my comments but it won't work with MT-Blacklist. So I've had to disable MT-Blacklist and trackback spams are sneaking through.

Your script has allowed me to disable trackbacks on entries over 5 days old without disabling comments.

It has one problem, but it's only minor. I have over 900 entries and MT-Close only seems to be able to deal with 300 at a time before timing out. That may be why other commenters have thought it's not working for them. The answer is simple. Just run the script multiple times until the site is done.

Posted by: theaardvark at February 4, 2005 05:29 AM

David, it seems this script can be accessed outside of MT - no login required. So couldn't anybody run the script the turn the commenting option back on? Seems like a login would be appropriate at a minimum. And I know your really, really busy, but if it were possible, it'd be great if this were a plugin that we access from inside MT. Just a thought. Thanks for the script! :-)

Posted by: DaveE [TypeKey Profile Page] at February 5, 2005 10:39 PM

Post a comment




Remember Me?

(you may use HTML tags for style)