Action: CharCount
Current version: |
{{charcount max=[number]}}
/actions/charcount.php
<?php
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
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;
}
// End -->
</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>";
}
?>
?>
Char Count: 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.
put this at the end of your language file
/lang/wakka.xyz.php
pls. notice that this entry will not survive an Wacko upgrade, so you have to redo this
[xyz] proposed translations
[de] ...
[fr]
[ru]
nur wo und wie verwenden -> da müsste man noch die Möglichkeit haben den
Text 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