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.
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.
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
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.
Any chance of making this reversable? Or keeping some sort of record as to which records /used to/ support comments and trackbacks?
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:
I am sure I did something wrong, as it took me a couple of days to install MT initially. HELP!Is this reversible? Even manually?
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?
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?
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?
Once I've executed and closed all the comments, do I set the permissions back to the way it was before?
Thanks.
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?
i, too, am having the refresh problem cited above by steve et al...using mt 2.661
"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?
Could mt-close.cgi be modified for "no comments" rather than "closed," that is, 0 rather than 1?
*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!
doesnt anyone answer the questions as to why this doesnt work? Someone? Is this mike on?
Meh. Did not work for me either.
Well, I can run it alright, but then it just sits around forever until it finally 404s without closing anything whatsoever.
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.
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?
Obviously nobody has any answers here, and obviously MT Close doesn't work here either.
Obviously nobody answers these questions.
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")?
If anyone's interested, I've e-mailed David Raynes twice and have received no response.
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)?