“Greg’s Comment Length Limiter Plugin for WordPress” Comments, Page 1

avatar image

You are currently browsing page 1 of comments on the article Greg’s Comment Length Limiter Plugin for WordPress.

More on WordPress plugins

Greg’s WordPress plugins available at CounsellingResource.com can help you to:

Would you like to reach the community of bloggers using particular plugins? Check out the Sustainable Plugins Sponsorship Network.

You are currently browsing comments. If you would like to return to the full story, you can read the full entry here: “Limit the Length of Comments Left on Your Blog with this Plugin”.

41 Responses (Including 13 Discussion Threads) to “Greg’s Comment Length Limiter Plugin for WordPress”

  1. avatar image
    HotForWords
    1

    Hmmm.. doesn’t seem to work for me.. I just added it to my website.. but perhaps another plug-in is conflicting?

    Can you see why it doesn’t work?

    You can see it here.

    Marina


    • 1.1

      Hi Marina,

      No problem — just have another peek at the usage instructions and how to prepare your comment form. Your comment form doesn’t yet have the correct name attribute, and your textarea doesn’t have the additions made by the gcll_tweak_textarea() function.

      I’m glad to see the other plugin seems to be doing it’s job numbering your comments!

      All the best,
      Greg


    • avatar image
      HotForWords
      1.2

      RTFM right Greg!! Added in the stuff you said in the Readme.. and I am golden!

      Thanks!

      Marina


    • 1.3

      Great!

      All the best,
      Greg


  2. avatar image
    Nyssa
    2

    Ah! This is exactly what I’ve been after for the last couple of days! It will be perfect for my new project :) Thank you very much for writing this plugin. :)


    • 2.1

      I’m glad to hear it — and you’re welcome!

      Just in case you’re looking for a plugin to number your WordPress 2.7 comments, we have one of those floating around here, too… :-)

      All the best,
      Greg


  3. avatar image
    baron
    3

    hi. Thanks for plugin

    perfect.

    Regards


  4. avatar image
    ChuckC
    4

    I have added the plugin and modified the footer.php and the comments.php in the Atahualpa theme as I understood them, but am having problems when comments are pasted into the block. Is that normal?

    The numbers count down in response to keystrokes fine, but after a couple of cut and paste operations the counter seems to get lost. Is there a way around that?


    • 4.1

      Hi Chuck,

      In order to understand the problem, we’d need to nail down the details quite a bit more — e.g., when you say “having problems”, what does that mean? And the counter seems to “get lost”…?

      Feel free to give me a holler via the contact pages if you like, with more information on what you’re experiencing and some registration details I can use to see the problem (since your site requires registration, I can’t see the problem for myself).

      All the best,
      Greg


    • avatar image
      ChuckC
      4.2

      On closer examination it is working fine. The counter doesn’t update on a cut and paste until a keystroke is entered or the maximum number of characters is encountered.

      The fact it did not immediately count down had me confused, but on closer examination it is working fine. You are welcome to try it at garlandgop.com using the subscriber level user “test” with password “xyzzy”, but it works the same as the counter on your site.

      Many thanks this counter is a tremendous improvement to me.


    • 4.3

      Hi Chuck,

      Excellent — I’m glad to hear it’s working well!

      That password for the subscriber test account takes me right back to ‘inside the building’…way better than being in a maze of twisty little passages…

      All the best,
      Greg


  5. avatar image
    Tyler
    5

    Hi Greg – I’m almost there. I’m trying to install with Automattic’s new P2 Theme (with WP2.7), which mimics Twitter.

    I have the limiter working, so that when the character limit is hit, the text input stops taking characters. And I’ve manually placed the character countdown box in a number of places, and it displays the limit I have set (280), but it doesn’t count down.

    I’ve tried it on two different browsers, just in case it was JS not turned on, but that doesn’t seem to be the case. I’ll try to paste the code here, but if not, let me know what I can answer…

    Thanks!

    <form id="commentform" action="/wp-comments-post.php" method="post">

    <textarea id="comment" name="comment" cols ="45" rows="3" >

    Logged in as <a href="/wp-admin/profile.php">. <a href="/wp-login.php?action=logout" title="Log out">Log out →

    Name (required)
    <input id="author" name="author" type="text" value="" />

    Email (required)
    <input id="email" name="email" type="text" value="" />

    Web Site
    <input id="url" name="url" type="text" value="" />

     <img src="/i/indicator.gif" alt="Loading..." />


    • 5.1

      Hi Tyler,

      Your comment form needs a name attribute of ‘commentform’ — from what you’ve pasted, it looks like it has an id attribute of ‘commentform’, but no name.

      Good luck!

      All the best,
      Greg


    • avatar image
      Tyler
      5.2

      worked beautifully, thanks Greg!

      i’m still trying to figure out how to get the [more] button going with the_excerpt for posts, or modify the_content to limit posts (all automatically), but that’s another plugin entirely, I suppose.


    • 5.3

      I’m glad to hear it! :-)

      All the best,
      Greg


  6. avatar image
    DOM
    6

    I did everything the way it was described but it still doesn’t work! Any ideas? I am using WP 2.7.1…

    <form action=”/wp-comments-post.php” method=”post” id=”commentform” name=”commentform” >

    [...]

    <textarea name=”comment” id=”comment” tabindex=”4″ cols=”100%” rows=”4″ >

    [...]


  7. avatar image
    DOM
    7

    And one more time

    <textarea name="comment" id="comment" tabindex="4" cols="100%" rows="4" >


    • 7.1

      Hi DOM,

      If you’re having trouble posting the code, you could always try posting a link to the code instead. From what I can see so far, you have the form tag prepared, but not the textarea tag. I.e., the textarea tag doesn’t yet have the function call…or did that bit just get eaten by the WordPress code-in-comments guardians?

      Also, have you used the previous version successfully, or is this your first use of the plugin, with version 1.2?

      All the best,
      Greg


  8. avatar image
    Harrison
    8

    I added the code you listed and the countdown box works on my site but when I try and open the settings for it I get this message:

    Fatal error: Call to undefined function: wp_specialchars_decode() in /homepages/43/d274348678/htdocs/wp-content/plugins/gregs-comment-length-limiter/gcll-options-functions.php on line 241

    Any idea why?


    • 8.1

      Hi Harrison,

      Hmmm, that’s pretty weird if you’re running 2.7 or above (which is required for the plugin), since the function which the error message is telling you hasn’t been defined is defined by the WordPress core. (You can verify whether it’s missing from the WordPress core by checking in wp-includes/formatting.php. The current version of that file looks like it has a date stamp of 29 Jan 2009.)

      The usual advice for something going wrong in the WordPress core is just to re-upload the original files, following the instructions available at the WordPress site.

      I hope you’re able to get things back in fully working order — it’s probably only a matter of time before some other bit of code wants to use that same function, so the sooner it’s available, the better.

      All the best,
      Greg


  9. 9

    [...] II) Comment length limiter [...]


  10. avatar image
    Rafael Arcanjo
    10

    Hi Dr. Greg,

    I’ve tried to put that on my blog with the new version 1.2.1 and couldn’t show the box , I don’t know why.

    The old version was working.

    Look at the site above.

    I have a wp_footer() call on my footer.php and if you need my code from the textarea, call me on my mail.

    ps: sorry for my bad english :(


    • 10.1

      Hi Rafael,
      I can tell from looking at your source code that the plugin is installed and functioning, and the JavaScript is being included as it should be, with a length limit of 800 characters. What I cannot tell without being registered at your site is whether your comment form is correctly configured to enable the JavaScript to work.
      I’m afraid I can’t offer much more feedback, since without being registered at your site, I can’t even see the comment form, let alone check what might be happening with it.
      I would recommend, though, that you have a peek at the plugin settings page (which has been updated) just to double-check that everything is set the way you want it to be, and then test once more.
      All the best,
      Greg


    • avatar image
      Rafael Arcanjo
      10.2

      Hi Greg, Thanks for your patience!

      I think my plugin settings page is correct. There is not much information to make a mistake (I hope.. hehe)

      Limit: 800
      Automatically insert the box: Yes
      Text to Display: caracteres disponíveis
      Action for Oversized Comments?: Moderate
      Disable from administrators: Yes

      My comment form has a name commentform and I think my textarea is Ok.


    • 10.3

      Hi Rafael,

      Again, I cannot offer much without being able to see what is actually happening on your site (which I cannot do without being able to log in).

      Note, however, that you will not see the length limiter box at all while you are logged in — since you have specified that the plugin’s functionality should be disabled for administrators. (I’m assuming that you mean the box doesn’t appear for other users, since it is designed not to appear for you, given your settings…)

      All the best,
      Greg


    • avatar image
      Rafael Arcanjo
      10.4

      What a Shame, Greg!

      I Forgot that I’m administrator and don’t see the box ! OMG ! What a Shame !!!

      It’s working pretty well. My bad, my bad !

      Thanks, Dr. Greg(ory House)!


    • 10.5

      No problem, Rafael — glad it’s working for you. :-)


Page 1 of 212»

Join the Discussion!

We support Gravatars rated PG or G; if you don't have a Gravatar, we'll display a mathematically created identicon next to your comment.

A valid email address is required to enable you to personally verify and authorize your comment for posting. It will not be displayed in your post or used in any other way. SPAM comments will be deleted, as will those attempting to circumvent the Gravatar rating system or attempting to circumvent our Terms of Use by employing Gravatar images to advertise on this site.

 characters available

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting