Hello i seen that MOD used on this PHPBB forum along with some other where the links are hidden for non registered members.. Does anyone know where i can find this as i have had no luck..
#################################################################
## Mod Title: Hide Links
## Mod Author: Nome <
Only registered users can see links on this board! Get registered or login to the forums!
> 162783614
## Mod Version: 2.1.0
## Mod Description: This mod will prevent links from being shown
## to unregistered users. Instead they'll be
## advised to register or login.
## Mod Features:
## - hide http links and email from unregistered users
##
## Installation Level: Very Easy
## Installation Time: 3 Minutes
##
## Files To Edit: 2
## includes/bbcode.php
## language/lang_english/lang_main.php
##
#################################################################
## Author's notes:
## In order to change the thing you get instead of a link
## edit $replacer. By default there is a quotelike box.
## Pay attention to the fact that the second block of $replacers
## has a space in the first line, it's a must there :)
#################################################################
#################################################################
## History
## - 2.1.0 - Updated with latest bugfixes from phpbb groupe
## - 2.0.0 - Fixed a bug with [url] links
## - 1.0.0 - First released
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
function bbencode_second_pass($text, $uid)
{
global $lang, $bbcode_tpl;
#
#-----[ REPLACE WITH ]------------------------------------
#
function bbencode_second_pass($text, $uid)
{
global $lang, $bbcode_tpl, $userdata, $phpEx, $u_login_logout;
// The thing we replace links with. I like using a quote like box
$replacer = '<table width="40%" cellspacing="1" cellpadding="3" border="0"><tr><td class="quote">';
$replacer .= $lang['Links_Allowed_For_Registered_Only'] . '<br />';
$replacer .= sprintf($lang['Get_Registered'], "<a href=\"" . append_sid('profile.' . $phpEx . '?mode=register') . "\">", "</a>");
$replacer .= sprintf($lang['Enter_Forum'], "<a href=\"" . append_sid($u_login_logout) . "\">", "</a>");
$replacer .= '</td></tr></table>';
#
#-----[ 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);
// matches an email@domain type address at the start of a line, or after a space.
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".
$ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret);
#
#-----[ REPLACE WITH ]------------------------------------
#
//
// Hide links from unregistered users mod
//
if ( !$userdata['session_logged_in'] )
{
// The thing we replace links with. I like using a quote like box
$replacer = ' <table width="40%" cellspacing="1" cellpadding="3" border="0"><tr><td class="quote">';
$replacer .= $lang['Links_Allowed_For_Registered_Only'] . '<br />';
$replacer .= sprintf($lang['Get_Registered'], "<a href=\"" . append_sid('profile.' . $phpEx . '?mode=register') . "\">", "</a>");
$replacer .= sprintf($lang['Enter_Forum'], "<a href=\"" . append_sid($u_login_logout) . "\">", "</a>");
$replacer .= '</td></tr></table>';
// 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", $replacer, $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", $replacer, $ret);
// matches an email@domain type address at the start of a line, or after a space.
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".
$ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", $replacer, $ret);
}
else
{
// 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);
// matches an email@domain type address at the start of a line, or after a space.
// Note: Only the followed chars are valid; alphanums, "-", "_" and or ".".
$ret = preg_replace("#(^|[\n ])([a-z0-9&\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret);
}
//
// Hide links from unregistered users mod
//
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
//
// Hide links from unregistered users mod
//
$lang['Links_Allowed_For_Registered_Only'] = 'Only registered users can see links on this board!';
$lang['Get_Registered'] = 'Get %sregistred%s or ';
$lang['Enter_Forum'] = '%senter%s the forums!';
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------
#
#EoM
thank you sir by chance you know of the new site they started a while for phpbb mods ported to phpnuke.. i found about a month ago but didnt bookmark it... it was like the guys from the old portedmods.com started a new one??
Joined: Dec 19, 2004 Posts: 2275 Location: Germany:Moderator German NukeSentinel Support
Posted:
Mon Mar 17, 2008 10:21 am
I use this mod since several forums versions and Nuke versions inclusive RavenNuke.
For lang german there is a updated version of hide links available at
Only registered users can see links on this board! Get registered or login to the forums!
Ok, i wanted to do this with Attached Images (using attachmod) can this be done? if so - where - thanks!
edit: Note that if a user is not registered or not logged in, attachmod does not display the images, however there is no message that tells the guest that the image is not visible due to their status (not logged in).
Joined: Dec 19, 2004 Posts: 2275 Location: Germany:Moderator German NukeSentinel Support
Posted:
Sat Sep 06, 2008 8:43 am
I would use for this a standard phpBB mod wich tells you as anonymus or guest something like" only registered members can view all topics and pictures" at the top of your board.
I downloaded such a mod just cant find it because I changed my PC a time ago.
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum