################################################## ######
## MOD Title: [phpBB3] Simple Hide URL MOD
## MOD Author: ycl6 < ycl6@users.sourceforge.net > (Y.C. LIN) http://macphpbbmod.sourceforge.net/
## MOD Description: Whenever [URL] BBcode is used in a message, the hyperlink is automatically hidden from guests.
## MOD Version: 0.0.1
##
## Installation Level: Easy
## Installation Time: 3 Minutes
##
## Files To Edit: 3
## includes/bbcode.php
## language/en/viewtopic.php
## styles/prosilver/template/bbcode.html
##
## Included Files: 0
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
################################################## ###############
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
################################################## ############
## Author Notes:
## Tested on phpBB 3.0.0 GOLD.
##
################################################## ############
## MOD History:
##
## 2008-01-03 - Version 0.0.1
## - Initial Release for BETA testing
##
################################################## ############
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
################################################## ############
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
$this->bbcode_cache[$bbcode_id] = array(
'preg' => array(
'#\[url:$uid\]((.*?))\[/url:$uid\]#s' => $this->bbcode_tpl('url', $bbcode_id),
'#\[url=([^\[]+?):$uid\](.*?)\[/url:$uid\]#s' => $this->bbcode_tpl('url', $bbcode_id),
)
);
#
#-----[ BEFORE, ADD ]------------------------------------------
#
if ($user->data['user_id'] != ANONYMOUS)
{
#
#-----[ AFTER, ADD ]------------------------------------------
#
}
else
{
$this->bbcode_cache[$bbcode_id] = array(
'preg' => array(
'#\[url:$uid\].*?\[/url:$uid\]#s' => $this->bbcode_tpl('url_hidden', $bbcode_id),
'#\[url=[^\[]+?:$uid\].*?\[/url:$uid\]#s' => $this->bbcode_tpl('url_hidden', $bbcode_id),
)
);
}
#
#-----[ OPEN ]------------------------------------------
#
language/en/viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
));
?>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
'URL_HIDDEN' => 'URL is hidden from guests, please register and login to view the hyperlink',
#
#-----[ OPEN ]------------------------------------------
#
styles/prosilver/template/bbcode.html
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN url --><a href="{URL}" class="postlink">{DESCRIPTION}</a><!-- END url -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN url_hidden -->{L_URL_HIDDEN}<!-- END url_hidden -->
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM