Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

add on request: caps lock killer.

Hello! I would really like a simple extension that catches posts that are in all upper case and makes them lower case. I have a few forum users that have a habit of abusing the caps lock button, and i know I cant be the only one :) I did a search on the add ons site for "caps" but it turned up nothing. Thanks!
«1

Comments

  • tHE COMMENTS SECTION HERE HAS SOME EXAMPLE FUNCTIONS: http://www.php.net/strtolower Oops... Plug one of those into the instructions here: http://lussumo.com/docs/doku.php?id=vanilla:development:formatters And you are golden.
  • This one looks good too: http://www.phpbuilder.com/board/archive/index.php/t-10301284.html
  • YOU CAN'T ABUSE CAPS LOCK
  • ithcyithcy New
    edited September 2006
    i did it in javascript:

    STOP CAPS ABUSE add-on

    it works on a caps-to-lowercase-letters ratio which you can set in default.php.
    you can also define the minimum comment length to be checked for caps abuse.

    example: if you set your minimum comment length to 8 and your caps ratio to 50%,
    "AAAAA" will pass, "aaaaAAAA" will pass, but "aaaAAAAA" will fail.

    the user receives a confirmation box if caps abuse is detected, which gives them the option to correct the comment themselves, or else have it automatically converted to sentence case and submitted.
  • Thanks ithcy!
  • outbreakoutbreak New
    edited September 2006
    tHE COMMENTS SECTION HERE HAS SOME EXAMPLE FUNCTIONS: http://www.php.net/strtolower

    Oops...
    oh god, the irony is delicious.
  • Whats even funnier is I really typed that and didin't even realize the caps lock was on... just had to leave it in.
  • hah. nice one. ithcy - I'm lookign at what you've made right now, and sorry for this most likely stupid question but in your default.php it says "You should cut & paste this language definition into your conf/your_language.php file (replace "your_language" with your chosen language, of course)". Could you clarify what you mean? Im used to uploading things to the extensions folder, checking off the box in settings and calling it a day. Thanks!
  • ithcyithcy New
    edited September 2006
    eh, you can ignore that. that's for translators.
    that text is actually left over from the old vanilla 0.9.2 extensions that used to be packaged with the forum - i still use an empty one of them as a template when i make a new add-on. so i blame Mark for your confusion.
  • is this the same onetwentyeight from o8, by the way?
  • I believe it is, yes. I keep getting him confused with eightseventhree though.
  • Anybody else think its funny his user ID is twentyninetyeight?
  • edited September 2006
    itchy - yep thats me. ex o8 and dreamless way back when. by the way, i cant get your extensions to work. giving me an error every time i try to enable both this one and confirm go back.
  • ithcyithcy New
    edited September 2006
    hmm...

    can you paste the error message here?
    also what browser are you using?

    when you say "both of them" do you mean they work independently but not together, or they don't work at all?
  • WHAT'S, WRONG, WITH, USING, ALL, CAPS, ISN'T, THAT, CAPS PROFILING ?
    I suppose if someone abuses the comma, , , , , , , ,they will be targeted next, just kidding ;-)

    I have never seen such serious abuse maybe a few words with all CAPS but I really don't see how it can offend people, they call it SHOUTING but its nothing you can not possibly hear anything geez man virtual communities need to get a life,
  • how clever would this thing be, would it leave alone one word in caps in the middle of lowercase for example?
  • I just had a weird thought. With the appropriate extensions (or plugins in the WP world), whatever the user enters can be changed to whatever we want. Filtering user input does scare me although the user can certainly review what he (or she) said to make sure it's accurate.
  • 3stripe: it's not that clever. it just works on the ratio of caps to lowercase in the message, after a certain message length. it will hopefully achieve the same effect that way.

    jimw: yes, but as soon as people figure out that you're altering their input, you won't get many repeat visitors.
  • ithcy - the error is this param: 'stopcaps abuse' click ok response: '<div class="Error"> the file could not be opened. please make sure that PHP has write access to the www/sffixed/Vanilla.merge/conf/extensions.pho file. </div> click ok failed to modify extension click ok
  • extensions.pho? is that your typo?
This discussion has been closed.