[外掛] Attachment Mod (附加檔案) (Update 2.4.5)

php BB 大部分皆是由竹貓星球提供資料!
頭像
懸壺子
系統管理員
系統管理員
文章: 29920
註冊時間: 2001-10-05 , 10:10
個人狀態: 道骨學習佛心..^^..
貼心留言: 氣候不穩
性別: 公仔
來自: 黃金故鄉
聯繫:

[外掛] Attachment Mod (附加檔案) (Update 2.4.5)

文章: #49506 懸壺子
2006-12-28 , 14:25

[外掛] Attachment Mod (附加檔案) (Update 2.4.5)


代碼: 選擇全部

#################################################################
## MOD Title: File Attachment Mod v2
## MOD Author: Acyd Burn < N/A > (Meik Sievertsen) http://www.opentools.de/
## MOD Description:
##   This Mod adds the ability to attach files in phpBB2.
##   This Version has been tested and works with phpBB 2.0.21.
##   This Version will NOT work with phpBB2 Modules designed for *Nuke Portals or phpBB2 Ports.
## MOD Version: 2.4.5
##
## Installation Level:   Intermediate
## Installation Time:   30-60 Minutes
## Files To Edit:   common.php, faq.php, modcp.php, posting.php, privmsg.php,
##         viewforum.php, viewtopic.php, admin/admin_forumauth.php, admin/admin_ug_auth.php, admin/admin_forums.php,
##         admin/admin_groups.php, admin/admin_users.php, includes/auth.php, includes/functions.php, includes/functions_admin.php,
##         includes/prune.php, includes/topic_review.php, includes/usercp_viewprofile.php, modcp_body.tpl, posting_body.tpl,
##         posting_preview.tpl, posting_topic_review.tpl, privmsgs_body.tpl, privmsgs_preview.tpl, privmsgs_read_body.tpl,
##         profile_view_body.tpl, viewforum_body.tpl, viewtopic_body.tpl, admin/group_edit_body.tpl, admin/user_edit_body.tpl
## Included Files:   many many files
## 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:
##
## Complete feature list: docs/features.txt
## The user guide: docs/user_guide.html
##
## Some notes:
## - I suggest reading the user guide first if you haven't installed any Mods before.
## - Please note that this Mod is NOT written to be EasyMod compatible (i haven't tested it).
## - Please follow the installation instructions as strict as you can.
##
##
## UPDATING/UPGRADING:
##
## Please skip to the NEW INSTALLATION part if you want to install the
## attachment mod for the first time or want to setup a new installation.
##
## Please read the docs/update.txt document for update/upgrade instructions.
##
##
## NEW INSTALLATION:
##
## You are able to choose between two installation types, depending on your setup:
##
## -> Using the pre-modified files:
##   
##   This method is recommended for those having a vanilla (plain, not modded) phpBB Installation.
##   With this method you do not need to adjust your phpBB files at all, only running the installer
##   and uploading all files - including the pre-modified files - is required.
##
##   If you think this is the correct method for you, please follow the following steps listet in:
##      docs/install_using_premod_files.txt
##   to install the attachment mod.
##   
##   BTW, it is save to close this file now if you use this method. ;)
##
##
##
## -> Using the mod instructions:
##
##   This method is recommended for those already having applied mods to their phpBB Installation.
##
##   If you think this is the correct method for you, please read further.
##
##
##
## Credits:
##   Thanks to all people translating this Mod into their language and offering their work.
##   Also a big thank you to those supporting this Mod and offering help to those having problems.
##
##
## The following sites also contain the latest version of this MOD:
##
## http://www.opentools.de/
## http://sourceforge.net/projects/acydmods
## http://www.phpbb.com/mods
##
## Full support for this MOD can be obtained at:
## http://www.opentools.de/
## Please Note that i am not able to contribute to the Attachment Mod topic at phpbb.com (http://www.phpbb.com/phpBB/viewtopic.php?t=74505)
##
##############################################################
## MOD History:
##
##   2006-09-06 - Version 2.4.5
##      - fixed another XSS vulnerability only occurring for users using the internet explorer - Kellanved
##      - added COPY statement for easymod
##      - some very tiny template fixes
##      - thanks to alcaeus for verifying that the XSS issues got fixed by the implemented code
##
##   2006-09-04 - Version 2.4.4
##      - fixed typo in functions_filetypes.php
##      - adjusted install.txt to follow the phpBB MOD guidelines
##      - adjusted attachment viewtopic template for calling the loop param correctly
##      - fixed XSS only occurring for users using Internet Explorer - Vovochka
##      - used constant for user id in functions_includes
##
##   2006-04-23 - Version 2.4.3
##      - fixed wrong id in posting_attachments.php
##      - fixed some wrong db calls in functions_admin.php (not changing functionality)
##
##   2006-04-18 - Version 2.4.2
##      - fixed XSS on uploading while displaying an error - Ptirhiik
##      - take user_pending status into account while checking the quota limits - Ptirhiik
##      - check the edited attachment ids if they belong to the post/pm - Ptirhiik
##      - check filename/id information for new attachments on new post/pm - Ptirhiik
##      - moved check for empty files before database check in shadow attachments - John Bigg
##      - show all forbidden extensions
##
##   2005-12-30 - Version 2.4.1
##      - fixed doubled sql_freeresult in functions_selects.php
##      - fix extension admin panel (unable to update extensions)
##      - changed tmp dir for ftp download in safe mod from temp directory in upload directory to upload directory
##
##   2005-11-24 - Version 2.4.0a
##      - fixed a call to sql_build_array (wrong function used) in attach_mod/includes/functions_admin.php
##         this is producing a php error message within the user administration panel (editing user details)
##      - this version is a repackage, therefore the "a" at the end (nothing else changed, update path and everything else is the same)
##
##   2005-11-21 - Version 2.4.0
##      - using olympus' system of retrieving and storing values
##      - using function for sql escaping
##      - installer now checks for upload directory
##      - fixing multiple call to database in installer
##      - fixing sort_multi_array to correctly decide if sorting is based on numeric or stringr
##      - taking open basedir restriction into account if checking for image size
##      - making creation of temporary thumbnail file more unique if ftp upload is used (thanks to Douglas Hoffman)
##      - fixing viewing of no longer viewable/denied attachments for admins (alcaeus)
##      - display correct filename on download
##      - added optional language variables (Sync_topics, Sync_posts and Sync_thumbnails)
##
##   Please read the docs/changelog.txt document for a complete changelog.
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
# Here starts the Installation, follow the steps very closely.
#

