Skip to:
Content
Pages
Categories
Search
Top
Bottom

word limit for all user updates

  • Still confused about this. How do I limit the number of words ALL my website members can use in every post? To say 100 or something.
    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

  • Virtuali
    Participant

    @gunju2221

    May be simple or hard, depending on you, but it can be achieved, through some jquery

    This is just off the top of my head in post-form.php in your theme

    `function textLimit(field, maxlen) {
    if (field.value.length > maxlen + 1)
    alert(‘To much Text!’);
    if (field.value.length > maxlen)
    field.value = field.value.substring(0, maxlen);
    }`

    now the textarea:

    `<textarea cols="20" rows="2" value=""
    onkeyup=”textLimit(this, 40);”>`

    Set “40” to limit

    This is awsome. So this should work for every users wall in my website community?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘word limit for all user updates’ is closed to new replies.
Skip to toolbar