Attachment mod help need assitance

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Attachment mod help need assitance
mike01
CZ Newbie
mike01 has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: May 22, 2006
0.00 posts per day
Posts: 21
Points: 716
   
I have successfully installed the attachment mod from bbtonukemods and everything works great but I was wondering if there was a way to still display the download block to users but display a alternative message like, You must register to download files! And make the link dead unless the user is logged in or use something like below?

if (is_user($user)) { 
echo "Display download block\n";
} else {
echo "You must register to download files!\n";
}


And if so what files do I need to edit to make this happen?

Thanks in advance.. icon_biggrin.gif

Mike Garsons


Back to top Reply with quote
#2   
craigmack
CZ Active Member
 Codezwiz Site Donator
craigmack has been a member for over 19 year's 19 Year Member
usa.gif michigan.gif
Age: 46
Gender: Male
Fav. Sports Team: Pistons
Status: Offline
Joined: Feb 15, 2005
0.02 posts per day
Posts: 147
Points: 6,072
   
Check out this link [ Register or login to view links on this board. ]
that hack will hide links to guest and will says something about registering before they can view the link



Back to top Reply with quote
#3   re: Attachment mod help need assitance
mike01
CZ Newbie
mike01 has been a member for over 18 year's 18 Year Member
Gender: Male
Status: Offline
Joined: May 22, 2006
0.00 posts per day
Posts: 21
Points: 716
   
First let me compliment you guys, you have a fantastic site I must say - easy to navigate and fast loading too well done

One of the best I've seen, is this nuke?

I thank you for your time in replying but I simply just want to show an alternative message for the download block that appears in the forum post when your logged in, except make it visible to visitors just not active so they cant download it..

Kind of like an incentive to join, the mod you gave me will disable sig's and urls through out my board and my members I don’t think will like that option..to much ..lol

Any other ideas?

Mike icon_sad.gif



Back to top Reply with quote
#4   re: Attachment mod help need assitance
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
I noticed the attachment mod doesn't allow non registered members to see there is an attachment there. I think someone would simply have to right a mod similiar to the one above that does the same thing. We will use this as an example.

View this page
[ Register or login to view links on this board.]

Now Login
Username:test
Password:test

View this again
[ Register or login to view links on this board.]



Back to top Reply with quote
#5   re: Attachment mod help need assitance
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
I think the easiest and smartest thing that could be done by someone much more talented than myself. Is to modify the code found in the above link to include the attachment mod. I think that is possible.

Here is that code for the hide links mod if anyone wants to give it a shot.

#################################################################
## Mod Title: Hide Links
## Mod Author: Nome < [ Register or login to view links on this board. ] > 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 a [url]xxxx://www.phpbb.com[/url] code..
   $patterns[] = "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#is";
   $replacements[] = $bbcode_tpl['url1'];

   // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
   $patterns[] = "#\[url\]((www|ftp)\.[^ \"\n\r\t<]*?)\[/url\]#is";
   $replacements[] = $bbcode_tpl['url2'];

   // [url=xxxx://www.phpbb.com]phpBB[/url] code..
   $patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
   $replacements[] = $bbcode_tpl['url3'];

   // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
   $patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
   $replacements[] = $bbcode_tpl['url4'];

   // [email]user@domain.tld[/email] code..
   $patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
   $replacements[] = $bbcode_tpl['email'];



#
#-----[ REPLACE WITH ]------------------------------------
#
   // matches a [url]xxxx://www.phpbb.com[/url] code..
   $patterns[] = "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#is";
   if ( !$userdata['session_logged_in'] )
   {
      $replacements[] = $replacer;
   }
   else
   {
      $replacements[] = $bbcode_tpl['url1'];
   }

   // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
   $patterns[] = "#\[url\]((www|ftp)\.[^ \"\n\r\t<]*?)\[/url\]#is";
   if ( !$userdata['session_logged_in'] )
   {
      $replacements[] = $replacer;
   }
   else
   {
      $replacements[] = $bbcode_tpl['url2'];
   }

   // [url=xxxx://www.phpbb.com]phpBB[/url] code..
   $patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
   if ( !$userdata['session_logged_in'] )
   {
      $replacements[] = $replacer;
   }
   else
   {
      $replacements[] = $bbcode_tpl['url3'];
   }

   // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
   $patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
   if ( !$userdata['session_logged_in'] )
   {
      $replacements[] = $replacer;
   }
   else
   {
      $replacements[] = $bbcode_tpl['url4'];
   }

   // [email]user@domain.tld[/email] code..
   $patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
   if ( !$userdata['session_logged_in'] )
   {
      $replacements[] = $replacer;
   }
   else
   {
      $replacements[] = $bbcode_tpl['email'];
   }