#
# STEP NUMBER I: Uploading all new Files
#
# Copy/Upload all files to their respective Location
# The left side shows the location of the file you should have after decompressing the package,
# the right side shows the location the file must be copied to, it is always the phpBB Root path (where the config.php file is stored at).
# Alternatively just decompress/upload the contents within the attachment_mod folder directly to your phpBB folder.
#

#
#-----[ COPY ]------------------------------------------
#
copy attachment_mod/download.php to download.php
copy attachment_mod/uacp.php to uacp.php
copy attachment_mod/attach_rules.php to attach_rules.php
copy attachment_mod/admin/admin_attach_cp.php to admin/admin_attach_cp.php
copy attachment_mod/admin/admin_attachments.php to admin/admin_attachments.php
copy attachment_mod/admin/admin_extensions.php to admin/admin_extensions.php
copy attachment_mod/attach_mod/attachment_mod.php to attach_mod/attachment_mod.php
copy attachment_mod/attach_mod/displaying.php to attach_mod/displaying.php
copy attachment_mod/attach_mod/index.htm to attach_mod/index.htm
copy attachment_mod/attach_mod/pm_attachments.php to attach_mod/pm_attachments.php
copy attachment_mod/attach_mod/posting_attachments.php to attach_mod/posting_attachments.php
copy attachment_mod/attach_mod/includes/constants.php to attach_mod/includes/constants.php
copy attachment_mod/attach_mod/includes/functions_admin.php to attach_mod/includes/functions_admin.php
copy attachment_mod/attach_mod/includes/functions_attach.php to attach_mod/includes/functions_attach.php
copy attachment_mod/attach_mod/includes/functions_delete.php to attach_mod/includes/functions_delete.php
copy attachment_mod/attach_mod/includes/functions_filetypes.php to attach_mod/includes/functions_filetypes.php
copy attachment_mod/attach_mod/includes/functions_includes.php to attach_mod/includes/functions_includes.php
copy attachment_mod/attach_mod/includes/functions_selects.php to attach_mod/includes/functions_selects.php
copy attachment_mod/attach_mod/includes/functions_thumbs.php to attach_mod/includes/functions_thumbs.phpr
copy attachment_mod/attach_mod/includes/index.htm to attach_mod/includes/index.htm
copy attachment_mod/files/index.php to files/index.php
copy attachment_mod/images/icon_clip.gif to images/icon_clip.gif
copy attachment_mod/images/icon_disk.gif to images/icon_disk.gif
copy attachment_mod/images/icon_disk_gray.gif to images/icon_disk_gray.gif
copy attachment_mod/templates/subSilver/add_attachment_body.tpl to templates/subSilver/add_attachment_body.tpl
copy attachment_mod/templates/subSilver/posted_attachments_body.tpl to templates/subSilver/posted_attachments_body.tpl
copy attachment_mod/templates/subSilver/posting_attach_body.tpl to templates/subSilver/posting_attach_body.tpl
copy attachment_mod/templates/subSilver/posting_attach_rules.tpl to templates/subSilver/posting_attach_rules.tpl
copy attachment_mod/templates/subSilver/uacp_body.tpl to templates/subSilver/uacp_body.tpl
copy attachment_mod/templates/subSilver/viewtopic_attach_body.tpl to templates/subSilver/viewtopic_attach_body.tpl
copy attachment_mod/templates/subSilver/admin/attach_cat_body.tpl to templates/subSilver/admin/attach_cat_body.tpl
copy attachment_mod/templates/subSilver/admin/attach_cp_attachments.tpl to templates/subSilver/admin/attach_cp_attachments.tpl
copy attachment_mod/templates/subSilver/admin/attach_cp_body.tpl to templates/subSilver/admin/attach_cp_body.tpl
copy attachment_mod/templates/subSilver/admin/attach_cp_search.tpl to templates/subSilver/admin/attach_cp_search.tpl
copy attachment_mod/templates/subSilver/admin/attach_cp_user.tpl to templates/subSilver/admin/attach_cp_user.tpl
copy attachment_mod/templates/subSilver/admin/attach_extension_groups.tpl to templates/subSilver/admin/attach_extension_groups.tpl
copy attachment_mod/templates/subSilver/admin/attach_extensions.tpl to templates/subSilver/admin/attach_extensions.tpl
copy attachment_mod/templates/subSilver/admin/attach_forbidden_extensions.tpl to templates/subSilver/admin/attach_forbidden_extensions.tpl
copy attachment_mod/templates/subSilver/admin/attach_manage_body.tpl to templates/subSilver/admin/attach_manage_body.tpl
copy attachment_mod/templates/subSilver/admin/attach_quota_body.tpl to templates/subSilver/admin/attach_quota_body.tpl
copy attachment_mod/templates/subSilver/admin/attach_shadow.tpl to templates/subSilver/admin/attach_shadow.tpl
copy attachment_mod/templates/subSilver/admin/extension_groups_permissions.tpl to templates/subSilver/admin/extension_groups_permissions.tpl
copy attachment_mod/language/lang_english/lang_admin_attach.php to language/lang_english/lang_admin_attach.php
copy attachment_mod/language/lang_english/lang_faq_attach.php to language/lang_english/lang_faq_attach.php
copy attachment_mod/language/lang_english/lang_main_attach.php to language/lang_english/lang_main_attach.php
copy attachment_mod/install/install.php to install/install.php
copy attachment_mod/install/schemas/attach_mysql_basic.sql to install/schemas/attach_mysql_basic.sql
copy attachment_mod/install/schemas/attach_mysql_schema.sql to install/schemas/attach_mysql_schema.sql
copy attachment_mod/install/schemas/attach_mssql_basic.sql to install/schemas/attach_mssql_basic.sql
copy attachment_mod/install/schemas/attach_mssql_schema.sql to install/schemas/attach_mssql_schema.sql
copy attachment_mod/install/schemas/attach_postgres_basic.sql to install/schemas/attach_postgres_basic.sql
copy attachment_mod/install/schemas/attach_postgres_schema.sql to install/schemas/attach_postgres_schema.sql

