Skip to:
Content
Pages
Categories
Search
Top
Bottom

Comment Lenght Limiter


  • jimgozieo
    Member

    @jimgozieo

    Any one know of a Comment Length Limiter plugin that I can use for my bbPress forum. Your help is appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)

  • chrishajer
    Participant

    @chrishajer

    Where do you want to limit the length of input? Just in the replies? Line length, or overall amount of content? Too long usernames?


    jimgozieo
    Member

    @jimgozieo

    just limit comment to say 2,000 characters


    chrishajer
    Participant

    @chrishajer

    You could do it with JavaScript like this:

    http://www.mediacollege.com/internet/javascript/form/limit-characters.html

    That will just prevent someone from going over that limit accidentally. Since it’s done browser-side, there’s no guaranteed way to limit the input to just 2000 characters. But to prevent a normal user from posting a comment longer than 2000 characters, this would be one way to do it.

    There is probably a way to add a maxlength to the input, but I’m not sure which template file you would need to modify to make that change (probably just post-form.php and edit-form.php, add maxlength="2000" to the textarea for a new post):

    http://www.w3schools.com/tags/att_input_maxlength.asp

    Again, since that’s browser-side, it can be circumvented as well. You’d have to check the input on the server side to ensure it doesn’t exceed 2000 characters. But these two methods will prevent people from posting really long comments.


    jimgozieo
    Member

    @jimgozieo

    thanks, I’ll look into this

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.