Wordpress Plugins – Extensions

Just another WordPress.com weblog

Greg’s Comment Length Limiter 1.2.9

Author: Greg Mulhauser
This plugin provides a configurable limit on the length of comments left in the comment form, with a character countdown displayed for the user and dynamically updated with each keypress

Unzip the plugin archive
Upload the entire folder gregs-comment-length-limiter to /wp-content/plugins/
Activate the plugin through the ‘Plugins’ menu in WordPress
Go to Settings -> Comment Length Limiter to configure your preferences
Update your template’s comments.php with one or two function calls, as described below


With just a single line of code, most themes which support WordPress 2.7 will also support the comment length limit provided by this plugin. (Note that themes must include the wp_footer() call in order for this plugin — and many others out there — to work correctly.)

Make sure your comment form has a name attribute of commentform. (The default template includes an id with this value, but not a name attribute.)
Add the following function call within the textarea tag for your comment area, preferably wrapped in a conditional that tests whether the function exists: <?php gcll_tweak_textarea(); ?>

For example, here is how the WordPress 2.7 default theme’s comment textarea looks after updating the tag to support Greg’s Comment Length Limiter plugin:

<p><textarea name=”comment” id=”comment” cols=”100%” rows=”10″ tabindex=”4″ <?php if (function_exists(‘gcll_tweak_textarea’)) gcll_tweak_textarea(); ?>></textarea></p>

Optionally, if you would like to position the countdown box yourself, add the following function call wherever you would like the box to appear within your comment form, again preferably wrapped in a conditional that tests whether the function exists:

<?php gcll_show_limit_box_manually(); ?>

The plugin settings page allows you to specify whether you would like the plugin to place the countdown box automatically, or whether you would prefer to do that yourself. If you specify that the plugin should place the countdown box automatically, that setting will apply even if you also include manual placement code within your theme — in other words, the plugin is intelligent enough not to attempt to do it twice. So, if you’d like to compare your placement with the default placement, you can flip the manual placement setting on and off and view the results, without repeatedly adding and deleting the call from your theme.

Direct Calls

For styling purposes, manual calls to display the countdown box, using <?php gcll_show_limit_box_manually(); ?>, can also take one parameter specifying your preferred class for the <span> which encloses the box: <?php gcll_show_limit_box_manually(‘mypreferredclass’); ?>.

The default <span> class is countdownbox.

Safe Wrapping of Plugin-Dependent Function Calls

I cover safe wrapping of plugin-dependent function calls on the information page for one of my other plugins:

Greg’s Threaded Comment Numbering Plugin

Deactivating and Uninstalling

You can deactivate Greg’s Comment Length Limiter plugin via the plugins administration page, and your preferences will be saved for the next time you enable it.

However, if you would like to remove the plugin completely, just disable it via the plugins administration page, then select it from the list of recently deactivated plugins and choose “Delete” from the admin menu. This will not only delete the plugin, but it will also run a special routine included with the plugin which will completely remove its preferences from the database.

I’ll be maintaining a FAQ at the main information page for the plugin, where it can be updated independently of new releases.

BP Posts On Profile 0.1


April 20, 2010 - Posted by | download, extension, extensions, free, get, internet, plugin, plugins, Uncategorized, wordpress

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: