Plugin request: character count limit on comments

Creating and modifying plugins.
Post Reply
dvotaw
Posts: 1
Joined: Wed Feb 11, 2009 4:16 pm

Plugin request: character count limit on comments

Post by dvotaw »

Hi,

Client asked me to put up a blog for him. I chose Serendipity and I like it a lot. But Client is very well known in this city and is concerned that people will post really long comments to his blog entries. He's asked for a 1000-character limit to be enforced on comments. Ideally there would be some sort of counter that increments as people type but at a minimum he wants it to refuse to post and display an error message like "Sorry, your post is too long. Please trim it down to 1000 characters or less."

I have looked and can't find any plugins that offer this capability. Any ideas? BTW I am sort of a mid-level PHP programmer and can do some things!
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Plugin request: character count limit on comments

Post by garvinhicking »

Hi!

There's no functionality for this yet. You could create an event plugin listening on the frontend_comment and frontend_saveComment hook that does the checking for you.

Have a look at other comment-modifying plugins like serendipity_event_livecomment.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply