ich habe vor einigen Tagen den folgenden MOD eingebaut.
Grundsätzlich funktioniert der sehr gut, aber mit einer Einschränkung, wenn man die URL einfach so in das Thema schreibt, ist das alles ok, setzt man aber denLink ind [url]-Tags, dann setzt die Funktion des MOD´s aus.
Hat Vielleicht jemand eine Idee, wie man das beheben kann?
Gruß Max
Der MOD:
Code: Alles auswählen
# A safeurl Modification
#
####################################################
#
# Note:
# Backup all files before installing this mod.
# We can't provide full support, but if you
# any questions please contact us.
#
# General: info@safeurl.de
# Support: support@safeurl.de
# Abuse: abuse@safeurl.de
#
# For further information about safeurl visit
# our website: http://safeurl.de
#
####################################################
#
# Mod title: Safeurl Redirector
# Message board: phpBB 2.0.3
# Homepage: http://www.phpbb.com
# Mod version: 1.1
# Installation Level: Easy
# Installion time: >1 minute
# Files to edit: 1
#
#####################################################
## Open
includes\bbcode.php
## 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);
## Save and close ( all files )
#####################################################
- End of file