#
# If you want/have another language, please visit http://www.opentools.de/ and download your
# Language if it is available. If you have a multi-lingual board you may want to upload all language files.
# Please make sure you download the Language Pack for at least Version 2.3.9 of the Attachment Mod.
#

#
# STEP NUMBER II: Installing the Attachment Mod (Database)
#
# You should have uploaded the install folder (above), which is only needed for running the database installer.
# Make sure you uploaded the schema Files (those files ending in .sql) in ASCII Mode (This is the Layout and Data for your Database):
#
#
#
# Now we want to create the tables, therefore we run the install.php file (http://www.yoursite.com/phpBB2/install/install.php)
# Please be sure to enter the correct URL (replacing www.yoursite.com with your sites URL),
# the install.php file has to be placed within the install folder. If it is not within the install folder, you WILL get errors.
#
# After the install.php file hass been executed successfully, you should remove the complete install folder.
#
#
#


#
# STEP NUMBER III: Modifying existing phpBB2 Files
#
# Now you have to alter existing phpBB2 files, read the instructions carefully and make sure you find the correct lines.
# The Line Numbers are only a hint, most of the time they are not correct, especially if you have Mods installed.r
#
#

#
#-----[ OPEN ]---------------------------------------------
#
common.php

#
#-----[ FIND ]---------------------------------------------
# around line 219
   $board_config[$row['config_name']] = $row['config_value'];
}

#
#-----[ AFTER, ADD ]--------------------------------------
# After the closing brace
include($phpbb_root_path . 'attach_mod/attachment_mod.'.$phpEx);

#
#-----[ OPEN ]---------------------------------------------
#
faq.php

#
#-----[ FIND ]---------------------------------------------
# around line 62
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/' . $lang_file . '.' . $phpEx);

#
#-----[ AFTER, ADD ]---------------------------------------
#
attach_faq_include($lang_file);

#
#-----[ OPEN ]---------------------------------------------
#
modcp.php

#
#-----[ FIND ]---------------------------------------------
# around line 358
            remove_search_post($post_id_sql);

#
#-----[ AFTER, ADD ]---------------------------------------
#
            delete_attachment(explode(', ', $post_id_sql));

#
#-----[ FIND ]---------------------------------------------
# around line 1237
            'TOPIC_ID' => $topic_id,

#
#-----[ AFTER, ADD ]---------------------------------------
#
            'TOPIC_ATTACHMENT_IMG' => topic_attachment_image($row['topic_attachment']),

#
#-----[ OPEN ]---------------------------------------------
#
posting.php

#
#-----[ FIND ]---------------------------------------------
# around line 422
$attach_sig = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['attach_sig']) ) ? TRUE : 0 ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? 0 : $userdata['user_attachsig'] );

#
#-----[ AFTER, ADD ]---------------------------------------
#
execute_posting_attachment_handling();

#
#-----[ FIND ]---------------------------------------------
# around line 580
         update_post_stats($mode, $post_data, $forum_id, $topic_id, $post_id, $user_id);
      }

#
#-----[ AFTER, ADD ]---------------------------------------
# the Line have to be added AFTER the closing brace
      $attachment_mod['posting']->insert_attachment($post_id);

#
#-----[ FIND ]---------------------------------------------
# around line 715
         'preview' => 'posting_preview.tpl')
      );

#
#-----[ AFTER, ADD ]---------------------------------------
# the Line have to be added AFTER the ');'
      $attachment_mod['posting']->preview_attachments();

#
#-----[ OPEN ]---------------------------------------------
#
privmsg.php

#
#-----[ FIND ]---------------------------------------------
# around line 131
// ----------
// Start main

#
#-----[ BEFORE, ADD ]--------------------------------------
#
execute_privmsgs_attachment_handling($mode);

#
#-----[ FIND ]---------------------------------------------
# around line 350
   //
   // Pick a folder, any folder, so long as it's one below ...

#
#-----[ BEFORE, ADD ]--------------------------------------
#
   $attachment_mod['pm']->duplicate_attachment_pm($privmsg['privmsgs_attachment'], $privmsg['privmsgs_id'], $privmsg_sent_id);

#
#-----[ FIND ]---------------------------------------------
# around line 490
   $user_id_to = $privmsg['user_id_2'];

#
#-----[ AFTER, ADD ]---------------------------------------
#
   init_display_pm_attachments($privmsg['privmsgs_attachment']);

#
#-----[ FIND ]---------------------------------------------
# around line 750
         $mark_list[] = $row['privmsgs_id'];
      }

      unset($delete_type);

#
#-----[ AFTER, ADD ]---------------------------------------
#
      $attachment_mod['pm']->delete_all_pm_attachments($mark_list);

#
#-----[ FIND ]---------------------------------------------
# around line 1319
      if ( $mode != 'edit' )
      {
         //
         // Add to the users new pm counter
         //

#
#-----[ BEFORE, ADD ]---------------------------------------
# The Line has to be added BEFORE 'if ( $mode != 'edit' )'
      $attachment_mod['pm']->insert_attachment_pm($privmsg_id);

#
#-----[ FIND ]---------------------------------------------
# around line 1629
         "preview" => 'privmsgs_preview.tpl')
      );

#
#-----[ AFTER, ADD ]---------------------------------------
# The Line have to be added AFTER the ');'
      $attachment_mod['pm']->preview_attachments();

