Sean335 |
07-29-2004 10:00 PM |
Kill Attachments in Signatures
Replaces signature images using your board's attachements with a message telling them to stop.
open includes/functions_showthread.php
find: (on lines 517 and 518)
PHP Code:
$post['signature'] = parse_bbcode($post['signature'], 'nonforum', $vboptions['allowsmilies']);
$sigcache["$post[userid]"] = $post['signature'];
and add above it:
PHP Code:
$post['signature'] = preg_replace("/\[img\](.*?)\/attachment.php(.*?)\[\/img\]/i", "[i]attached pictures not allowed in signatures.[/i]", $post['signature']);
Using this method will block any img tag that uses attachment.php, if you want to block just ones that use your site, use something like:
PHP Code:
$post['signature'] = preg_replace("/\[img\](.*?)www.3.8mustang.com\/forum\/attachment.php(.*?)\[\/img\]/i", "[i]attached pictures not allowed in signatures.[/i]", $post['signature']);
|