Jump to the post that solved this thread.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 9 Years, 3 Months, 2 Weeks ago Restrict the use of [size]
#1
Solved: 9 Years, 3 Months, 2 Weeks ago
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=***]
#2
Solved: 9 Years, 3 Months, 2 Weeks ago
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.)
#3
Solved: 9 Years, 3 Months, 2 Weeks ago
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.
No longer involved in the MyBB project.
Jump to the post that solved this thread.


Forum Jump:


Users browsing this thread: 1 Guest(s)