MyBB Community Forums

Full Version: Restrict the use of [size]
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a problem regarding the use of the [size] tags in posts. I'd like to remove all text size options except [size=medium] and [size=large]. I know how to remove the others from the editor, so the dropdown only shows these 2, but that doesn't stop members typing in (for example), [size=250]. That is just too big for me and makes posts look horrible.

.m. suggested the way of using the word filter to replace [size=250] with [size=medium] for example, but I was just wondering if that is the only way? I'd have to add a lot of word filters, as any member could type [size=*] all the way to [size=***]
Why not just use a custom MyCode?

Regular expression:
\[size=(?:\d+|xx-small|x-small|small|x-large|xx-large)\](.*?)\[/size\]

Replace with:
[size=medium]$1[/size]

...or simply:
$1

That will take anything other than medium or large and replace it with medium (or remove the size tags altogether of you use the second option.)
This seems more like a social problem than a technical one. Usually a warning not to do it would be enough, and if they continue and ignore your request to stop then they probably need further discipline.

The same applies to other stupid things like this. You can't really prevent it from a technical perspective, but you have the right to ban it.