stevem
Joined: 15 Mar 2003 Posts: 365
|
Posted: Sat Jan 22, 2005 9:07 pm Post subject: |
|
|
I think this works. Try it and check View Source to see that it really does.
In b2template.functions.php look for
Code: | function make_clickable($text) { // original function: phpBB, extended here for AIM & ICQ
$ret = " " . $text;
$ret = preg_replace("#([\n ])([a-z]+?)://([^, <>{}\n\r]+)#i", "\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>", $ret); |
In that last line add so it reads
Code: | $ret = preg_replace("#([\n ])([a-z]+?)://([^, <>{}\n\r]+)#i", "\\1<a href=\"\\2://\\3\" target=\"_blank\" rel=\"nofollow\">\\2://\\3</a>", $ret); |
Then do the same thing 3 lines further down so that
Code: | $ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^,< \n\r]*)?)#i", "\\1<a href=\"http://www.\\2.\\3\\4\" target=\"_blank\">www.\\2.\\3\\4</a>", $ret); |
becomes
Code: | $ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^,< \n\r]*)?)#i", "\\1<a href=\"http://www.\\2.\\3\\4\" target=\"_blank\" rel=\"nofollow\">www.\\2.\\3\\4</a>", $ret); |
|
|