Action: CharCount
Compatible with: R4.2 Current version: Credits: The CharCount-Code makes part of the WikkaWiki-Messaging-System called WikkaMail[link1] written by GmBowen, "extracted" by AhA[link2] |
{{charcount max=[number]}}
/action/charcount.php
<script> function textCounter(field, countfield, maxlimit) { if (field.value.length > maxlimit) // if too long...trim it! field.value = field.value.substring(0, maxlimit); // otherwise, update 'characters left' counter else countfield.value = maxlimit - field.value.length; } </script> <?php // send a new message to a user if (!$max) {$max = 2000;} { echo '<form name="myform">'; echo '<textarea rows="16" cols="80" name="message" onKeyDown="textCounter(this.form.message,this.form.remLen,$max);" onKeyUp="textCounter(this.form.message,this.form.remLen,$max);"></textarea> <br> <input readonly type="text" name="remLen" size="4" maxlength="4" value="' . $max . '"> Zeichen übrig.'; echo '</form>'; }
1.1. Documentation
CharCount: While typing into the input field it counts down from a set number of characters. Count includes empty space between words. Useful, for example if you compose an article to fit a given length of text.1.2. How to
1.3. Comments
nur wo und wie verwenden -> da müsste man noch die Möglichkeit haben denText z.B. als Kommentar übergeben zu können oder man fügt es schlicht
als Zähler in die Lesezeichen oder einfach nur so(?)
Optionen für Übergabe:
- informiert nur
- erzwingt -> schneidet dann ab
Referring pages:
- Dev/PatchesHacks[link3]
- [link1] http://wikkawiki.org/WikkaMail
- [link2] https://wackowiki.org/doc/Users?profile=AhA
- [link3] https://wackowiki.org/doc/Dev/PatchesHacks#a-225