#
#-----[ FIND ]---------------------------------------------
# around line 2171
         'DATE' => $msg_date,

#
#-----[ AFTER, ADD ]---------------------------------------
#
         'PRIVMSG_ATTACHMENTS_IMG' => privmsgs_attachment_image($privmsg_id),

#
#-----[ OPEN ]---------------------------------------------
#
viewforum.php

#
#-----[ FIND ]---------------------------------------------
# around line 370
$s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . '<br />';

#
#-----[ AFTER, ADD ]---------------------------------------
#
attach_build_auth_levels($is_auth, $s_auth_can);

#
#-----[ FIND ]---------------------------------------------
# around line 648
         'NEWEST_POST_IMG' => $newest_post_img,

#
#-----[ AFTER, ADD ]---------------------------------------
#
         'TOPIC_ATTACHMENT_IMG' => topic_attachment_image($topic_rowset[$i]['topic_attachment']),

#
#-----[ OPEN ]---------------------------------------------
#
viewtopic.php

#
#-----[ FIND ]---------------------------------------------
# around line 152
      AND f.forum_id = t.forum_id
      $order_sql";

#
#-----[ AFTER, ADD ]---------------------------------------
#
attach_setup_viewtopic_auth($order_sql, $sql);

#
#-----[ FIND ]---------------------------------------------
# around line 587
$s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . '<br />';

#
#-----[ AFTER, ADD ]---------------------------------------
#
attach_build_auth_levels($is_auth, $s_auth_can);

#
#-----[ FIND ]---------------------------------------------
# around line 817
//
// Update the topic view counter

#
#-----[ BEFORE, ADD ]---------------------------------------
#
init_display_post_attachments($forum_topic_data['topic_attachment']);

#
#-----[ FIND ]---------------------------------------------
# around line 1209
      'U_POST_ID' => $postrow[$i]['post_id'])
   );

#
#-----[ AFTER, ADD ]---------------------------------------
# The Line have to be added AFTER the ');' and BEFORE the '}' (without single quotes)
   display_post_attachments($postrow[$i]['post_id'], $postrow[$i]['post_attachment']);

#
#-----[ OPEN ]---------------------------------------------
#
admin/admin_forumauth.php

#
#-----[ FIND ]---------------------------------------------
# around line 72
$forum_auth_const = array(AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN);

#
#-----[ AFTER, ADD ]---------------------------------------
#
attach_setup_forum_auth($simple_auth_ary, $forum_auth_fields, $field_names);

#
#-----[ OPEN ]---------------------------------------------
#
admin/admin_forums.php

#
#-----[ FIND ]---------------------------------------------
# around line 52
//
// Mode setting

#
#-----[ BEFORE, ADD ]---------------------------------------
#
$forum_auth_ary['auth_attachments'] = AUTH_REG;
$forum_auth_ary['auth_download'] = AUTH_REG;

#
#-----[ OPEN ]---------------------------------------------
#
admin/admin_groups.php

#
#-----[ FIND ]---------------------------------------------
# around line 59
if ( isset($HTTP_POST_VARS['edit']) || isset($HTTP_POST_VARS['new']) )

#
#-----[ BEFORE, ADD ]---------------------------------------
#
attachment_quota_settings('group', $HTTP_POST_VARS['group_update'], $mode);

#
#-----[ OPEN ]---------------------------------------------
#
admin/admin_ug_auth.php

#
#-----[ FIND ]---------------------------------------------
# around line 91
// ---------------
// Start Functions

#
#-----[ BEFORE, ADD ]---------------------------------------
#
attach_setup_usergroup_auth($forum_auth_fields, $auth_field_match, $field_names);

#
#-----[ OPEN ]---------------------------------------------
#
admin/admin_users.php

#
#-----[ FIND ]---------------------------------------------
# around line 62
   //
   // Ok, the profile has been modified and submitted, let's update

#
#-----[ BEFORE, ADD ]---------------------------------------
#
   attachment_quota_settings('user', $HTTP_POST_VARS['submit'], $mode);

#
#-----[ OPEN ]---------------------------------------------
#
includes/auth.php

#
#-----[ FIND ]---------------------------------------------
# around line 105
      case AUTH_ATTACH:
         break;

      default:
         break;
   }

#
#-----[ AFTER, ADD ]---------------------------------------
# the Line have to be added AFTER the closing brace
   attach_setup_basic_auth($type, $auth_fields, $a_sql);

#
#-----[ OPEN ]---------------------------------------------
#
includes/functions.php

#
#-----[ FIND ]---------------------------------------------
# around line 350
   //
   // Set up style

#
#-----[ BEFORE, ADD ]---------------------------------------
#
   include_attach_lang();

#
#-----[ OPEN ]---------------------------------------------
#
includes/functions_admin.php

#
#-----[ FIND ]---------------------------------------------
# around line 184
         }
         break;
   }
   
   return true;

#
#-----[ BEFORE, ADD ]---------------------------------------
#
            attachment_sync_topic($id);

#
#-----[ OPEN ]---------------------------------------------
#
includes/prune.php

#
#-----[ FIND ]---------------------------------------------
# around line 127
         remove_search_post($sql_post);

#
#-----[ AFTER, ADD ]---------------------------------------
#
         prune_attachments($sql_post);

#
#-----[ OPEN ]---------------------------------------------
#
includes/topic_review.php

#
#-----[ FIND ]---------------------------------------------
# around line 43
         WHERE t.topic_id = $topic_id
            AND f.forum_id = t.forum_id";

#
#-----[ AFTER, ADD ]---------------------------------------
#
      $tmp = '';
      attach_setup_viewtopic_auth($tmp, $sql);

#
#-----[ FIND ]---------------------------------------------
# around line 120
   //
   // Okay, let's do the loop, yeah come on baby let's do the loop
   // and it goes like this ...

#
#-----[ BEFORE, ADD ]---------------------------------------
#
   init_display_review_attachments($is_auth);

