gt
Forum Replies Created
-
Forum: Plugins
In reply to: Help with Auto-close commentsPodz,
I am out of ideas. Thanks for the help so far. Any other ideas? Did I do the install correctly? I hate spam!
Forum: Plugins
In reply to: Help with Auto-close comments^bump
Forum: Plugins
In reply to: Help with Auto-close commentsPodz,
I changed the interval to “1” I then followed what charlie said up top and edited a post. It still let me post on older posts. Does it make a difference if I’m using popup comments? My website is www[dot]gtquandary[com]/wordpress
Forum: Plugins
In reply to: Help with Auto-close commentsI can still leave a comment on older posts. Arrrgh! So frustrating.
Forum: Plugins
In reply to: Help with Auto-close commentsOh, there are appropriate spaces in the above. I just pasted it there like that.
Forum: Plugins
In reply to: Help with Auto-close commentsPodz,
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: https://wiki.www.ads-software.com/Auto%20shutoff%20comments
Description: Autoclose comments after XX number of days without a cron job
Author: Scott Hanson
Author URI: https://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?
Forum: Plugins
In reply to: Help with Auto-close commentsOh, 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.
Forum: Plugins
In reply to: Help with Auto-close commentsI 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.
Forum: Plugins
In reply to: Help with Auto-close commentsYes, I activated the plugin. Any other thoughts? I will give hashcash a try if it’s not too difficult to install. Thanks!
Forum: Plugins
In reply to: Help with Auto-close comments^bump. Anyone?
Forum: Fixing WordPress
In reply to: Auto-Close Comments Plugin w/ 1.3