Muffinboy
Feb 21 2003, 08:18 AM
I want to use the 2.6 option to close commenting on ALL current posts...
The only way to do this MT seems to offer is to go into each individual entry, reset the comments option and save it.
Is there really no way to do some mass conversion of the comments option?
persnit
Feb 21 2003, 08:48 AM
Other than going into the configuration of the blog and turning comments off that way, no, I don't believe there is any other way to do it. I would love to have more options on how to control comments!!
crys
Feb 21 2003, 09:13 AM
QUOTE
Other than going into the configuration of the blog and turning comments off that way, no, I don't believe there is any other way to do it. I would love to have more options on how to control comments!!
Actually that doesn't work either -- the blog config is only a default nothing to do with current entries...
I think it's one of the items in power edit mode though
Muffinboy
Feb 23 2003, 03:26 AM
It's not in the power editing mode either.
I don't really feel like going through 900 odd posts to set them all individually to closed comments.
Since I'm running on MySQL now, would there be any way to run a little script on the DB to close all current posts?
medic119
Feb 23 2003, 12:22 PM
I asked for that about a week ago without results, but it would be nice to have a little PHP Script that would Close all the Coments after a certain number of days (configurable inside the script?) via an SQL statement. All you would have to do would be to run the script from time to time and all your old comments would be closed out.
If my PHP skills were anything above 0, I could probably hash it out.
tubedogg
Feb 23 2003, 06:12 PM
kadyellebee
Feb 23 2003, 06:25 PM
Hmmm, that link doesn't seem to work!
Kristine
girlie
Feb 23 2003, 06:30 PM
It does now. ;)
tubedogg
Feb 23 2003, 06:34 PM
Heh, whoops, did I forget the t/ (I'm assuming)? My bad. :0
kadyellebee
Feb 23 2003, 06:42 PM
Yay! Thanks, I look forward to checking this out, even though I don't have a place to use it (yet).

Kristine
girlie
Feb 23 2003, 06:44 PM
QUOTE
Heh, whoops, did I forget the t/ (I'm assuming)? My bad. :0
Yep. ;)
tubedogg
Feb 23 2003, 07:00 PM
QUOTE
Yay! Thanks
You're welcome.

Please note I have updated the entry at my site to reflect the license it is being released under and to note that this *only* works with the MySQL version of MT.
medic119
Feb 23 2003, 07:31 PM
It told me that it ran fine but it didn't touch any of my comments older than 30 days. I rebuilt the entire system like it said to and didn't get any errosr.
They all still show open in the System.
heres my pertinent mod
CODE
// $closehours is how long an entry should be open before comments should be closed on it.
// Set this to a whole number of hours OR set this to 0 and use $closedays below.
$closehours = 0;
// If you set $closehours to anything except 0 above, set $closedays to 0.
// Otherwise, set this to a whole number of days an entry should be open before comments should be closed.
$closedays = 30;
tubedogg
Feb 23 2003, 07:46 PM
I have just tested this script again. After running it, editing an entry through the backend shows that entry's comments as "closed". Trying to add a comment to an affected entry shows the error "This entry is closed for comments".
One thing I just noticed is I don't think it is adhering to the time specified - it closed comments for *all* my entries, not just those older than the 7 days I selected.
Did this touch *any* comments for you?
tubedogg
Feb 23 2003, 07:59 PM
OK, I believe I have squashed the date/time bug. It should now work correctly. It has been updated to v1.01 and the URL is the same as above -
http://backlog.geeksblog.com/t/2003/02/23/000065
medic119
Feb 23 2003, 08:51 PM
Seems to work wonderfully now! Thanks again.
BTW, can this be run via cron or is it going to output a message causing me to get my inbox filled with cron job outputs? lol
Nice to see another e550G user as well. Not many of us about. Nice site!
tubedogg
Feb 23 2003, 09:00 PM
e550G? Um...?

Not sure what that means.
It could work via cron. I have added a $nooutput switch for this type of use. Script updated to v1.1.
medic119
Feb 23 2003, 09:57 PM
Genio e550G the Pocket PC you have in the header of your site...

Thanks for the noouput switch. Now I won't have to remember to run it every month, lol
tubedogg
Feb 23 2003, 10:06 PM
Ohhhh! You would expect me to know that, since it's in my header. I don't, though.

We picked it at random - it was one of the only pictures of a PDA that we could find in a hi-rez version for the header.
Thanks for the comments about the site.
Muffinboy
Feb 24 2003, 07:05 AM
Cool, thanks tubedogg! I'm away from the screen for a day and you come to our aid

Maybe a quick explanation why I needed the script: I'm going to restructure my site's archives from using /archives/0000012.html formatting to the date based archives /2003/12/03/entry_title.html.
I don't want to break links to my old posts, so I'm going to close their commenting and leave them where they are, with a little notice that these are the old archives.
Then I change the archiving method as described above, rebuild the archives and allow commenting only on posts created after that date. It's a bit of a pain, but I'm trying to be backwards compatible here
crys
Feb 24 2003, 09:50 AM
You could just: remove the comments code from your templates (maybe replacing it with a link to the new page) --rebuild -- restore the template -- change the archiving -- And rebuild again.
Now links to the old files don't break, nor do they not update when someone adds a comment -- without disallowing commenting on the older entries.
fooljay
Jul 28 2003, 06:28 AM
(crossposted from a related thread)
If you ask me, there is nothing more annoying than comments which have been closed only due to age of the post.
I will give you an example: a long time ago, I wrote up a hack which explained how to get rid of target="_blank" in the MTCommentAuthorLink, because it ruins XHTML-strict validation. Subsequently, many people linked to it.
I realized that people were still employing this hack, even though it is obsolete for v2.6+ thanks to the sanitize attribute. So, I did a Google search on all pages linking to mine or pages which detailed the hack but did not link to mine. On all found pages, I posted the updated information. Some people retired comments by date, so I was unable to comment, leaving later Googlers with bad information.
I did the same thing recently with the (complete) fix for the MT bookmarklet for Safari.
Closing comments just because the entry is old is a bad idea. If you want to educate Googlers, you can use the MT-RefSearch plugin (http://www.sixapart.com/log/2002/12/mtrefsearch_v07.shtml) and modify the text to explain that they are on an old archive page. The plugin will provide them with relevant on-site search results and may give them an indication that there is more recent and relevant content.
Closing comments because of the occasional comment spam is throwing the baby out with the bathwater...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.