Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter gt

    (@gt)

    Podz,

    I am out of ideas. Thanks for the help so far. Any other ideas? Did I do the install correctly? I hate spam!

    Thread Starter gt

    (@gt)

    ^bump

    Thread Starter gt

    (@gt)

    Podz,

    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

    Thread Starter gt

    (@gt)

    I can still leave a comment on older posts. Arrrgh! So frustrating.

    Thread Starter gt

    (@gt)

    Oh, there are appropriate spaces in the above. I just pasted it there like 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, 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.

    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)

    Yes, I activated the plugin. Any other thoughts? I will give hashcash a try if it’s not too difficult to install. Thanks!

    Thread Starter gt

    (@gt)

    ^bump. Anyone?

Viewing 11 replies - 1 through 11 (of 11 total)