Jump to content
InvisionCommunity.de - Der Deutsche Invision Community Support
Sign in to follow this  
bela

link anonyminzer ...

Recommended Posts

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×