1 remdog Jan 17, 2006 17:50
3 edb Jan 17, 2006 23:46
There used to be a hack for this. Lemme look around a bit...
4 shadowfoot Jan 03, 2008 08:31
Is there a plugin to do this in 2.x?
5 muncherw Jul 28, 2008 05:21
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.
6 yabba Jul 28, 2008 12:55
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 );
?>
¥
7 muncherw Oct 27, 2008 03:06
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'
8 muncherw Oct 31, 2008 18:30
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.