Jul
22
2006

Extended Comment Options for WordPress

Current version: 2.0

PLEASE NOTE: Work is underway on version 2.5 which will improve the interface and fix various errors which seem to be cropping up with the latest versions of WordPress.

This is now in the testing phase!

One feature which is conspicuously absent from WordPress is the ability to switch comments on or off for all posts. Under the Options > Discussion page, you can switch the default setting for comments on or off, but that only applies to posts you make from that point forward.

You can disable comments on individual posts, but if you’ve got more than twenty posts, this takes ages! This plugin allows you to quickly and easily switch comments (and trackbacks/pingbacks) on or off with a single click.

Extended Comment Options 2.0 has been tested on WordPress versions 2.3.2. Support for versions below this cannot be guaranteed. Upgrading to the latest version of WordPress is always recommended. If version 2.0 does not work, you can always try previous versions, though these do not have all of the features of 2.0 (the links are below).

Hidden Comments

Please note that this plugin does not hide existing comments. If you find comments being hidden after they have been closed, it is likely that your theme (i.e. the design of your blog) is hiding comments. If this is the case, please contact the author of that theme.

Instructions

The plugin adds a page under “Comments” called “Comment Status”. This page is split into two main sections: “Simple Settings” and “Advanced Settings”.

Simple Settings

You can quickly open or close all discussion on every single post by clicking the appropriate button under the “One-Click” heading. It also synchronises your Discussion options for future posts (i.e. the default settings for new posts).

If you want to open discussion on the last X posts/days/weeks/months/years, you can use the setting under “Posts in the last…”. If you have previously used the “Advanced Setting” form to exclude posts, this setting will respect that. You can set this to happen automatically, too.

Advanced Settings

This section gives you more control over discussion options. You can choose whether you want to open/close comments or pings, or both. You can also choose whether you want to change the default setting for new posts.

In the “Which posts?” section, you can choose which groups of posts you want to affect. The first two are for new posts and existing posts respectively. The third option allows you to open/close discussion on posts made before or after a specific date.

The fourth option allows you to, for example, open discussion on the last five posts, or on posts made in the last month, or the last 2 years. It then closes discussion on the remaining posts. The fifth option allows you to close comments on posts with a certain number of comments. These two options can be applied automatically, so you don’t need to keep applying it.

Excluding posts

Finally, you can choose to exclude certain posts completely. This is useful if you have a post which still draws comments long after it was originally posted. You can close discussion on all posts, but leave it open on that one post.

To exclude a post, simply enter its ID in the text box. If you want to exclude more than one post, separate each ID with a comma (you can also separate them with a comma and a space). You can find a post’s ID on the “Manage” page in your WordPress admin area.

Please note that the “One Click” setting overrides this, and will open or close discussion on all posts regardless.

Results

If everything has gone well, the plugin will display a brief summary of what you asked it to do. You can use this to check that it’s done what you wanted it to do.

Installation

Extended Comment Options is installed like any other WordPress plugin. Download the .zip file, and extract it. Place the file named “commentcontrol.php” in your wp-content/plugins directory, and activate it in the usual way from the “Plugins” page in your admin area.

Upgrading

Upgrading is really easy. Just overwrite the commentcontrol.php file with the new version. You may need to re-activate the plugin from your admin area.

Support and Future versions

Feature requests are always more than welcome.

I’m happy to provide support for this plugin. Comments are temporarily closed on this page due to spam, but you can email me at beingmrkenny@gmail.com, or visit the plugin’s page on WordPress.org.

Version History

Current Version: 2.0

Monday 10th January, 2008

  • Added a new option: “When number of comments reaches a certain number”
  • Major new feature: automatically close comments. So you can set comments to close on posts older than 30 days, and it’ll update automatically each day.
  • Polished a few of the messages, made them easier to understand. Also reworded the admin interface to make it easier to understand.
  • Behind the scenes: security is tighter. Also dates are calculated differently: One month ago from the 10th Jan is the 10th Dec. One year ago from 10th Jan 2008 is 10th Jan 2007, instead of being counted as everything beyond the current year.

Version 1.2