#
#-----[ FIND ]---------------------------------------------
# around line 203
            'L_MINI_POST_ALT' => $mini_post_alt)
         );

#
#-----[ AFTER, ADD ]---------------------------------------
# the Line have to be added AFTER the ');'
         display_review_attachments($row['post_id'], $row['post_attachment'], $is_auth);

#
#-----[ OPEN ]---------------------------------------------
#
includes/usercp_viewprofile.php

#
#-----[ FIND ]---------------------------------------------
# around line 175
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

#
#-----[ AFTER, ADD ]---------------------------------------
# \r
display_upload_attach_box_limits($profiledata['user_id']);

#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/modcp_body.tpl

#
#-----[ FIND ]---------------------------------------------
# around line 27
     <td class="row1"> <span class="topictitle">{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a></span></td>

#
#-----[ IN-LINE FIND ]---------------------------------------------
# around line 27 (directly in that line)
{topicrow.TOPIC_TYPE}

#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------------
#
{topicrow.TOPIC_ATTACHMENT_IMG}

#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/posting_body.tpl

#
#-----[ FIND ]---------------------------------------------
# around line 258
<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)">

#
#-----[ REPLACE WITH ]---------------------------------------
#
<form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)" {S_FORM_ENCTYPE}>

#
#-----[ FIND ]---------------------------------------------
# around line 462
   {POLLBOX}

#
#-----[ BEFORE, ADD ]---------------------------------------
#
   {ATTACHBOX}

#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/posting_preview.tpl

#
#-----[ FIND ]---------------------------------------------
# around line 13
               <span class="postbody">{MESSAGE}</span>

#
#-----[ AFTER, ADD ]---------------------------------------
# Do NOT make one line out of this, a <!-- --> template statement has to be on one seperate line
               <!-- BEGIN postrow -->
               {ATTACHMENTS}
               <!-- END postrow -->

#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/posting_topic_review.tpl

#
#-----[ FIND ]---------------------------------------------
# around line 26
            <td colspan="2"><span class="postbody">{postrow.MESSAGE}</span></td>

#
#-----[ IN-LINE FIND ]---------------------------------------------
# around line 26 (directly in that line)
{postrow.MESSAGE}</span>

#
#-----[ IN-LINE AFTER, ADD ]---------------------------------------
#
{postrow.ATTACHMENTS}

#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/privmsgs_body.tpl

#
#-----[ FIND ]---------------------------------------------
# around line 15
<table border="0" cellspacing="0" cellpadding="0" align="center" width="100%">
  <tr>

#
#-----[ AFTER, ADD ]---------------------------------------
#
   <td align="right">
   <!-- BEGIN switch_box_size_notice -->
   <table width="175" cellspacing="1" cellpadding="2" border="0" class="bodyline">
   <tr>
      <td colspan="3" width="175" class="row1" nowrap="nowrap"><span class="gensmall">{ATTACH_BOX_SIZE_STATUS}</span></td>
   </tr>
   <tr>
      <td colspan="3" width="175" class="row2">
         <table cellspacing="0" cellpadding="1" border="0">
         <tr>
            <td bgcolor="{T_TD_COLOR2}"><img src="templates/subSilver/images/spacer.gif" width="{ATTACHBOX_LIMIT_IMG_WIDTH}" height="8" alt="{ATTACH_LIMIT_PERCENT}" /></td>
         </tr>
         </table>
      </td>
   </tr>
   <tr>
      <td width="33%" class="row1"><span class="gensmall">0%</span></td>
      <td width="34%" align="center" class="row1"><span class="gensmall">50%</span></td>
      <td width="33%" align="right" class="row1"><span class="gensmall">100%</span></td>
   </tr>
   </table>
   <!-- END switch_box_size_notice -->
   </td>

#
#-----[ FIND ]---------------------------------------------
# around line 106
     <td width="55%" valign="middle" class="{listrow.ROW_CLASS}"><span class="topictitle"> <a href="{listrow.U_READ}" class="topictitle">{listrow.SUBJECT}</a></span></td>

#
#-----[ IN-LINE FIND ]---------------------------------------------
# around line 106 (directly in that line)
<span class="topictitle"> <a href="{listrow.U_READ}" class="topictitle">{listrow.SUBJECT}

#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------------
#
{listrow.PRIVMSG_ATTACHMENTS_IMG}

#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/privmsgs_preview.tpl

#
#-----[ FIND ]---------------------------------------------
# around line 23
   <td valign="top" colspan="2" class="row1"><span class="postbody">{MESSAGE}</span></td>

#
#-----[ REPLACE WITH ]---------------------------------------
# Do NOT make one line out of this, a <!-- --> template statement has to be on one seperate line
   <td valign="top" colspan="2" class="row1"><span class="postbody">{MESSAGE}</span>
   <!-- BEGIN postrow -->
   {ATTACHMENTS}
   <!-- END postrow -->
   </td>

#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/privmsgs_read_body.tpl

#
#-----[ FIND ]---------------------------------------------
# around line 47
     <td valign="top" colspan="3" class="row1"><span class="postbody">{MESSAGE}</span></td>

#
#-----[ REPLACE WITH ]---------------------------------------
# Do NOT make one line out of this, a <!-- --> template statement has to be on one seperate line
     <td valign="top" colspan="3" class="row1"><span class="postbody">{MESSAGE}</span>
<!-- BEGIN postrow -->
   {ATTACHMENTS}
<!-- END postrow -->
     </td>

#
#-----[ FIND ]---------------------------------------------
# around line 74
      <input type="submit" name="delete" value="{L_DELETE_MSG}" class="liteoption" />

#
#-----[ AFTER, ADD ]---------------------------------------
# Do NOT make one line out of this, a <!-- --> template statement has to be on one seperate line
<!-- BEGIN switch_attachments -->
       
      <input type="submit" name="pm_delete_attach" value="{L_DELETE_ATTACHMENTS}" class="liteoption" />
<!-- END switch_attachments -->

#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/profile_view_body.tpl