#
#-----[ FIND ]------------------------------------------
#
function make_clickable($text)
{

#
#-----[ AFTER, ADD ]------------------------------------
#
   global $userdata, $lang, $phpEx, $u_login_logout;

#
#-----[ 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

#
#-----[ FIND ]------------------------------------------
#
$lang['A_critical_error'] =

#
#-----[ AFTER, ADD ]------------------------------------
#

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




Back to top Reply with quote
#6   re: Attachment mod help need assitance
dandumit
CZ Newbie
dandumit has been a member for over 17 year's 17 Year Member
Gender: Male
Status: Offline
Joined: Feb 28, 2007
0.00 posts per day
Posts: 1
Points: 0
   
Hi,
the bbtonukemods.com is no longer up. Could you please send me the attachment mod for bbtonuke ?

Thanks !
Daniel



Back to top Reply with quote
#7   re: Attachment mod help need assitance
floppydrivez
CZ Addict
 Codezwiz Site Donator
floppydrivez has been a member for over 18 year's 18 Year Member
usa.gif mississippi.gif
Occupation: graphic design
Age: 43
Gender: Male
Website:
Status: Offline
Joined: Feb 26, 2006
0.08 posts per day
Posts: 518
Points: 4,848
AIM Address Yahoo Messenger MSN Messenger 
[ Register or login to view links on this board. ]

I think its in the codezwiz downloads too.



Back to top Reply with quote
#8   re: Attachment mod help need assitance
khaled_dxb
CZ Newbie
khaled_dxb has been a member for over 17 year's 17 Year Member
Gender: Male
Status: Offline
Joined: Mar 02, 2007
0.00 posts per day
Posts: 1
Points: 0
   
Hi,
I've installed the attachment mod also and it's working fine - BUT it only works if i use FTP uploads - the normal method generates a general error which i have not been able to track down yet.

I have done some reading and it seems that the temp php directory on my hosting server is not writable - can anyone tell me what is this dir called so i can ask for it to be checked?

A second problem that is happening is that when i try to check a users attach CP (UACP) it opens a completely blank page - any ideas? or pointers in the right direction that may check out.

Many thanks and a great site you have!!



Back to top Reply with quote
#9   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   
Double check the file paths and make sure you can upload files. Many hosts disable this feature that is why the attachment mod has it built in.

You shouldnt have to change any file permissions except for the one your uploading into.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#10   Re: re: Attachment mod help need assitance
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,430
   


Originally posted by floppydrivez @ Wed May 24, 2006 2:52 pm:

I think the easiest and smartest thing that could be done by someone much more talented than myself. Is to modify the code found in the above link to include the attachment mod. I think that is possible.

Here is that code for the hide links mod if anyone wants to give it a shot.

#################################################################
## Mod Title: Hide Links
## Mod Author: Nome < [ Register or login to view links on this board. ] > 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 a [url]xxxx://www.phpbb.com[/url] code..
   $patterns[] = "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#is";
   $replacements[] = $bbcode_tpl['url1'];

   // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
   $patterns[] = "#\[url\]((www|ftp)\.[^ \"\n\r\t<]*?)\[/url\]#is";
   $replacements[] = $bbcode_tpl['url2'];

   // [url=xxxx://www.phpbb.com]phpBB[/url] code..
   $patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
   $replacements[] = $bbcode_tpl['url3'];

   // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
   $patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
   $replacements[] = $bbcode_tpl['url4'];

   // [email]user@domain.tld[/email] code..
   $patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
   $replacements[] = $bbcode_tpl['email'];



#
#-----[ REPLACE WITH ]------------------------------------
#
   // matches a [url]xxxx://www.phpbb.com[/url] code..
   $patterns[] = "#\[url\]([\w]+?://[^ \"\n\r\t<]*?)\[/url\]#is";
   if ( !$userdata['session_logged_in'] )
   {
      $replacements[] = $replacer;
   }
   else
   {
      $replacements[] = $bbcode_tpl['url1'];
   }

   // [url]www.phpbb.com[/url] code.. (no xxxx:// prefix).
   $patterns[] = "#\[url\]((www|ftp)\.[^ \"\n\r\t<]*?)\[/url\]#is";
   if ( !$userdata['session_logged_in'] )
   {
      $replacements[] = $replacer;
   }
   else
   {
      $replacements[] = $bbcode_tpl['url2'];
   }

   // [url=xxxx://www.phpbb.com]phpBB[/url] code..
   $patterns[] = "#\[url=([\w]+?://[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
   if ( !$userdata['session_logged_in'] )
   {
      $replacements[] = $replacer;
   }
   else
   {
      $replacements[] = $bbcode_tpl['url3'];
   }

   // [url=www.phpbb.com]phpBB[/url] code.. (no xxxx:// prefix).
   $patterns[] = "#\[url=((www|ftp)\.[^ \"\n\r\t<]*?)\]([^?\n\r\t].*?)\[/url\]#is";
   if ( !$userdata['session_logged_in'] )
   {
      $replacements[] = $replacer;
   }
   else
   {
      $replacements[] = $bbcode_tpl['url4'];
   }

   // [email]user@domain.tld[/email] code..
   $patterns[] = "#\[email\]([a-z0-9&\-_.]+?@[\w\-]+\.([\w\-\.]+\.)?[\w]+)\[/email\]#si";
   if ( !$userdata['session_logged_in'] )
   {
      $replacements[] = $replacer;
   }
   else
   {
      $replacements[] = $bbcode_tpl['email'];
   }

#
#-----[ FIND ]------------------------------------------
#
function make_clickable($text)
{

#
#-----[ AFTER, ADD ]------------------------------------
#
   global $userdata, $lang, $phpEx, $u_login_logout;

#
#-----[ 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

#
#-----[ FIND ]------------------------------------------
#
$lang['A_critical_error'] =

#
#-----[ AFTER, ADD ]------------------------------------
#

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




If you look in the attachments files and find where the output is checked for permissions you should see a return (stopping the script from producing the attachments link). Change that to a function that shows a message that they cant download instead.



_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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
You cannot attach files in this forum
You cannot download files in this forum