Finally SOLVED!
I made myself this mod so im very PROUD ( it's my FIRST ONE ).
Open includes bbcode.php
find:
Code:
function make_clickable($text)
{
// pad it with a space so we can match things at the start of the 1st line.
$ret = " " . $text;
// matches an "xxxx://yyyy" URL at the start of a line, or after a space.
// xxxx can only be alpha characters.
// yyyy is anything up to the first space, newline, or comma.
$ret = preg_replace("#([\n ])([a-z]+?)://([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)#i", "\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>", $ret);
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// yyyy contains either alphanum, "-", or "."
// zzzz is optional.. will contain everything up to the first space, newline, or comma.
// This is slightly restrictive - it's not going to match stuff like "forums.foo.com"
// This is to keep it from getting annoying and matching stuff that's not meant to be a link.
$ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]*)?)#i", "\\1<a href=\"http://www.\\2.\\3\\4\" target=\"_blank\">www.\\2.\\3\\4</a>", $ret);
// matches an email@domain type address at the start of a line, or after a space.
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".
$ret = preg_replace("#([\n ])([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)?[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret);
// Remove our padding..
$ret = substr($ret, 1);
return($ret);
}
After add:
Code:
function make_clickable1($text)
{
// pad it with a space so we can match things at the start of the 1st line.
$ret = " " . $text;
// matches an "xxxx://yyyy" URL at the start of a line, or after a space.
// xxxx can only be alpha characters.
// yyyy is anything up to the first space, newline, or comma.
$tret = preg_replace("#([\n ])([a-z]+?)://([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)#i", "\\1<font color=\"#FFFF00\"\><i>LINK VISIBILE SOLO AGLI UTENTI REGISTRATI</i></font>", $ret);
// matches a "www.xxxx.yyyy[/zzzz]" kinda lazy URL thing
// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
// yyyy contains either alphanum, "-", or "."
// zzzz is optional.. will contain everything up to the first space, newline, or comma.
// This is slightly restrictive - it's not going to match stuff like "forums.foo.com"
// This is to keep it from getting annoying and matching stuff that's not meant to be a link.
$ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]*)?)#i", "\\1<font color=\"#FFFF00\"\><i>LINK VISIBILE SOLO AGLI UTENTI REGISTRATI</i></font>", $ret);
// matches an email@domain type address at the start of a line, or after a space.
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".
$ret = preg_replace("#([\n ])([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)?[\w]+)#i", "\\1<font color=\"#FFFF00\"\><i>LINK VISIBILE SOLO AGLI UTENTI REGISTRATI</i></font>", $ret);
// Remove our padding..
$ret = substr($ret, 1);
return($ret);
}
Open viewtopic.php
find:
Code:
{$message = make_clickable($message);}
replace with:
Code:
if ( $userdata['session_logged_in'] )
{$message = make_clickable($message);}
else
{$message = make_clickable1($message);}
Save and upload
If u want to remove also the BBcode urls:
Open templates/subSilver/bbcode.tpl
find:
Code:
<!-- BEGIN url --><a href="{URL}" target="_blank" class="postlink">{DESCRIPTION}</a><!-- END url -->
replace with:
Code:
<!-- BEGIN url -->{DESCRIPTION} {URL}<!-- END url -->
Save and upload