#
#-----[ FIND ]---------------------------------------------
# around line 41
        <td> <b><span class="gen">{INTERESTS}</span></b></td>
      </tr>

#
#-----[ AFTER, ADD ]---------------------------------------
#
<!-- BEGIN switch_upload_limits -->
      <tr>
         <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_UPLOAD_QUOTA}:</span></td>
         <td>
            <table width="175" cellspacing="1" cellpadding="2" border="0" class="bodyline">
            <tr>
               <td colspan="3" width="100%" class="row2">
                  <table cellspacing="0" cellpadding="1" border="0">
                  <tr>
                     <td bgcolor="{T_TD_COLOR2}"><img src="templates/subSilver/images/spacer.gif" width="{UPLOAD_LIMIT_IMG_WIDTH}" height="8" alt="{UPLOAD_LIMIT_PERCENT}" /></td>
                  </tr>
                  </table>
               </td>
            </tr>
            <tr>
               <td width="33%" class="row1"><span class="gensmall">0%</span></td>
               <td width="34%" align="center" class="row1"><span class="gensmall">50%</span></td>
               <td width="33%" align="right" class="row1"><span class="gensmall">100%</span></td>
            </tr>
            </table>
            <b><span class="genmed">[{UPLOADED} / {QUOTA} / {PERCENT_FULL}]</span> </b><br />
            <span class="genmed"><a href="{U_UACP}" class="genmed">{L_UACP}</a></span></td>
         </td>
      </tr>
<!-- END switch_upload_limits -->

#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/viewforum_body.tpl

#
#-----[ FIND ]---------------------------------------------
# around line 26
     <td class="row1" width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br />

#
#-----[ IN-LINE FIND ]--------------------------------------------- n# around line 26 (directly in that line)
{topicrow.NEWEST_POST_IMG}

#
#-----[ IN-LINE AFTER, ADD ]---------------------------------------
#
{topicrow.TOPIC_ATTACHMENT_IMG}

#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/viewtopic_body.tpl

#
#-----[ FIND ]---------------------------------------------
# around line 39
            <td colspan="2"><span class="postbody">{postrow.MESSAGE}{postrow.SIGNATURE}</span><span class="gensmall">{postrow.EDITED_MESSAGE}</span></td>

#
#-----[ IN-LINE FIND ]---------------------------------------------
# around line 39 (directly in that line)
{postrow.SIGNATURE}

#
#-----[ IN-LINE BEFORE, ADD ]---------------------------------------
#
</span>{postrow.ATTACHMENTS}<span class="postbody">

#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/admin/group_edit_body.tpl

#
#-----[ FIND ]---------------------------------------------
# around line 48
   <!-- END group_edit -->

#
#-----[ BEFORE, ADD ]---------------------------------------
#
   <tr>
     <td class="row1"><span class="gen">{L_UPLOAD_QUOTA}</span></td>
     <td class="row2">{S_SELECT_UPLOAD_QUOTA}</td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_PM_QUOTA}</span></td>
     <td class="row2">{S_SELECT_PM_QUOTA}</td>
   </tr>

#
#-----[ OPEN ]---------------------------------------------
#
templates/subSilver/admin/user_edit_body.tpl

#
#-----[ FIND ]---------------------------------------------
# around line 267
     <td class="row1" colspan="2"><span class="gensmall">{L_SPECIAL_EXPLAIN}</span></td>
   </tr>

#
#-----[ AFTER, ADD ]---------------------------------------
#
   <tr>
     <td class="row1"><span class="gen">{L_UPLOAD_QUOTA}</span></td>
     <td class="row2">{S_SELECT_UPLOAD_QUOTA}</td>
   </tr>
   <tr>
     <td class="row1"><span class="gen">{L_PM_QUOTA}</span></td>
     <td class="row2">{S_SELECT_PM_QUOTA}</td>
   </tr>

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#

#
# STEP NUMBER IV: Additional Instructions
#
# The standard path for your files is 'files' and the standard upload image is images/icon_clip.gif.
# If you want to change it, go to your Administration Panel and change it under Attachments->Management.
#
# If the installer told you to make the upload path writeable, you have to chmod it to 777
# (or change the owner to you httpd-servers owner) to upload files if you do not use the ftp upload feature.
# if you only have plain ftp-access change the 'Attribute' of your files-directory to rwxrwxrwx.
#
# If you are using the ftp-upload feature, enter the relevant information in Attachments->Management.
# The password is stored in plaintext within the database. You don't have to chmod the directory (ftp-path).
#
# it would be wise if you put the provided index.php to this directory to prevent directory indexing if this
# has been enabled at your server.
#
# Before you make anything, i suggest you go to your Administration Panel->Attachments->Management and prove
# that uploading is working with the Test Upload button. ;)
#
# CONFIG CACHING
#
# If you want the Attachment Mod config table to be cached (reduce of one query on all phpBB2 Pages), you
# have to create a directory 'cache' within your phpBB2 root folder.
# This directory have to be chmodded to 777 (see above instructions on how to do this).
#

# EoM

頭像
懸壺子
系統管理員
系統管理員
文章: 29920
註冊時間: 2001-10-05 , 10:10
個人狀態: 道骨學習佛心..^^..
貼心留言: 氣候不穩
性別: 公仔
來自: 黃金故鄉
聯繫:

Re: [外掛] Attachment Mod (附加檔案) (Update 2.4.5)

文章: #49507 懸壺子
2006-12-28 , 14:34

http://phpbb-tw.net/phpbb/viewtopic.php?t=20846
語言檔UTF-8
由心靈捕手發布:

直接套用此完整包裡的語言檔.
language/lang_chinese_traditional_taiwan/lang_admin_attach.php
language/lang_chinese_traditional_taiwan/lang_faq_attach.php
language/lang_chinese_traditional_taiwan/lang_main_attach.php
http://phpbb-tw.net/phpbb/viewtopic.php?p=247052#247052
圖檔

頭像
懸壺子
系統管理員
系統管理員
文章: 29920
註冊時間: 2001-10-05 , 10:10
個人狀態: 道骨學習佛心..^^..
貼心留言: 氣候不穩
性別: 公仔
來自: 黃金故鄉
聯繫:

Re: [外掛] Attachment Mod (附加檔案) (Update 2.4.5)

文章: #49508 懸壺子
2006-12-28 , 14:41

[請教]附加檔案的外面框框,可以去掉嗎?

http://www.creativecrap.com/bbs/sutra8329.html#8329

圖檔

想改成,如您的附加檔案一樣,框框縮小,下載或檔名,皆移到下面
而不用裝 AMod Inline BBCode Addon 外掛
謝謝貓大
您沒有權限檢視這篇文章所附加的檔案。
圖檔

頭像
懸壺子
系統管理員
系統管理員
文章: 29920
註冊時間: 2001-10-05 , 10:10
個人狀態: 道骨學習佛心..^^..
貼心留言: 氣候不穩
性別: 公仔
來自: 黃金故鄉
聯繫:

Re: [外掛] Attachment Mod (附加檔案) (Update 2.4.5)

文章: #49509 懸壺子
2006-12-28 , 14:46

ethan  貓大回覆
你可以直接修改 viewtopic_attach_body.tpl
以我的例子,圖片的部份是改成這樣


代碼: 選擇全部

 <!-- BEGIN cat_images -->   
<table border=0 cellpadding=5 cellspacing=1 bgcolor="#787878">   
<tr>   
<td bgcolor="#F9F9F9">       
<img src="{postrow.attach.cat_images.IMG_SRC}" alt="{postrow.attach.cat_images.COMMENT}" border="0" /><br />       
<b>
<span class="gen">{postrow.attach.cat_images.DOWNLOAD_NAME}</span></b><br />       
{L_FILESIZE}: {postrow.attach.cat_images.FILESIZE} {postrow.attach.cat_images.SIZE_VAR} /       {postrow.attach.cat_images.L_DOWNLOADED_VIEWED}: {postrow.attach.cat_images.L_DOWNLOAD_COUNT}</span><br />   
</td>   
</tr>   
</table>   
<p>   
<!-- END cat_images -->   
<!-- BEGIN cat_thumb_images -->   
<table border=0 cellpadding=5 cellspacing=1 bgcolor="#787878">   
<tr>   
<td bgcolor="#F9F9F9">       
<a href="{postrow.attach.cat_thumb_images.IMG_SRC}" target="_blank">
<img src="{postrow.attach.cat_thumb_images.IMG_THUMB_SRC}" border="0" alt="{postrow.attach.cat_thumb_images.COMMENT}"/></a><br />     
 <b><span class="gen">{postrow.attach.cat_thumb_images.DOWNLOAD_NAME}</span></b><br />     
 <span class="genmed">{L_FILESIZE}: {postrow.attach.cat_thumb_images.FILESIZE} {postrow.attach.cat_thumb_images.SIZE_VAR} /     <span class="genmed">{postrow.attach.cat_thumb_images.L_DOWNLOADED_VIEWED}: {postrow.attach.cat_thumb_images.L_DOWNLOAD_COUNT}</span><br />   
</td>   
</tr>   
</table>   
<p>   
<!-- END cat_thumb_images -->

頭像
懸壺子
系統管理員
系統管理員
文章: 29920
註冊時間: 2001-10-05 , 10:10
個人狀態: 道骨學習佛心..^^..
貼心留言: 氣候不穩
性別: 公仔
來自: 黃金故鄉
聯繫:

Re: [外掛] Attachment Mod (附加檔案) (Update 2.4.5)

文章: #49510 懸壺子
2006-12-28 , 15:06

[修正]
1、背景改為透明,沒有框框!
<!-- BEGIN cat_images -->   <!-- END cat_images -->
和 <!-- BEGIN cat_thumb_images --> <!-- END cat_thumb_images --> 兩個裡面有
:->: 把 bgcolor="#????" 去掉    

2、把圖片的字去掉

代碼: 選擇全部

 SANY0081.JPG
附件大小: 58.75 KB / 觀看次數: 共 85 次

:->: <!-- BEGIN cat_images -->和 <!-- END cat_images --> 裏面
找到

代碼: 選擇全部

<b><span class="gen">{postrow.attach.cat_images.DOWNLOAD_NAME}</span></b><br />
          {L_FILESIZE}: {postrow.attach.cat_images.FILESIZE} {postrow.attach.cat_images.SIZE_VAR} /
          {postrow.attach.cat_images.L_DOWNLOADED_VIEWED}: {postrow.attach.cat_images.L_DOWNLOAD_COUNT}</span><br />

刪除...即不會顯示字

頭像
懸壺子
系統管理員
系統管理員
文章: 29920
註冊時間: 2001-10-05 , 10:10
個人狀態: 道骨學習佛心..^^..
貼心留言: 氣候不穩
性別: 公仔
來自: 黃金故鄉
聯繫:

Re: [外掛] Attachment Mod (附加檔案) (Update 2.4.5)

文章: #51584 懸壺子
2007-01-22 , 11:13

[修正]接上面的修正

1、每個圖上會有註解說明

修改 viewtopic_attach_body.tpl


代碼: 選擇全部

遇到    <!-- BEGIN cat_images -->
   <table border=0 cellpadding=5 cellspacing=1>
      <tr>
      <td>  


加上

代碼: 選擇全部

{postrow.attach.cat_images.COMMENT} <br />

即完成




2、滑鼠游標指向圖,會顯示

代碼: 選擇全部

SANY0081.JPG
附件大小: 58.75 KB / 觀看次數: 共 85 次



代碼: 選擇全部

<img src="{postrow.attach.cat_images.IMG_SRC}" alt="{postrow.attach.cat_images.COMMENT}"


同行中

代碼: 選擇全部

{postrow.attach.cat_images.COMMENT}


取代

代碼: 選擇全部

