demo站
我是用Attachment 2.4.5 去修改, 一樣可以套用在2.4.1版上
方式如下
#
#--------[ OPEN ]----------------
#
attach_mod/displaying.php
#
#--------[ FIND ]----------------
#
代碼: 選擇全部
if (intval($switch_attachment) == 0 || (!($is_auth['auth_download'] && $is_auth['auth_view'])) || intval($attach_config['disable_mod']) || $attach_config['topic_icon'] == '')
#
#--------[ REPLACE WITH ]----------------
#
代碼: 選擇全部
if (intval($switch_attachment) == 0 || intval($attach_config['disable_mod']) || $attach_config['topic_icon'] == '')
#
#--------[ FIND ]----------------
#
代碼: 選擇全部
// Not included because this would mean template and language file changes (at this stage this is not a wise step. ;))
#
#--------[ AFTER, ADD ]----------------
#
代碼: 選擇全部
display_attachments_notice();
#
#--------[ FIND ]----------------
#
#
#--------[ BEFORE, ADD ]----------------
#
代碼: 選擇全部
function display_attachments_notice()
{
global $template, $lang;
init_display_template('body', '{postrow.ATTACHMENTS}');
$template->assign_block_vars('postrow.attach', array());
$template->assign_block_vars('postrow.attach.attach_notice', array(
NOTICE => $lang['Attach_Notice']
));
}
#
#--------[ OPEN ]----------------
#
language/lang_chinese_traditional_taiwan/lang_main_attach.php
#
#--------[ FIND ]----------------
#
#
#--------[ BEFORE, ADD ]----------------
#
代碼: 選擇全部
$lang['Attach_Notice'] = '附加檔案: 您目前的權限無法檢視附加檔案';
#
#--------[ OPEN ]----------------
#
# 自行替換subSilver為你所使用的風格名稱目錄
templates/subSilver/viewtopic_attach_body.tpl
#
#--------[ FIND ]----------------
#
代碼: 選擇全部
<!-- END attach -->
#
#--------[ BEFORE, ADD ]----------------
#
代碼: 選擇全部
<!-- BEGIN attach_notice -->
<br /><br />
<div align="center"><hr width="95%" /></div>
<table width="95%" border="1" cellpadding="2" cellspacing="0" class="attachtable" align="center">
<tr>
<td width="100%" class="attachheader" align="center"><b><span class="gen">{postrow.attach.attach_notice.NOTICE}</span></b></td>
</tr>
</table>
<!-- END attach_notice -->
#
#--------[ SAVE/CLOSE ALL FILES ]----------------
#
# EoM