2 personman Jan 17, 2006 20:51

There used to be a hack for this. Lemme look around a bit...
Is there a plugin to do this in 2.x?
Shadowfoot wrote:
Is there a plugin to do this in 2.x?
I'm interested in a plugin for this too if it's out there.
This really doesn't warrant a full blown plugin :
conf/hacks.php
<?php
$days = 7;// set this to number of days
$sql = 'UPDATE T_item__items SET post_comment_status = \'closed\' WHERE post_datestart < \''
.date2mysql( strtotime( '-'.$days.' days' ) ).'\' AND post_comment_status = \'open\'';
$DB->query( $sql );
?>
¥
Is there something that needs to be changed in this to be specific to my blog, ¥åßßå? Or should it work as is for anyone?
When I do it I get an error saying:
MySQL error!
Table 'muncherw_mainblog.T_item__items' doesn't exist(Errno=1146)
Your query:
UPDATE T_item__items SET post_comment_status = 'closed'
WHERE post_datestart < '2008-10-19 20:59:38'
AND post_comment_status = 'open'
Bump.
Perhaps I should not have directed my question soley to ¥åßßå.
Not now, but you could post that as a Plugin request in the plugin request forum.