{postrow.attach.cat_images.DOWNLOAD_NAME}   
   {L_FILESIZE}:{postrow.attach.cat_images.FILESIZE} {postrow.attach.cat_images.SIZE_VAR} / {postrow.attach.cat_images.L_DOWNLOADED_VIEWED}: {postrow.attach.cat_images.L_DOWNLOAD_COUNT}

頭像
懸壺子
系統管理員
系統管理員
文章: 29920
註冊時間: 2001-10-05 , 10:10
個人狀態: 道骨學習佛心..^^..
貼心留言: 氣候不穩
性別: 公仔
來自: 黃金故鄉
聯繫:

[修改]預覽本文

文章: #51735 懸壺子
2007-01-23 , 9:15

主旨:[修改]預覽本文
說明:1‧因為預覽時,本文在圖的前面,簽名檔預覽部份,就取消,預覽著重本文內容!
          2‧預覽時將見不到簽名檔。

posting.php

代碼: 選擇全部

if( $attach_sig && $user_sig != '' )      
{          
$preview_message = $preview_message  . '..........';  



改為

代碼: 選擇全部

[code]if( $attach_sig && $user_sig != '' )      
{          
$preview_sig = '..........'; [/code]

'MESSAGE' => $preview_message,


遇到

代碼: 選擇全部

 'MESSAGE' => $preview_message,


改為

代碼: 選擇全部

 'MESSAGE' => $preview_message,         
[color=red][u]'SIGNATURE' => $preview_sig, [/u] [/color]


*接受貓大建議,我把上面紅色註解掉,改為:->:   // 'SIGNATURE' => $preview_sig,


posting_preview.tpl
遇到
 

代碼: 選擇全部

<table style="table-layout:fixed"><tr><td style="word-wrap:break-word">                  
 <span class="postbody">{MESSAGE}</span>              
  </td></tr></table>               
<!-- BEGIN postrow -->               
{ATTACHMENTS}               
<!-- END postrow -->


改為

代碼: 選擇全部

 <table style="table-layout:fixed"><tr><td style="word-wrap:break-word">                    
<span class="postbody">{MESSAGE}</span>                
</td></tr></table>               
<!-- BEGIN postrow -->               
{ATTACHMENTS}               
<!-- END postrow -->               
[color=red] [u]{SIGNATURE}[/u] [/color]


*接受貓大建議,我把上面紅色註解掉,改為:->:  <!--    {SIGNATURE} -->

PS:1‧多謝ethan貓大指導 30:
     2‧ posting_preview.tpl  這個程式是發文預覽部分


http://www.creativecrap.com/bbs/ftopic2904.html
圖檔

頭像
懸壺子
系統管理員
系統管理員
文章: 29920
註冊時間: 2001-10-05 , 10:10
個人狀態: 道骨學習佛心..^^..
貼心留言: 氣候不穩
性別: 公仔
來自: 黃金故鄉
聯繫:

Re: [外掛] Attachment Mod (附加檔案) (Update 2.4.5)

文章: #54527 懸壺子
2007-02-23 , 17:07

[問題] attach mod 安裝成功但無法下載檔案
http://phpbb-tw.net/phpbb/viewtopic.php?p=240357#240357

~倉木麻衣~
進入系統管理控制台/副檔名控制群組, 將下載模式從inline改成physical就可以了
因為inline模式會使用readfile來送檔案, 而physical則不會
但使用physical的話, 下載位置就會曝光  
圖檔

頭像
懸壺子
系統管理員
系統管理員
文章: 29920
註冊時間: 2001-10-05 , 10:10
個人狀態: 道骨學習佛心..^^..
貼心留言: 氣候不穩
性別: 公仔
來自: 黃金故鄉
聯繫:

Re: [外掛] Attachment Mod (附加檔案) (Update 2.4.5)

文章: #54892 懸壺子
2007-02-26 , 20:11

附加檔案突破 2MB 限制
http://phpbb-tw.net/phpbb/viewtopic.php?p=112120#112120

代碼: 選擇全部

php.ini
upload_max_filesize = 5M
max_execution_time = 900
memory_limit = 5M
圖檔

頭像
yehrussell
忍辱、精進、靜慮、般若波羅密
忍辱、精進、靜慮、般若波羅密
文章: 1113
註冊時間: 2006-01-20 , 10:19
個人狀態: 非常忙碌中!
性別: 公仔

Re: [外掛] Attachment Mod (附加檔案) (Update 2.4.5)

文章: #55451 yehrussell
2007-03-04 , 19:29

Q: 希望匿名的讀者,觀看包含附檔的文章

http://phpbb-tw.net/phpbb/viewtopic.php?t=46154
心靈捕手發布
以下的修改, 提供您參考:

代碼: 選擇全部

#
#-----[ OPEN ]-----
#
attach_mod/displaying.php

#
#-----[ FIND ]-----
#
代碼:

      // Display Notice (attachment there but not having permissions to view it)
      // Not included because this would mean template and language file changes (at this stage this is not a wise step. ;))
 

#
#-----[ AFTER, ADD ]-----
#
代碼:

      echo"注意! 您必須 <a href='login.php' class='cattitle'>[登入]</a> 後, 才可以檢視與下載附加檔案.";
 

#
#-----[ SAVE & CLOSE ]-----
#
六度梵行

頭像
懸壺子
系統管理員
系統管理員
文章: 29920
註冊時間: 2001-10-05 , 10:10
個人狀態: 道骨學習佛心..^^..
貼心留言: 氣候不穩
性別: 公仔
來自: 黃金故鄉
聯繫:

Re: [外掛] Attachment Mod (附加檔案) (Update 2.4.5)

文章: #56269 懸壺子
2007-03-14 , 19:43

http://phpbb-tw.net/phpbb/viewtopic.php?t=46154
倉木麻衣版大發佈:attachment_mod 未登入說明訊息  
說明:此功能跟vbb論壇未登入帳號時一樣顯示
圖檔

代碼: 選擇全部

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


回到「php BB2」

誰在線上

正在瀏覽這個版面的使用者:沒有註冊會員 和 2 位訪客