![]() |
Limit [SIZE] tag
I was looking around for a hack to limit how large users can make their text size via the vb [SIZE] tag.
I was looking at the preg_replace() function ( http://us4.php.net/manual/en/function.preg-replace.php ). I'm not sure what to do because the size tag can be done in two different ways making the replace statement more difficult: PHP Code:
Size=+4 Any help would be appreciated. Size=100 in signatures gets old quick. :( Thanks! |
<font size="100">test</font>
html limits dont go past +4 as far as i understood |
PHP Code:
Just experiment with positioning. :) |
hmmm. I suppose that's a good start but it didn't work completely on my site.
Size=100 still went through (or anything over 13) and some of the other sizes I tried ended up as this character: |
Quote:
|
Quote:
I just realized that the other day(after a member used 15), so I updated my code to handle it: PHP Code:
PHP Code:
|
Just tested it, and this works well:
PHP Code:
|
Quote:
Try the statement: PHP Code:
|
Make sure you change the \1 to have double slashes(\\1), apparently vb.org's php tags mess up the double slashes.
|
Ahhh thanks.
My only consideration now would be if someone enters the number 1000000 for the size. Hehehe. Nice site btw. I registered there under Ibuprofen. Good reading for sure. |
Quote:
Let's keep this a secret till I can find a fix ;) Quote:
|
|
Great!
Thanks again. |
All times are GMT. The time now is 04:46 PM. |
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:
|