Much love to
KirbyDE for helping me out with my request..
This is the resulting plugin:
Code:
if ($vbulletin->options['allowsignatures'])
{
$maxsigwidth = 400;
$maxsigheight = 150;
function check_sig_size($sig)
{
global $maxsigwidth, $maxsigheight, $errors, $vbulletin;
$sig = str_replace(array(' ', '\\"'), array('', '"'), $sig);
// check valid signature image size
if ($imginfo = getimagesize($sig))
{
if ($imginfo[0] > $maxsigwidth or $imginfo[1] > $maxsigheight)
{
$vbulletin->GPC['preview'] = 'true';
$errors[] = fetch_error('signaturetoobig', $maxsigwidth, $maxsigheight);
}
}
}
$url = preg_replace('#\[img\]\s*(https?://([^<>*"' . iif(!$vbulletin->options['allowdynimg'], '?&') . ']+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "check_sig_size('\\1')", $signature);
}
The phrase then becomes something similar to:
Quote:
Your signature can not have images larger than {1}w x {2}h in pixels.
|