Friday 21st September, 2007

  • The page now shows up under the “Comments” menu in WordPress, as opposed to the “Options” menu.
  • The plugin now reports which posts were not affected (if selected) a lot more efficiently.
  • The “Simple settings” options were previously changing the excluded posts setting. This is now no longer the case.
  • Now supports more recent versions of WordPress (v 2.2) — specifically, it only affects published posts, no longer pages.

Version 1.1

Tuesday 25th July, 2006

  • Tightened security
  • “Last X posts” — fixed bug arising when X was greater than total number of posts!
  • Compatible with WordPress v1.5.2.

Version 1.0

Saturday 22nd July, 2006

  • Extended Comment Options first released!
Written by Mark in: All and sundry |

48 Comments

  • [...] Check out all the details and get the plugin at Being Mr Kenny. [...]

    Pingback | Monday, July 24 2006
  • Sweet, just testing it atm, looks promissing

    Comment | Monday, July 24 2006
  • [...] WP Plugin: Extended Comment Options Turn on and off trackbacks and comments on your Wordpress blog with complete abandon. Extra features include the ability to turn off comments for posts of your choice or a timeline of your choice. Thanks BloggingPro tagged extended comment options, wordpress and wordpress plugin   Related Posts from the Past: [...]

    Pingback | Tuesday, July 25 2006
  • CT

    Compatibility? Is this for WP 2.x only, or will it work on 1.5.x?

    Comment | Tuesday, July 25 2006
  • Hi CT,

    Just released an update which I tested on WP v 1.5.2, and it’s compatible. Thanks for asking!

    Comment | Tuesday, July 25 2006
  • CT

    Excellent. I do think I’ll give it a spin.

    Comment | Tuesday, July 25 2006
  • Brilliant! That’s why I love WP, you think of something you need for your blog, and some smart person writes a plugin for it :P

    Thanks :D

    Comment | Tuesday, July 25 2006
  • [...] Extended Comment Options Un plugin para manejar de manera más sencilla los comentarios en Wordpress. (tags: plugin plugins wordpress blogs blog) Agrega esta entrada a tus gestores de favoritos (social bookmarking):These icons link to social bookmarking sites where readers can share and discover new web pages. [...]

    Pingback | Wednesday, July 26 2006
  • [...] Extended Comment Options « Being Mr. Kenny Wordpress Plugin: ‘open or close all discussion on every single post by clicking the appropriate button under the “One-Click” heading. It also synchronises your Discussion options for future posts’ (tags: plugins WordPress wp-plugins) [...]

    Pingback | Thursday, July 27 2006
  • ..

    [...] Extended Comment Options « Being Mr. Kenny (Tags: plugins wordpress) Social Bookmarking:These icons link to social bookmarking sites where readers can share and discover new web pages. [...]

    Pingback | Thursday, July 27 2006
  • [...] If you like to turn comments off on old posts, or even just trackbacks, this plugin by Being Mr Kenny will make your life much easier. It has simple and advance settings for managing comments on new and old posts. [...]

    Pingback | Friday, July 28 2006
  • [...] Check out all the details and get the plugin at Being Mr Kenny. [...]

    Pingback | Tuesday, August 1 2006
  • [...] Extended Comment Options « Being Mr. Kenny Plugin de Wordpress para manejar los comentarios con mas y mejores opciones (tags: wordpress plugin plugins comments commentators comment advanced) [...]

    Pingback | Saturday, August 5 2006
  • [...] Check out all the details and get the plugin at Being Mr Kenny. « Chitika Release WordPress Plugin v2.0 [...]

    Pingback | Thursday, August 17 2006
  • [...] August cardsbase02:46 amAdd comment Comment control is an ongoing issue for many bloggers using WordPress and other tools, but now there is a plugin that will help to solve this problem, atleast for controlling opening and closing comments and trackbacks called Extended Comment Options. Advanced Options This section gives you more control over discussion options. You can choose whether you want to open/close comments or pings, or both. You can also choose whether you want to change the default setting for new posts. In the “Which posts?” section, you can choose which groups of posts you want to affect. The first two are for new posts and existing posts respectively. The third option allows you to open/close discussion on posts made before or after a specific date. The fourth option allows you to, for example, open discussion on the last five posts, or on posts made in the last month, or the last 2 years. It then closes discussion on the remaining posts. Check out all the details and get the plugin at Being Mr Kenny. [...]

    Pingback | Friday, August 18 2006
  • [...] I’ve had a few posts in the recent weeks coming through off old posts. Whilst a blog is there for news, information etc. sometimes you just don’t want to go back over old ground. After someone else asked how to stop comments after X posts I took a quick look and found a plugin called Extended Comment Options. This simply gives you more options with your comments and you can control when comments close, whether to keep certain ones open, whether to close pingbacks as well etc. So I’ve set comments to close after 3 months however I may run through and select a few to keep open, mainly on my PHP posts. [...]

    Pingback | Wednesday, September 13 2006
  • Blippy

    I’m looking for a plugin that will allow me to specify an X number of comments (ie. 10)before closing (and excluding pin/trackbacks). I was told this plugin was capable of this but I cant see it as an option. Ideas?

    Comment | Wednesday, September 13 2006
  • [...] *For all of you who use Wordpress and have big tit alerts and enough Viagra offers to keep an army happy, I have some good news. I’ve installed the plug-in Extended Comment Options for WordPress which closes old comments so those pesky scammers don’t invade. I also have Askimet and Spam Karma. This combination has saved me many a spam headache since installing it all. Just thought you should know! [...]

    Pingback | Wednesday, September 13 2006
  • @Blippy:

    Did you mean you wanted to do that automatically, each time a new post is made? If so I’m afraid my plugin can’t do that for you at the moment :(

    But you can do it yourself, in the Advanced Settings section:

    1. Set the status to: open
    2. Apply this to: make sure only the Comments checkbox is checked.
    3. You may uncheck the default status box if you wish
    4. Set “The last” to 10 and make sure “Posts” is displayed in the drop-down menu.

    Then click Update!

    Comment | Thursday, September 14 2006
  • Hans

    I’m looking for a plugin that will either just supply a link which when clicked upon shows all comments made, preferably being able to set a max number per page with navigation for next page/previous page.

    It would be cool if this could be done from the dashboard too.

    Is this possible with this plugin?

    Comment | Tuesday, October 17 2006
  • Hi Hans,

    No my plugin doesn’t do that, but the Paged Comments plugin does!

    Comment | Tuesday, October 17 2006
  • Hans

    Thanks Mark :)

    Comment | Wednesday, October 18 2006
  • Pi.

    I note that the program has to be reactivated at regular intervals as the ‘close everything older than 25 days’ (for example) doesn’t automatically update each day. Perhaps in the next update?

    Also, can you perhaps consider an option whereby pings and trackbacks remain but comments are closed and vice versa?

    More than happy with the plug-in otherwise, as it means by Akismet has considerably less to do, since the bulk of comment spam is aimed at older posts.

    Pi.

    Comment | Saturday, December 2 2006
  • is there a way to tweak the plugin to add the option “set comments status to closed when the number of comments gets to ______?”

    i know it sounds weird, i think someone else requested something similar, but it seems like it would be useful, and i need it in the project i am working on, so when someone comments it would automatically close comments on that post - that way i can use the “if comments closed” php tag

    i am crazy i know

    Comment | Thursday, June 28 2007
  • Nice plugin what I was looking for.. Will test soon
    Thanx

    Comment | Thursday, November 1 2007
  • Would there be a way to modify this plugin so that it can force comments for a specific post to be moderated? There are some instances where I think it would be helpful to have a post’s comments moderated on a post-by-post basis.

    Comment | Friday, December 28 2007
  • Hi Jenn,

    Good idea, that’s something for me to think about for the next version. When I get some time I’ll look at that, and a couple of other solutions people have posted here. Thanks!

    Comment | Saturday, December 29 2007
  • Is it (or could it be made) possible to have old posts set so that it’s not possible for someoen to add a new comment, but that old comments are still readable? It seems to me that this plugin, when it closes posts to comments, it hides comments that are already there. I find that 99% of spam comes in as comments to old posts but I’d like to be able to block it without losing comments that people have already made.

    Comment | Tuesday, January 8 2008
  • Hi Karl,

    I deliberately made Extended Comment Options so that it doesn’t hide existing comments. It’s probably your theme that is doing that.

    If you know PHP you can look in the file called single.php in your theme folder, there’ll probably be a conditional which inserts the comment form and comments if comments are open. Normally, it’s only the comment form that’s inside the conditional.

    If not, get in touch with whoever designed the theme or someone who can help with PHP. The support forums are a great place to start.

    Comment | Tuesday, January 8 2008
  • chris

    Hey,

    I got a website im working on at the moment, while i have comments i’d like to turn off for certain posts i’d also like to remove certain aspects from those particular posts also, like the date ect..

    Is it possible to use the code you use to turn off the comments but also adapt it so it wraps around other variables in the page like;

    IF commentsystem = off DO NOT DIsplay Date ELSE Display Date

    Comment | Friday, January 11 2008
  • I haven’t been into a theme file in a while, so I can’t remember if this is exactly right, but I think whether comments are open or not is stored in a variable called $comments. All you’d need to do would be to check if this has a value of true or not:

    < ?php
    if (true == $comments) {
    post_date(); // Or whatever it is, I forget...
    }
    ?>

    Comment | Friday, January 11 2008
  • chris

    Thankyou Mark, ill give this a try tonight. I appreciate the help.

    Comment | Friday, January 11 2008
  • There is not any mention about 2.0 in the history here and neither in WP extend (or I cant see it). And jumping to 1.2 to 2.0 is a high jump… :)

    Please, could you tell us what is changed in the 2.0?.

    Thanks!

    Comment | Sunday, January 13 2008
  • Samuel:

    Hehe, sure. I’m gonna update the page soon, when I get some time, but the biggest change is the automatic feature (you can set comments to close automatically now). Also, you can close comments once there’s a certain number of them, which a couple of people have asked for.

    There are some other small changes, better security and a different way of working out dates, but they’re largely behind the scenes.

    Comment | Monday, January 14 2008
  • Great plugin, thanks for your efforts on this, however ….

    when I try to set the automatic schedule to close comments older than 3 months it says it has done it with the messages, but on returning it does the opposite!

    So, if I select Open (radio button) all comments older than 3 months from now on it sets them to closed as required. Bascially there is a bug reading the Open/Close radio button round the wrong way.

    I hope this helps.

    Comment | Thursday, February 21 2008
  • Thanks Ross, I’ll look into this as soon as I can!

    Comment | Thursday, February 21 2008
  • Thanks for the plugin.
    Would be great if it managed pages too (as opposed to just posts).
    Thanks again.
    Chris Masse

    Comment | Monday, March 10 2008
  • Hi Chris,

    That will be the next feature to be added!

    Mark

    Comment | Monday, March 10 2008
  • Nice plugin what I was looking for.. Will test soon
    Thanx

    Comment | Wednesday, March 19 2008
  • Manolo

    wow!

    Comment | Wednesday, April 2 2008
  • Nice plugin what I was looking for.. Will test soon
    Thanx

    Comment | Thursday, April 10 2008
  • Is it compatible to WP 2.5? If not, do you plan to update it in the future?

    Comment | Monday, April 14 2008
  • Hi Tari (and everyone)

    Looks like there’s a few problems with the latest upgrade. Gonna take a look at it this weekend, though.

    Cheers!

    Comment | Friday, May 2 2008
  • Is it possible for the settings in the comment status page’s Advanced Settings section to be maintained so you can easily see what you had once selected? Currently mine always revert back to the default settings. Thank you.

    Comment | Saturday, May 3 2008
  • Just to keep people posted… I’m working on a new version of the plugin, which should be available in the next few weeks as I get time to work on it!

    Comment | Thursday, May 8 2008
  • Suzanne

    Thanks for this very handy plug-in Mark. I’m just curious if one of the bugs that appeared with the new version of WP was the inability to undo previous actions. Not sure how to put that clearly, but at one point I turned off comments older that (I think) January 1, 2008 and now, no matter what I try, they won’t turn back on.

    I figured it was due to the WP update, but I thought I’d check.

    Cheers!

    Comment | Saturday, May 17 2008
  • Nice plugin. I wish I could use your tool to close only a few selected posts and pages to comments.

    Thanks for making this code available,

    Ron

    Comment | Saturday, May 24 2008
  • Thanks Ron. I take comments like this on board, these are good ideas that I’d like to incorporate into future versions.

    Comment | Sunday, May 25 2008

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes