Greg’s Comment Length Limiter Plugin Updated with Anti-Spam Options
Our WordPress plugin for limiting the length of comments left on blog entries now includes options for how to handle long comments that get through the JavaScript limit.
IMPORTANT UPDATE: This plugin now has a newer version! For information on the version 1.2 release, please see the update announcement here: “WordPress Comment Length Limiter Plugin Updated”.
This new release comes with a big thank you to all the folks who have sent along feedback on the initial version — I really appreciate it!
Here’s what’s new in version 1.1 and 1.1.1:
- Anti-Spam Measures for Oversized Comments
- Since the basic comment length limit functions rely on JavaScript, that means users — or spambots — running without JavaScript enabled will still be able to enter comments over the length limit. You can now choose whether to mark those comments for moderation, mark them as spam, forcibly truncate them, or just pass them through without modification. As of version 1.1.1, we also prevent the Spam Karma 2 plugin from reversing our decision to moderate or mark as spam.
For more background on the plugin, please see the original release plugin page here: “Greg’s Comment Length Limiter Plugin for WordPress”.
Get the Plugin!
You can download the plugin right here: Greg’s Comment Length Limiter Plugin.
Other articles by Dr Greg Mulhauser, Managing Editor
This article was last reviewed by Dr Greg Mulhauser, Managing Editor on Tuesday, 10th February 2009. You can leave a reply below.
The URL of this page is:
http://counsellingresource.com/features/2009/02/10/comment-plugin-anti-spam-features/

4th March 2009
Hi. I am having trouble using this plugin. The text box is truncating the comment size but the characters available counter is not counting down. I am assuming this has something to do with the fact that I don’t have a ‘commentform’ Name Attribute, but I am not sure how to add this or where to add it. Any help would be beneficial.
Thanks.
4th March 2009
Hi Russ,
If you have a peek inside the comments.php file in your theme, look for the opening
formtag, which will very likely have the following attribute inside it:id="commentform"You’ll just need to add the following along with that:
name="commentform"If that’s the problem, that should allow the comment counting box to work correctly. (It also requires that JavaScript be enabled in the user’s browser.)
All the best,
Greg
4th April 2009
Just did an upgrade to the new version and the counter is suddenly broken and wont count down the number of characters. Checking in the JS firefox console I get the following error Error: gcllCounter is not defined. Any idea what is causing this?
5th April 2009
Hi Jack,
Hmm, that’s an error you’d ordinarily see only if your theme were missing the standard call to
wp_footer(), which this plugin relies on to make sure its JavaScript gets included on the page.Was the plugin working fine for you, then you upgraded, and suddenly it is not working — but with no other changes in the interim? (And you do have JavaScript enabled in your browser, I assume?) When you scan through your source code, do you see some inline JavaScript right near the bottom, flagged with a comment line that says the following:
<!-- Start Of Script Generated By Greg's Comment Length Limiter Plugin 1.2 -->If the answer is no, then it sounds like something might be interfering with the addition of the JavaScript via the standard WordPress
wp_footer().All the best,
Greg
6th April 2009
Hi Greg, thanks for your response. You are right, I had mistakenly deleted wp_footer() in my footer. Put it back and everything is now working fine.
Thanks
6th April 2009
Excellent — glad to hear it! :-)
All the best,
Greg