Quote:
Originally Posted by The M.I.P.
..Search through the messages, there might already be a completed modification..
|
..unfortunately I've not found anything.. and I have tried to modify myself an already done mod.
In admin/functions.php replacing this :
PHP Code:
// ###################### Start checkurl #######################
function checkurl($url, $hyperlink="") {
$righturl = $url;
if(!preg_match("![a-z]://!si", $url)) {
$righturl = "http://$righturl";
}
// remove threat of users including javascript in url
/*$righturl = preg_replace("/javascript:/si", "java script:", $righturl);
$righturl = preg_replace("/about:/si", "about :", $righturl);*/
$hyperlink = iif(trim($hyperlink)=="" or $hyperlink==$url, iif(strlen($url)>55,substr($url,0,35)."...".substr($url,-15),$url) ,$hyperlink);
return "<a href=\"$righturl\" target=\"_blank\">".str_replace('\"', '"', $hyperlink)."</a>";
}
with this :
PHP Code:
// ###################### Start checkurl #######################
function checkurl($url, $hyperlink="") {
$righturl = $url;
if(!preg_match("![a-z]://!si", $url)) {
$righturl = "http://$righturl";
}
if (stristr($righturl,$bburl))
{
$urlprefix = '';
$target = "_self";
}
else
{
$urlprefix = "http://anonym.to/?";
$target = "_blank";
}
// remove threat of users including javascript in url
/*$righturl = preg_replace("/javascript:/si", "java script:", $righturl);
$righturl = preg_replace("/about:/si", "about :", $righturl);*/
$hyperlink = iif(trim($hyperlink)=="" or $hyperlink==$url, iif(strlen($url)>55,substr($url,0,35)."...".substr($url,-15),$url) ,$hyperlink);
return "<a href=\"{$urlprefix}{$righturl}\" target=\"{$target}\">".str_replace('\"', '"', $hyperlink)."</a>";
}
but it doesent work properly ,the first condition
if (stristr($righturl,$bburl)) is never verified and I don't know why , the prefix
http://anonym.to/? is added even if the primary url is the same of
$bburl.
Any suggestions ?
Logician , do you want try to me help me too?