Skip to:
Content
Pages
Categories
Search
Top
Bottom

Limiting characters on status update


  • Anton
    Participant

    @antonrsa

    Is there anyway to limit the number of characters of a status update/reply? I want to limit the characters to 500 and include text that displays (counting down) similar to how Twitter uses it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @antonrsa; I’ve been looking into this myself, but have given up on it for now as very time-consuming to research and do properly. Being as it’s all browser based (not my usual bread and butter), there are lots of ways using JavaScript, and a Google search will provide links to free code that’s not difficult to use, In the main. I found that it’s far from foolproof though, and then a friend suggested that cutting user posts down might give them reason to stay away. I’m bowing to their wisdom and leaving it be for the time being.

    One thing I do want to do, and am researching right now, is make posts in groups stay in the groups and not clog up the main activity stream. I’ve filtered minor things out thanks to help from @nprn1, but want to see the main stream further, erm, streamlined. Once a site gets busy it could be a nightmare for Mr & Mrs P.C. Phobic. If I crack it I’ll post the function in case it helps anyone.

    couple of jQuery packages out there, TextLimit is pretty simple – syntax as such: jQuery(“textarea”).textlimit(‘span.somecounterspan’,500)

    then as a backup – just use one of the filters to excerpt the content (only issue is error handling)


    Anton
    Participant

    @antonrsa

    Thanks @nuprn1. Easier said than done. Will start experimenting :)


    Anton
    Participant

    @antonrsa

    Ok, did a search and implemented this: http://www.virtuosomaster.com/tutorials/how-to-limit-the-number-of-characters-in-a-textarea-witch-character-counter/

    Seems as though it works but will have to test it further.


    ORyanMcentire
    Member

    @oryanmcentire

    That code only lobs off added text at the end of the string.

    If you went back and edited your text say in the middle of your string, you can add more than the limit you set. Especially because firefox allows you to disable alerts after a certain amount of them.

    best to also limit it server side as well.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Limiting characters on status update’ is closed to new replies.
Skip to toolbar