did you activate the plugin?
also look into installing wp hashcash.
Thread Starter
gt
(@gt)
Yes, I activated the plugin. Any other thoughts? I will give hashcash a try if it’s not too difficult to install. Thanks!
what did you do to test if auto close works? the plugin doesn’t really auto close comments once the post hits the specified age. the plugin is triggered while doing one of a few normal administrative tasks, at which time the age of posts is checked. one of the triggers is editing a post, so you can edit a post and hit save. it doesn’t matter if you changed anything or not. you just want to see if comments close on a few posts. if that doesn’t work, you’ll probably need to be more aggressive with the age cutoff. set it to 1, edit a post, and see what happens then.
Thread Starter
gt
(@gt)
I did what you said. I edited a post and set the cutoff to 1. I tried to post a month old post and it still let me. I also installed wp-hashcash and apparently I’m not skilled in getting that right because I got hit with more spam. Any other ideas? Thanks for the help so far.
Thread Starter
gt
(@gt)
Oh, another thing is, am I doing it write by cutting and pasting the sample script off the auto-close comment plugin and then uploading it to the respective drive? Thanks.
The plugin:
Copy everything from <?php to ?>
Paste into notepad
Save as ‘autoclose.php’
Upload to /plugins
Activate
You doing that ?
Thread Starter
gt
(@gt)
Podz,
I didn’t have it saved as ‘autoclose.php’ It was saved as ‘closedcomments.php’ I will give it a try with that. But, I basically copied everything like on the plugin page:
<?php
/*
Plugin Name: Auto-Close Comments
Version: 0.1
Plugin URI: http://wiki.wordpress.org/Auto%20shutoff%20comments
Description: Autoclose comments after XX number of days without a cron job
Author: Scott Hanson
Author URI: http://www.papascott.de/
*/
function autoclose_comments() {
global $wpdb, $tableposts;
// Set $age_cutoff to the age at which a post should become stale
$age_cutoff = ’15 DAY’;
$cutoff_date = $wpdb->get_var (“SELECT DATE_ADD(DATE_SUB(CURDATE(), INTERVAL $age_cutoff), INTERVAL 1 DAY)”);
$wpdb->query (“UPDATE $tableposts SET comment_status = ‘closed’ WHERE post_date < ‘$cutoff_date’ AND post_status = ‘publish'”);
}
add_action(‘publish_post’, ‘autoclose_comments’, 7);
add_action(‘edit_post’, ‘autoclose_comments’, 7);
add_action(‘delete_post’, ‘autoclose_comments’, 7);
add_action(‘comment_post’, ‘autoclose_comments’, 7);
add_action(‘trackback_post’, ‘autoclose_comments’, 7);
add_action(‘pingback_post’, ‘autoclose_comments’, 7);
add_action(‘edit_comment’, ‘autoclose_comments’, 7);
add_action(‘delete_comment’, ‘autoclose_comments’, 7);
add_action(‘template_save’, ‘autoclose_comments’, 7);
?>
That’s exactly what it is on the plugin page except for the interval. Is that right?
Thread Starter
gt
(@gt)
Oh, there are appropriate spaces in the above. I just pasted it there like that.
I had the opposite problem with this plugin on my site. When activated, I get only error messages when I try to make a new comment on the most recent post. The older posts were closed to comments though.
In the end I had to activate it then deactivate it (the closed comments stayed closed) to permit commenting on my most recent posts.
Wierd.
I get the same error. It says header alerady sent. I’m using WP 1.2.2
Thread Starter
gt
(@gt)
I can still leave a comment on older posts. Arrrgh! So frustrating.
When I go to older posts I can’t leave a comment. But the spammers can!!! I’ve just had a flood of them on old posts. Very frustrating.
I also can’t get Kitten’s spam words running on 1.2.2 – the delete as spam button has disappeared from admin altogether.
When I activate spam karma on the other hand, regardless of changes I make to the set up page, everything gets moderated. Even my own comments when I’m logged in as admin.
Grrrrrrrrrrr