View Full Version : Need to disallow use of SIZE vb code in Singature
VirtueTech
12-18-2001, 01:38 AM
Hello,
Can someone please let me know how I can disallow the use of the SIZE vb tags in my forums signatures.
Any information would be helpful.
Thans. :)
-.valkyre
12-18-2001, 02:03 AM
I may come across as an idiot here, but..
Remove the [SIZE] vBCode.
Or try this: In individual vbCodes click on edit and click NO on the option part.
VirtueTech
12-18-2001, 02:41 AM
Where would I edit ...in what script...to have it say if the SIZE tags option is greater than 2 to make the option equal 2
I just want to eliminate the large fonts and I want to change the current posts on the forums large fonts to size 2.
What script do I edit?
I think there are two ways you could do it, VT:
1) to strip it off all signatures, including existing ones, open admin/functions.php and find:
$post[signature]=bbcodeparse($post[signature],0,$allowsmilies);
Before that add:
$post[signature] = preg_replace("/(\[)(size)(=)(['\"]?)([0-9]*)(\])(.*)(\[\/size)(\])/siU", "\\7", $post[signature]);
2) to strip it off all newly added or edited sigs, open members.php AND register.php and find in both:
$signature=censortext($signature);
Before or after it, add:
$signature = preg_replace("/(\[)(size)(=)(['\"]?)([0-9]*)(\])(.*)(\[\/size)(\])/siU", "\\7", $signature);
Cheers,
Bira
VirtueTech
12-18-2001, 03:03 AM
How would I set that code so that it allows SIZE=1 but nothing higher than 2
So like:
If SIZE>=2 then SIZE=2
Thanks Bira
I'm stuck on that one :)
I thought it would be something like
$signature = preg_replace("/(\[)(size)(=)(['\"]?)([0-9]*)(\])/siU", "[size=".iif('\\5'==1, 1, 2)."]", $signature);
But the expression '\\5'==1 always returns false, even when it is 1. \\5 is correct. Don't know why it won't work. regexp is so bloody hard. Maybe someone more advanced than me can say what would be the right way.
heidit
02-01-2002, 06:11 PM
Erm, I may be completely offbase, and I've never explained a "hack" before (I mostly just read them, then ask my tech people if they can do them) but yesterday I actually changed the sizes in our sigs.
All I did was go into postbit_signature in the postbit templates and replace what was there with this:
<smallfont>__________________<br>
$post[signature]</smallfont>
Did I mess something up? It seems to work nicely - all our sigs are tiny now.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.