The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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 |
#2
|
||||
|
||||
If you look at the page source, you will see something like this:
HTML Code:
<font size="7">Hello</font> |
#3
|
|||
|
|||
Quote:
|
#4
|
||||
|
||||
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?
|
#5
|
|||
|
|||
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:
|
3 благодарности(ей) от: | ||
Lynne, MattGarner, tbworld |
#6
|
|||
|
|||
Quote:
|
#7
|
|||
|
|||
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'; |
Благодарность от: | ||
Lynne |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|