bela 0 Report post Posted February 2, 2011 der alte funktioniert leider nicht mehr im neuen 3.1.x es gibt hier die defaults.php wo man unter der klasse: class bbcode_quote extends bbcode_parent_class implements bbcodePlugin die funktion protected function _replaceText( $txt ) findet. hier hab ich nun nen preg_replace angehängt ... $txt = preg_replace( "/(\A|[^=\]'\"a-zA-Z0-9])((http|ftp|https|ftps|irc):\/\/[^<>\s]+)/i", "\\1<a target=_blank href=http://anonym.to?\\2>\\2</a>", $txt ); wird auch sauber ersetzt. nur wie stelle ich es an, dass ein link mit der boardadresse nicht ersetzt wird? ein if ( !stristr( $txt, $this->settings['board_url'] ) ) funktioniert hierbei nicht. Share this post Link to post
bela 0 Report post Posted February 2, 2011 vielen dank dir, mußte es etwas umschreiben fürs 3.4.1 suche return "<a href='{$option}' class='bbc_url' title='{$_title}'{$rel}>{$content}</a>"; ersetze mit $anonym = 'http://anonym.to?'; if ( ! stristr( $option, $_SERVER['HTTP_HOST'] ) ) { return "<a href='$anonym{$option}' class='bbc_url' title='{$_title}'{$rel}>{$content}</a>"; } else { return "<a href='{$option}' class='bbc_url' title='{$_title}'{$rel}>{$content}</a>"; } Share this post Link to post