hide links mod

Allgemeiner Support zum phpBB 2 Board und phpBB 2 Modifikationen
Forumsregeln
Auch wenn hier der Support für phpBB 2 weiterhin aufrecht erhalten bleibt, weisen wir darauf hin, dass das phpBB 2 nicht mehr offiziell unterstützt und weiterentwickelt wird!
Antworten
pepi
Beiträge: 431
Registriert: So 10.Apr, 2005 20:45
Wohnort: Lienz - Austria
Kontaktdaten:

hide links mod

Beitrag von pepi »

Deine phpBB Version: plus 1.53
Typ Deines phpBB Forums: Premodded phpBB
MODs: Ja
Dein Wissensstand: Einsteiger
Link zu Deinem Forum: http://www.cool-lighter.com

PHP Version: 4.1.10a-standard
MySQL Version: 4.3.11


Was hast Du gemacht, bevor das Problem aufgetreten ist?
nichts


Was hast Du bereits versucht um das Problem zu lösen?
nichts



Fehlerbeschreibung und Nachricht

wie baue ich den Hide Links mod ein damit der rlink mod auch noch funtioniert

hier das steht bei mir in der bbcode.php

Code: Alles auswählen

 // 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, comma, double quote or <
        $ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1<a href=\"http://www.cool-lighter.com/forum/rlink/rlink.php?url=\\2\" target=\"_blank\">\\2</a>", $ret);

        // matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
        // Must contain at least 2 dots. xxxx contains either alphanum, or "-"
        // zzzz is optional.. will contain everything up to the first space, newline,
        // comma, double quote or <.
        $ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://www.cool-lighter.com/forum/rlink/rlink.php?url=http://\\2\" target=\"_blank\">\\2</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);
und soll es ersetzten mit

Code: Alles auswählen

//
// Hide links from unregistered users mod
//
	if ( !$userdata['session_logged_in'] )
	{
		// The thing we replace links with. I like using a quote like box
		$replacer = ' </span><br /><table width="40%" cellspacing="1" cellpadding="3" border="0" align="left"><tr><td class="quote">';
		$replacer .= $lang['Links_Allowed_For_Registered_Only'] . '<br />';
		$replacer .= sprintf($lang['Get_Registered'], "<a href=\"" . append_sid('profile.' . $phpEx . '?mode=register') . "\">", "</a>");
		$replacer .= sprintf($lang['Enter_Forum'], "<a href=\"" . append_sid($u_login_logout) . "\">", "</a>");
		$replacer .= '</td></tr></table><br /><span class="postbody">';

		// 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, comma, double quote or <
		$ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", $replacer, $ret);

		// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
		// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
		// zzzz is optional.. will contain everything up to the first space, newline, 
		// comma, double quote or <.
		$ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", $replacer, $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", $replacer, $ret);

	}
	else
	{
		// 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, comma, double quote or <
		$ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret);

		// matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing
		// Must contain at least 2 dots. xxxx contains either alphanum, or "-"
		// zzzz is optional.. will contain everything up to the first space, newline, 
		// comma, double quote or <.
		$ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</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);
	}
bitte um hilfe
gru? Pepi
Benutzeravatar
AmigaLink
Beiträge: 5843
Registriert: Mi 03.Mär, 2004 09:05
Wohnort: NRW
Kontaktdaten:

Beitrag von AmigaLink »

Vergleich mal diesen teil:

Code: Alles auswählen

   else 
   { 
      // 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, comma, double quote or < 
      $ret = preg_replace("#(^|[\n ])([\w]+?://[^ \"\n\r\t<]*)#is", "\\1<a href=\"\\2\" target=\"_blank\">\\2</a>", $ret); 

      // matches a "www|ftp.xxxx.yyyy[/zzzz]" kinda lazy URL thing 
      // Must contain at least 2 dots. xxxx contains either alphanum, or "-" 
      // zzzz is optional.. will contain everything up to the first space, newline, 
      // comma, double quote or <. 
      $ret = preg_replace("#(^|[\n ])((www|ftp)\.[^ \"\t\n\r<]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</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); 
   }
mit dem bei dir vorhandenen. ;)
[center].: Web Relax .::. Essen mit Freude .::. AmigaLink.de :.
______________________________________

Kein Support per PM, ICQ oder eMail!!!
[/center]
pepi
Beiträge: 431
Registriert: So 10.Apr, 2005 20:45
Wohnort: Lienz - Austria
Kontaktdaten:

Beitrag von pepi »

danke amiga

:hh: ........ ja besser schauen ist da gefragt........
gru? Pepi
mgutt
Beiträge: 25
Registriert: Fr 08.Okt, 2004 01:07

Beitrag von mgutt »

Hi,

wie bekomme ich es hin, dass er meine internen Links verschont.

Am besten auch die aus den Signaturen. Aber das wäre erstmal zweitrangig.
Benutzeravatar
oxpus
Administrator
Beiträge: 28735
Registriert: Mo 27.Jan, 2003 22:13
Wohnort: Bad Wildungen
Kontaktdaten:

Beitrag von oxpus »

Dazu hatten wir auch mal einen anderen Topic...
Karsten Ude
-={ Das Mädchen für alles }=-
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Antworten