• 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?

#1
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.
 
#4
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?
 

Brogan

XenForo moderator
Staff member
#5
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.
 

Dylan V

Well-known member
#6
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:

EQnoble

Well-known member
#7
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.
 

Dylan V

Well-known member
#8
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.
Yes, I've noticed that too. It's complicated to control what user wants to write.
 
#9
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!