Try this:
PHP Code:
// If you wanted to be able to edit [img] when editing a post instead of seeing the image, add the get_class() check from above
if ($has_img_code & BBCODE_HAS_IMG & $vbulletin->userinfo['userid'])
{
if ($do_imgcode AND ($this->registry->userinfo['userid'] == 0 OR $this->registry->userinfo['showimages']))
{
// do [img]xxx[/img]
$bbcode = preg_replace('#\[img\]\s*(https?://([^*\r\n]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "\$this->handle_bbcode_img_match('\\1')", $bbcode);
}
else
{
$bbcode = preg_replace('#\[img\]\s*(https?://([^*\r\n]+|[a-z0-9/\\._\- !]+))\[/img\]#iUe', "\$this->handle_bbcode_url(str_replace('\\\"', '\"', '\\1'), '')", $bbcode);
}
}