In global.php replace the old
format_urls function with this one:
PHP Code:
function format_urls($s)
{
return preg_replace(
"/(\A|[^=\]'\"a-zA-Z0-9])((http|ftp|https|ftps|irc):\/\/[^()<>\s]+)/i",
"\\1<a href=\"\\2\" target='_blank'>\\2</a>", $s);
}
and replace the old url bbcodes with this:
PHP Code:
// [url=http://www.example.com]Text[/url]
$s = preg_replace(
"/\[url=([^()<>\s]+?)\]((\s|.)+?)\[\/url\]/i",
"<a href=\"\\1\" target='_blank'>\\2</a>", $s);
// [url]http://www.example.com[/url]
$s = preg_replace(
"/\[url\]([^()<>\s]+?)\[\/url\]/i",
"<a href=\"\\1\" target='_blank'>\\1</a>", $s);
That's it!