Support » Plugins and Hacks » 1.2 plugin request: Close comments after X time.

  • I would love to have a pluging that closed off the comments for entries as they dropped off the frontpage. This would also help combat spam.

Viewing 8 replies - 1 through 8 (of 8 total)
  • nsxpower

    (@nsxpower)

    http://theubergeeks.net/index.php?p=162 is a “better” solution (although it is yet to be shared), since posts may drop off the front page sooner that the interest (and relevant comments) in that particular entry.

    stephenv

    (@stephenv)

    I second this plugin request…
    Also to respond to nsxpower:
    Some of us have blogs where we post multiple times per day (~6x/day and show latest 15 on front), it is more helpful to have comments close after a set time, mostly because traffic will turn up later from search engines on particular topics and it is nice to be able to catch the stragglers and let them have their say (in my case, 2 weeks max open).

    RedDwarf

    (@reddwarf)

    That works great lomara, thanks! I added it as a clickable in my template section so I don’t have to remember the filename. :p

    mikelu

    (@mikelu)

    I did some modification in wp-comments-post.php to approach the concept that nsxpower mentioned. Maybe you can check to see if it fits your need on my site.
    comment moderation
    PS. My site is written in Chinese, but you can still see codes for the modifications.

    southerngal

    (@southerngal)

    Lomara, what do I do with the script after it’s be configured? How and where do I call it in, or do I have to?

    I’m not sure either .. I have 3 sites on which I want to use this, but all will be different ..
    Has anyone written this as maybe a button on the admin screen that can be clicked so that it activates ?

    lomara

    (@lomara)

    southerngal, just make the edits in the script to point at your database, choose the age of comments you want to close, and load the page in a browser window. It will run just by calling it with a browser.
    Podz, you could add it as an entry in menu.php, then run it periodically from the admin screen. That’s one option. If you are running 3 blogs in a single database, then you would probably have to make 3 copies of the script, and edit the table references to point at each blog post/comment table individually. It would be clunky, but it could work.
    I’m sure if others have better suggestions they’ll let us know. I’m still a newbie at php.

    Upload the correctly configured php file to the wp-admin directory.
    Edit menu.php and add this into the array:
    array(__(‘Close Comments’), 3, ‘wp-closecomments.php’),
    Change the 3 to whatever level of user can do such a task.
    Now to try and work out how to make it do what it does without exiting the admin screen, or by flicking straight back to it.
    Either way, nice script 🙂
    Ta !

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘1.2 plugin request: Close comments after X time.’ is closed to new replies.