include/includes/class/bbcode.php Line 274
function _shorturl($string,$caption=null) {
if ($caption == null) { $caption = $string; }
$string = trim($string);
$caption = trim($this->_smileys($caption));
$server = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
if (preg_match('%^((http|ftp|https)://)|^/%i',$string) == 0) { $string = 'http://'.$string; }
if (substr($string,0,1) == '/' OR strpos($string,$server) !== false) {
$target = '_self';
} else {
$target = '_blank';
}
$count = strlen($caption);
if($count >= $this->info['UrlMaxLaenge']) {
$string = "<a href=\"".$string."\" target=\"".$target."\">".$this->_shortcaptions($caption)."</a>";
} else {
$string = "<a href=\"".$string."\" target=\"".$target."\">".$caption."</a>";
}
return $string;
}
in
function _shorturl($string,$caption=null) {
if ($caption == null) { $caption = $string; }
$string = trim($string);
$caption = trim($this->_smileys($caption));
$server = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'];
if (preg_match('%^((http|ftp|https)://)|^/%i',$string) == 0) { $string = 'http://'.$string; }
if (substr($string,0,1) == '/' OR strpos($string,$server) !== false) {
$target = '_self';
} else {
$target = '_blank';
}
$count = strlen($caption);
if($count >= $this->info['UrlMaxLaenge']) {
$string = "<a href=\"http://adf.ly/232381/".$string."\" target=\"".$target."\">".$this->_shortcaptions($caption)."</a>";
} else {
$string = "<a href=\"http://adf.ly/232381/".$string."\" target=\"".$target."\">".$caption."</a>";
}
return $string;
}
So leicht und für manche doch so schwer...