##############################################################
## MOD Title: images.yeuxverts.net forum integration
## MOD Author: Lice < lice@yeuxverts.net >
## MOD Description: This mod anonymises all links posted on your forum through anon.yeuxverts.net.
##
## MOD Version: 1.0.0
##
## Installation Level: Easy
## Files To Edit: includes/functions.php
## Included Files: none
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## Author Notes: images.yeuxverts.net is (c) 2006-2007 YeuxVerts.net
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------
#
function smiley_text($text, $force_option = false)
{
global $config, $user, $phpbb_root_path;
if ($force_option || !$config['allow_smilies'] || !$user->optionget('viewsmilies'))
{
return preg_replace('#
#', '
#', '\1', $text);
}
else
{
$text = preg_replace('#
', $text);
}
/* yeuxverts.net link anonymiser */
// remove stuff that had been anymised by the user (user entered an anon.yeuxverts.net link)
$text = preg_replace("#href=\"http(:|&\#58;)//anon(.|&\#46;)yeuxverts(.|&\#46;)net/\?([\w]+?(:|&\#58;)//)#is", "href=\"\\4", $text);
// anonymise everything
$text = preg_replace("#href=\"([\w]+?(:|&\#58;)//)#is", "href=\"http://anon.yeuxverts.net/?\\1", $text);
// fix local urls.. replace "MyLocalLink.Com" with your domain name, duplicate this line for all your local domains.
// note that this line matches www.MyLocalLink.Com, something.MyLocalLink.Com, Anything.mylocallink.com, mylocallink.com.....
$ret = preg_replace("#href=\"http://anon.yeuxverts.net/\?([\w]+?(:|&\#58;)//(|\w+\.)MyLocalLink.Com)#is", "href=\"\\1", $ret);
return $text;
}
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM