![]() |
Limit Font Size in Posts?
Is there a easy way to limit the font sizes that users can use in the posts? I know you can take the numbers from the drop down menu but they can then edit the actual BBcode and put whatever size they wish to use. I know one way of doing it but it means doing it for every single number that exists and that would take a lot of time.
Anyone got any solutions? Cheers |
If you look at the page source, you will see something like this:
HTML Code:
<font size="7">Hello</font> |
Quote:
|
I don't know of a (simple) way. You may be able to use javascript to set a max font size? Can't you just ask your users to not do that?
|
It shouldn't be hard to make a plugin for showthread_complete that uses preg_replace() to fix it. I'll see what I can do. (I'm slow and lazy though!)
--------------- Added [DATE]1368386382[/DATE] at [TIME]1368386382[/TIME] --------------- TRy this: Product: vBulletin Hook Location: showthread_complete Title: Whatever Execution Order: 5 PHP Code:
|
Quote:
|
Just thought of something, the regular expression should probably be case inssensitive just in case. Add an "i" at the end of the value of $pattern
$pattern = '/<font size="(\d{2,}|[^1-' . $max_size . '])">/i'; |
All times are GMT. The time now is 01:18 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|