
08-11-2005, 06:21 PM
|
 |
|
|
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Quote:
Originally Posted by Oblivion Knight
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:
|
Is that the entire hack in this xml then?
|