post-page

Automatically shut off comments for stale blog entries in WordPress Hack

10
responses
by
 
on
November 18th, 2003
in
WordPress Hack
heading
heading
heading
10
Responses

 

Comments

  1. Brian Poirier (1 comments.) says:

    I installed it as above, but it does not seem to work for me.
    As an example, I just put a comment here: http://www.uebelhart.net/index.php?p=12 which is a post much older than anything on the front page.

  2. vika (2 comments.) says:

    I pasted the code in the right place, and when going to

    http://wordsend.org/wp-admin/post.php

    I get the following error:

    Parse error: parse error, unexpected T_STRING in /var/www/wordsend/wp-admin/post.php on line 409

    Line 409 is this one:

    SELECT post_title, ID FROM $tableposts

    Help?..

  3. Mark says:

    This is NOT valid for anything above WordPress 1.0

  4. vika (2 comments.) says:

    Oh! Sad. I did look at your post carefully, and it says 1.0+. Okay, then.

  5. alex says:

    Did you think about doing it by date instead of post ID? Post ID can’t be a bit unpredictable when you take into account draft posts and private posts.

  6. Mark (36 comments.) says:

    Actually, my first instinct was to use the postID because it was readily available. But now that I have had some time to think about it and I have had to fix a few bugs that I did not think about, I believe that using the postID poses some issues. How about searching for entries where post_status=”publish” before including them in the count? I might incorporate that when I get a chance.

  7. Sara (3 comments.) says:

    Could this please be updated for WP 1.0 and higher? I left a message on the WP forum
    board about this. :) Thanks!

  8. Mark says:

    Done. :) Look again.

  9. Mark (36 comments.) says:

    Thats a hard error to fix! :mrgreen:
    Give us some more information please.



Trackbacks/Pingbacks

  1. SPAM Prevention with WP!!
    Are you being spammed? Do you use WP? If the answer is YES, then you MUST read this…..

Obviously Powered by WordPress. © 2003-2013

page counter
css.php