bbcode.php / .tpl -> mehrfache URL Generierung?
Verfasst: 19.09.2005 09:31
Es gibt in der bbcode.tpl folgende Zeile:
und in der bbcode.php folgende:
Da ich externe Links umschreiben wollte und diese jetzt über eine outbound rausjage, damit Spammer keine Backlinks mehr erhalten viel mir auf, dass die tpl erstmal anscheinend nicht genutzt wird:
http://www.maxrev.de/cgi-bin/outbound.p ... w.phpbb.de
Wann schreibt die bbcode per .tpl eigentlich um? Für welche URLs ist das wichtig?
Code: Alles auswählen
<!-- BEGIN url --><a href="{URL}" target="_blank" class="postlink">{DESCRIPTION}</a><!-- END url -->
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]+?://[\w\#$%&~/.\-;:=,?@\[\]+]*)#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)\.[\w\#$%&~/.\-;:=,?@\[\]+]*)#is", "\\1<a href=\"http://\\2\" target=\"_blank\">\\2</a>", $ret);
http://www.maxrev.de/cgi-bin/outbound.p ... w.phpbb.de
Wann schreibt die bbcode per .tpl eigentlich um? Für welche URLs ist das wichtig?