Seite 2 von 2

Jo...

Verfasst: 22.10.2003 18:17
von Horst B
... brauche ich auch dringend! ... :cookie:

och manno

Verfasst: 22.10.2003 23:15
von Klausimausi
hat denn niemand ne lösung parat?

hey ho

Verfasst: 23.10.2003 11:48
von Kleine85
kann uns denn niemand helfen? es muss doch diesen mod auch für phpbb 2.0.6 geben?!

Verfasst: 17.03.2005 15:54
von xil_tron
Kann vielleicht jemand den Mod phpbb 2.0.13 tauglisch machen ?

Verfasst: 17.03.2005 16:32
von rabbit
###############################################
## Hack Title: Active Link Referrer Blocker
## Hack Version: 1.0.0
## Author: wd2004
## updated by rabbit
##
## Description: This hack will block the referrer when a link
## is clicked by going through safeurl.de first.
## When ever a link is posted on the BB, it will
## automatically add the safeurl.de address to the
## link. The whole process is invisible since it is
## added to the main phpbb link processing functions.
## When you edit your post, the link will appear the
## same way as you posted it.
##
## Compatibility: Tested on 2.0.13 only
##
## Installation Level: Easy
## Installation Time: ~1 minute
##
## Files To Edit: 1
## includes/bbcode.php
##
## Included Files: 0
##
## Author Notes: After creating this hack, I have noticed that it was
## created already back in 2002. According to other users
## the previous version stopped working after phpBB 2.0.5.
## This version will work with 2.0.10 and maybe earlier. I
## would like to give credit to the original author of the
## first script "Safeurl Hack" by reimer. I would also like
## to give credit to safeurl.de for providing this great url
## protection service.
##
## Support: http://www.phpbbhacks.com/forums
## Copyright: ©2004 Active Link Referrer Blocker v1.0.0 - wd2004
##
###############################################
## You downloaded this hack from phpBBHacks.com, the #1 source for phpBB related downloads.
## Please visit http://www.phpbbhacks.com/forums for support.
###############################################
##
###############################################
## This hack is released under the GPL License.
## This hack can be freely used, but not distributed, without permission.
## Intellectual Property is retained by the hack author(s) listed above.
###############################################

#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php

#
#-----[ FIND ]------------------------------------------
#

// We do URLs in several different ways..
$bbcode_tpl['url1'] = str_replace('{URL}', '\\1', $bbcode_tpl['url']);
$bbcode_tpl['url1'] = str_replace('{DESCRIPTION}', '\\1', $bbcode_tpl['url1']);

$bbcode_tpl['url2'] = str_replace('{URL}', '\\1', $bbcode_tpl['url']);
$bbcode_tpl['url2'] = str_replace('{DESCRIPTION}', '\\1', $bbcode_tpl['url2']);

$bbcode_tpl['url3'] = str_replace('{URL}', '\\1', $bbcode_tpl['url']);
$bbcode_tpl['url3'] = str_replace('{DESCRIPTION}', '\\2', $bbcode_tpl['url3']);

$bbcode_tpl['url4'] = str_replace('{URL}', '\\1', $bbcode_tpl['url']);
$bbcode_tpl['url4'] = str_replace('{DESCRIPTION}', '\\3', $bbcode_tpl['url4']);

#
#-----[ REPLACE ]------------------------------------------
#

// We do URLs in several different ways..
$bbcode_tpl['url1'] = str_replace('{URL}', 'http://safeurl.de/?\\1', $bbcode_tpl['url']);
$bbcode_tpl['url1'] = str_replace('{DESCRIPTION}', '\\1', $bbcode_tpl['url1']);

$bbcode_tpl['url2'] = str_replace('{URL}', 'http://safeurl.de/?\\1', $bbcode_tpl['url']);
$bbcode_tpl['url2'] = str_replace('{DESCRIPTION}', '\\1', $bbcode_tpl['url2']);

$bbcode_tpl['url3'] = str_replace('{URL}', 'http://safeurl.de/?\\1', $bbcode_tpl['url']);
$bbcode_tpl['url3'] = str_replace('{DESCRIPTION}', '\\2', $bbcode_tpl['url3']);

$bbcode_tpl['url4'] = str_replace('{URL}', 'http://safeurl.de/?\\1', $bbcode_tpl['url']);
$bbcode_tpl['url4'] = str_replace('{DESCRIPTION}', '\\3', $bbcode_tpl['url4']);

#
#-----[ FIND ]------------------------------------------
#

// 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);

#
#-----[ REPLACE ]------------------------------------------
#

// 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://safeurl.de/?\\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://safeurl.de/?\\2\" target=\"_blank\">\\2</a>", $ret);

#
#-----[ SAVE & CLOSE ALL FILES ]--------------------------
#
#End

Verfasst: 17.03.2005 17:27
von xil_tron
Super, vielen herzlichen Dank für die schnelle Hilfe :grin:

Verfasst: 24.04.2008 12:57
von tomtom
Hm, mit 2.0.23 läuft das nicht ... :(