PHPBB3 - Get rid of direct links [Simple]

Status
Not open for further replies.

Avek

Member
21
2009
0
0
Code:
#########################################################
## Installation Level: Easy                            ##
## Installation Time: 2 minutes                        ##
## Files to edit: 3                                    ##
##      message_parser.php                             ##
##      bbcode.html                                    ##
##      functions_content.php                          ##
#########################################################
## Author Note:                                        ##
## http://www.anonym.to/? can be changed               ##
##   to any custom redirecting page                    ##
## Compatible with PHPBB 3.0.6                         ##
## By Avek                                             ##
#########################################################
#
#-----[ OPEN ]-------------------------------------------
#
includes/message_parser.php

#
#-----[ FIND ]-------------------------------------------
# line 298
 $in = 'http://' . $in;

#
#-----[ REPLACE WITH ]-----------------------------------
#
 $in = 'http://www.anonym.to/?' . $in;

#
#-----[ OPEN ]-------------------------------------------
# styles/prosilver/template/bbcode.html
styles/subsilver2/template/bbcode.html

#
#-----[ FIND ]-------------------------------------------
# (line 55) || (line 36 in prosilver)
<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->

#
#-----[ REPLACE WITH ]-----------------------------------
# target="_blank"
 <!-- BEGIN url --><a href="http://www.anonym.to/?{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->

#
#-----[ OPEN ]-------------------------------------------
#
includes\functions_content.php

#
#-----[ FIND ]-------------------------------------------
# line 629
    $html    = "$whitespace<!-- $tag --><a$class href=\"$url\">$text</a><!-- $tag -->$append";
    
#
#-----[ REPLACE WITH ]-----------------------------------
#
 $html    = "$whitespace<!-- $tag --><a$class href=\"http://www.anonym.to/?$url\">$text</a><!-- $tag -->$append";

#
#-----[ SAVE/CLOSE ALL FILES ]---------------------------
#
 # EOF
Simple modification and it's chaning all links in url tags and if u got hotlinking then all words with:
"http://*" and "www*" are changed to links,
so they are changed too, to http://www.anonym.to/?link
 
6 comments
There's a mod called prime links that provides the same functionality through a modification in bbcodes.php (preg replace callback) btw it can also ensure site internal links aren't annonmysed.
 
Status
Not open for further replies.
Back
Top