info@elgg.org
Security issues should be reported to security@elgg.org!
©2014 the Elgg Foundation
Elgg is a registered trademark of Thematic Networks.
Cover image by Raül Utrera is used under Creative Commons license.
Icons by Flaticon and FontAwesome.
- iionly@iionly

iionly - 0 likes
- adminer@adminer

adminer - 0 likes
- iionly@iionly

iionly - 0 likes
- adminer@adminer

adminer - 0 likes
You must log in to post replies.Adding a counter for example for blogs might not be as easy as adding a counter to the wire. Blogs use the tinymce editor for text input. When limiting the text you would want to inform the writer prior saving that the limit is reached. This means you would rather need to implement the counter into the tinymce editor code that is bundled with Elgg than implementing it as a regular Elgg plugin.
It's possible to enhance the tinymce editor embedded in the tinymce plugin with tinymce-plugins to add functionality. For example at http://sourceforge.net/tracker/index.php?func=detail&aid=1951798&group_id=103281&atid=738747 you can download a plugin for the tinymce editor to implement a character counter (not tested myself yet). The counter plugin will then be active everywhere the tinymce editor is used for text input (like comments, pages, blogs etc.). If you want a word counter instead of the character counter, you would need to modify the plugin accordingly. But it might give you at least a starting point.
Thanks for responding iionly. I started experimenting with TinyMCE enabled, because seems the best solution cause implements a word count, and then installing a TinyMCE character limiter plugin, but I don't know how to convert it to limit words instead of characters, and neither can't make shows the characters count. As not get results, then I have done many tests with TinyMCE disabled, so that the text is entered as in Thewire the text box whith no options to format. I have not gotten it to work, unfortunately.
I've tested the character limiter plugin briefly yesterday. I also haven't managed to get the number of remaining characters to show (mainly because I haven't understood what this plugin expects as input ID - Elgg input or tinymce input specific?). But the character limitation worked at least.
As Elgg 1.8 has a word counter already implemented in the bundled tinymce plugin you might be able to expand this word counter to a word limiter by studying the code of the character limiter plugin.
Or this code snippet might help you: http://snipt.net/tamewhale/add-word-count-and-limit-to-tinymce. It already implements a word counter + limiter and it's implemented in the same way as the Elgg tinymce word counter.
Yeah, I get it to work at least as limiting, but then it's easier to use 'maxlength'. Anyway I'll back to try the TinyMCE plugin to see if I get to count words, but I tried and I can't understand how can I do it, my knowledge is rather limited. Anyway thank you very much for the help iionly ;-)