Seite 1 von 2
Safeurl für das phpBB
Verfasst: 27.03.2004 12:40
von Lodda
Hi,
Gibt es ein Mod der der die Weiterleitung zu den anderen verlinkten Seiten anonym gestallten kann? Bzw. schaut mal hier:
http://www.safeurl.de/home.php kann man das irgendwie in das phpBB 2.0.8 einbauen und etwas verschönern alla ?Sie werden in wenigen Sekunden weitergeleitet?
Verfasst: 27.03.2004 13:59
von MiXa
auf
www.phpbbhacks.com gabs mal einen mod zu save url
waren damals 2 zeilen im code (also nicht viel arbeit)
(oder halt selber was basteln)
Verfasst: 27.03.2004 14:07
von netzmeister
Hallo,
nehmen wir am besten diesen
hier bis wir
einen anderen finden.
Gruß netzmeister
Verfasst: 27.03.2004 15:59
von rabbit
den benutze ich auch, ist nur eine kleine änderung in der bbcode...
btw, wenn du einen englischen redirect haben willst, füge
en.safeurl.de vorne an.

Danke, aber ...
Verfasst: 27.03.2004 18:52
von Lodda
Vielen Dank! Ich hab da aber jetzt ein Problem, meine bbcode.php hat in den betreffenden Zeilen anderen Code drinne:
Code: Alles auswählen
{
// pad it with a space so we can match things at the start of the 1st line.
$ret = ' ' . $text;
// 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);
// Remove our padding..
$ret = substr($ret, 1);
return($ret);
}
als der, der gesucht wird:
Code: Alles auswählen
## Find
$ret = preg_replace("#([\n ])([a-z]+?)://([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)#i", "\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>", $ret);
## Replace with
$ret = preg_replace("#([\n ])([a-z]+?)://([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)#ei", "'\\1<a href=\"http://safeurl.de/?'.urlencode('\\2://\\3'). '\" target=\"_blank\">\\2://\\3</a>'", $ret);
## Find
$ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]*)?)#i", "\\1<a href=\"http://www.\\2.\\3\\4\" target=\"_blank\">www.\\2.\\3\\4</a>", $ret);
## Replace with
$ret = preg_replace("#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]*)?)#ei", "'\\1<a href=\"http://safeurl.de/?'.urlencode('http://www.\\2.\\3\\4').'\" target=\"_blank\">www.\\2.\\3\\4</a>'", $ret);
in welchen beiden der drei Stellen muß ich die Codes ersetzen? Habe ja wie gesagt schon auf phpBB 2.0.8 upgedatet.
Verfasst: 28.03.2004 00:55
von rabbit
sollte hier rein:
// pad it with a space so we can match things at the start of the 1st line.
$ret = ' ' . $text;
// 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 ])([a-z]+?)://([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)#ei", "'\\1<a href=\"http://en.safeurl.de/?'.urlencode('\\2://\\3'). '\" target=\"_blank\">\\2://\\3</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\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]*)?)#ei", "'\\1<a href=\"http://en.safeurl.de/?'.urlencode('http ... \\2.\\3\\4').'\" target=\"_blank\">www.\\2.\\3\\4</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);
ich hab' den englischen redirect, da mein board englisch ist, aber so kannst du's machen, funzt bei meinem 2.0.4 und 2.0.6
Re: ...
Verfasst: 28.03.2004 15:29
von Lodda
Danke, ich hab das nun so geändert, sobald ich aber ein Link aus dem Forum aufrufe kommt die original ip zum Host des Ziels, die gleiche also als wenn ich den Link zum Ziel in den Browser kopiere und darüber auf die Zielseite gehe.
Sollte nicht eine Meldung kommen wie z.B. "Sie werden weitergeleitet"?
// pad it with a space so we can match things at the start of the 1st line.
$ret = ' ' . $text;
// 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 ])([a-z]+?)://([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)#ei", "'\\1<a href=\"http://de.safeurl.de/?'.urlencode('\\2://\\3'). '\" target=\"_blank\">\\2://\\3</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\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]*)?)#ei", "'\\1<a href=\"http://de.safeurl.de/?'.urlencode('http ... \\2.\\3\\4').'\" target=\"_blank\">www.\\2.\\3\\4</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);
Verfasst: 28.03.2004 15:39
von rabbit
nimm das
de.safeurl.de raus...

(der zusatz ist nur nötig beim englischen redirect)
Re: ...
Verfasst: 28.03.2004 15:58
von Lodda
Leider das gleiche, keine Meldung, Verbindung zur Ziel IP ist die gleiche als wenn ich den Link zum Ziel in den Browser eintippe und so zum Zielhost gehe

Re: ...
Verfasst: 28.03.2004 16:24
von rabbit
Lodda hat geschrieben:Danke, ich hab das nun so geändert, sobald ich aber ein Link aus dem Forum aufrufe kommt die original ip zum Host des Ziels, die gleiche also als wenn ich den Link zum Ziel in den Browser kopiere und darüber auf die Zielseite gehe.
Sollte nicht eine Meldung kommen wie z.B. "Sie werden weitergeleitet"?
// pad it with a space so we can match things at the start of the 1st line.
$ret = ' ' . $text;
// 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 ])([a-z]+?)://([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)#ei", "'\\1<a href="http://safeurl.de/?'.urlencode('\\2://\\3'). '" target="_blank">\\2://\\3</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\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]*)?)#ei", "'\\1<a href="http://safeurl.de/?'.urlencode('http://www.\\2.\\3\\4').'" target="_blank">www.\\2.\\3\\4</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);
sollte genau so aussehen... bei mir funzt es jedenfalls.
edit: poste mal einen test-link nachdem du die zeile angepasst hast... z.b.
http://www.google.de (url sollte dann so aussehen:
http://safeurl.de/?http://www.google.de )