1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 How to avoid caps in the whole forum?

Discussion in 'Styling and Customization Questions' started by Anthony B., Mar 9, 2015.

  1. Anthony B.

    Anthony B. New Member

    Hello, i want to avoid those people that write like this:

    "HEY WHY I CANNOT WRITE LIKE NORMAL PEOPLE I LIKE TO WRITE IN CAPS BECAUSE I THINK THEY WILL PAY MORE ATTENTION TO WHAT IM SAYING."

    Turning that to:

    "Hey why i cannot write like normal people i like to write in caps because i think they will pay more atention to what im saying"

    literally, convert all mayus but the first capital letter to small letters, whenever an user write like above. For thread tittle and content.

    Thanks.
     
  2. Brogan

    Brogan XenForo Moderator Staff Member

    The only way to manage that is via moderation.
     
  3. Anthony B.

    Anthony B. New Member

    There isn't an addon to do that?
     
  4. Anthony B.

    Anthony B. New Member

    I found:

    Automatically Adjust Case of Discussion Titles

    That would fix my issue with titles, are there any way to do the same for a post content?
     
  5. Brogan

    Brogan XenForo Moderator Staff Member

    There is no option for it.

    Additionally, it would prevent users from legitimately using capital letters.

    Hence why the best way to manage it is via moderation.
     
  6. Dylan V

    Dylan V Well-Known Member

    Hello,

    You can use this solution that works. Go to the templates of your styles and search for "EXTRA.css". Then, add this:
    Code:
    .messageText
    {
        text-transform: lowercase;
    }
    
    .messageText:first-letter
    {
        text-transform: uppercase;
    }
    If the user writes something like "HEEELOOOOOO", the result will be "Heeeloooooo".
     
    Last edited: Mar 12, 2015
  7. EQnoble

    EQnoble Well-Known Member

    That will also break things, like 'who is Dylan' which will become 'who is dylan' and other proper names and such.

    The only reasonable way with an addon would be to use regex to check posts on submission and change repeating caps exceeding a specified amount of characters..you would basically need to create the logic for it in regex so that it does not match false positives for caps spam for things that actually need caps even if in the middle of a string.
     
  8. Dylan V

    Dylan V Well-Known Member

    Yes, I've noticed that too. It's complicated to control what user wants to write.
     
  9. Dave Stromberger

    Dave Stromberger New Member

    There is an addon for this that I used on vB4... it would only do the case correction if more than x number of caps were used in a row, so it wouldn't mess with legitimate caps usage. It was great. WANT this addon for XenForo!
     

Share This Page