Page 1 of 1

Request: counter for letters in entry-backend

Posted: Thu Aug 14, 2008 12:21 pm
by lordcoffee
Hi!

I've found nothing like that so here's what I'm searching for:
I desided to truncate the entries in the overview to 250 letters. It's just a design thing for better looking. And what I wanted is when I'm writing an entry there will be letter-counter while I'm typing. Is that possible?

Thanks, lordcoffee

Posted: Thu Aug 14, 2008 1:51 pm
by judebert
You'd need some kind of Javascript to count the letters. I suppose it could be added to a plugin, but then the display would be odd; you'd have to check the output and add the character counter after the textarea.

I'd recommend modifying the Javascript to add the input directly instead.

Posted: Thu Aug 14, 2008 2:41 pm
by judebert
Hmmm... if you're willing to have the character count between the toolbar and the textarea, you could hook backend_entry_toolbar_body (for the serendipity[body] textarea) and backend_entry_toolbar_extended (for the serendipity[extended] textarea).

You could also edit the template's admin/entries.tpl to insert the count field.

This is starting to look more reasonable the more I look at it.

Posted: Thu Aug 14, 2008 4:08 pm
by lordcoffee
Thanks! I'll have a lokk at it. When I'm done or stucking I'm reporting ;-)