PDA

View Full Version : limit images in signature


EyaL
07-29-2003, 08:55 AM
hello

i saw hack that limit images in signture but it limit smiles to (smile = image) i wonder . does someone can make hack that allow me to limit just the images and not the smiles in signature :glasses: ?

Xenon
07-29-2003, 09:34 AM
:)

here you are:

// check for sigrules
$checksig = bbcodeparse2($signature, 0, 1, 0, 1);
$lines = countchar($checksig, '<br');
$images = countchar($checksig, "<img");
if ($images > x)
{
standarderror(bbcodeparse2('Your signature violates our signature rules',0,0,1,1));
}
put that in member.php after : // check max images
if ($maximages!=0) {
$parsedsig=bbcodeparse($signature,0,$allowsmilies) ;
if (countchar($parsedsig, "<img")>$maximages) {
eval("standarderror(\"".gettemplate("error_toomanyimages")."\");");
exit;
}
}

EyaL
07-29-2003, 09:51 AM
wooooow

thanks :p
works great

Xenon
07-29-2003, 12:23 PM
you're welcome :)

it's jsut the code we use on vb.org, so it was just a copy&paste question for me ;)