Back to vBulletin 3 Articles

Dealing with long signatures
by Spinball 02 Aug 2004

Hi Folks,
I don't know if you consider SQL tips as hacks, but if so then please accept the following for vB 3.x.
We have a problem on our forum with people putting in rediculously long signatures. Some of these look ok, though, as the occasional responsible people are using only a few carriage returns and make use of the [size] tag to make their signature text smaller.

This SQL script is very simple but for people not accustomed to SQL, it might be useful. It doesn't deal with carriage returns (yet) but does deal with otherwise lengthy signatures by wrapping a size tag round them but ONLY if the user hasn't used a size tag already :

PHP Code:
update usertextfield set signature concat('[size=1]',signature,'[/size]'where signature not like '%[size%' and length(signature) > 100
This only changes signatures containing over 100 characters. Obviously you can change the 100 to any figure. Some of our members have signatures over 400 characters in size. At least if the text is small it doesn't take up a whole page.

vblts.ru supports vBulletin®, 2022-2024