[教學] attach_mod_v237 成功安裝法分享
版主: 版主管理群
-
- 星球普通子民
- 文章: 2
- 註冊時間: 2005-04-01 13:06
Re: [教學] attach_mod_v237 成功安裝法分享
請問一下..安裝完成後都沒問題了(phpBB 2.0.11 正體中文完整版 + attach_mod 2.3.10 正體中文版 )
但是一但改變風格之後..點選主題..出現了
Template->make_filename(): Error - file ./templates/fiblack/viewtopic_attach_body.tpl does not exist
請問如果要改風格的話有那些是要修正的呢?
但是一但改變風格之後..點選主題..出現了
Template->make_filename(): Error - file ./templates/fiblack/viewtopic_attach_body.tpl does not exist
請問如果要改風格的話有那些是要修正的呢?
那是因為是使用預設風格安裝打包的
下載完整的附檔上傳mod將templates下的檔案上傳到你的風格\r
再修改安裝檔內所有有關*.tpl相關檔案
下載完整的附檔上傳mod將templates下的檔案上傳到你的風格\r
再修改安裝檔內所有有關*.tpl相關檔案
~§ 架站系統:WindowsXP §~
~§ 架站程式:Appserv2.4.4a §~
~§ 使用網路:giga ADSL §~
~§ 安裝程式:Apache + php + MySql §~
~§ 論壇版本: 2.0.18 §~
申明檔
1.新手發問並不是可恥的事.可恥的是沒有按照發文規則及格式還裝做沒解決你的問題是我們的錯。
2.很樂意大家pm給我.或把我加入即時通.msn,但加入並不是代表小弟已成為您的私人看護。
3.還是想不通嗎? 那可以到地下十八樓找你的答案。
[http://microduo.home99.tw/?fromuid=6331]微剋多資訊[/url]
~§ 架站程式:Appserv2.4.4a §~
~§ 使用網路:giga ADSL §~
~§ 安裝程式:Apache + php + MySql §~
~§ 論壇版本: 2.0.18 §~
申明檔
1.新手發問並不是可恥的事.可恥的是沒有按照發文規則及格式還裝做沒解決你的問題是我們的錯。
2.很樂意大家pm給我.或把我加入即時通.msn,但加入並不是代表小弟已成為您的私人看護。
3.還是想不通嗎? 那可以到地下十八樓找你的答案。
[http://microduo.home99.tw/?fromuid=6331]微剋多資訊[/url]
Re: [教學] attach_mod_v237 成功安裝法分享
ansonku 寫:看到很多人都在安裝 attach_mod_v237
但好像很多人都會發生問題
所以我在這簡單講一下安裝的方法
剛剛試成功 不過過程有點長 請大家要有耐心唷\r
首先請先下載 attach_mod_v237 及中文包
http://www.opentools.de/board/viewtopic.php?t=262
中文包
http://www.opentools.de/board/viewtopic.php?t=1449
之後請參考一下這篇
http://phpbb-tw.net/phpbb/viewtopic.php ... chment+mod
在這麼先說明一下 因為要等等要修改一些檔案
所以我建議新手使用Ultraedit這套編輯器\r
這樣比較方便
下載點http://www.softking.com.tw/soft/clickco ... fid3=17607
\r
加下來開始安裝attach_mod_v237 吧\r
首先把你下載的attach_mod_v237.rar解壓縮到任一個暫存目錄
假設在這我們叫attach_mod
之後將lang_chinese_traditional_taiwan_amod_v235.rar中文包解壓縮至\r
attach_mod中的root\language\lang_chinese_traditional_taiwan中\r
之後把attach_mod
oot這目錄下的資料都複製到你 phpbb2 的目錄中\r
理論上 這些檔案都是你本來沒有的 所以不用怕重複或蓋掉你之前裝的mod
之後執行phpbb2\install\mod_table_inst.php
你應該可以成功執行的 除非你的 mysql 有問題
之後準備修改那些煩人的檔案吧\r
.....ㄎ.....寫ㄌ快40分鐘代碼: 選擇全部
# #-----[開啟]--------------------------------------------- # common.php # #-----[ 尋找 ]--------------------------------------------- # 大約在第 181 行 $board_config[$row['config_name']] = $row['config_value']; } # #-----[ 在上面那行的大括號 } 之後增加這些碼...注意這邊容易出錯 是加在大括號後 ]-------------------------------------- include($phpbb_root_path . 'attach_mod/attachment_mod.'.$phpEx); # #-----[ 開啟 ]--------------------------------------------- # faq.php # #-----[ 尋找 ]--------------------------------------------- # 約在第 59 行 include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/' . $lang_file . '.' . $phpEx); # #-----[ 在上面那行的下面加上這段 ]--------------------------------------- # attach_faq_include($lang_file); # #-----[ 開啟 ]--------------------------------------------- # modcp.php # #-----[ 尋找 ]--------------------------------------------- # 約在第 321 行 remove_search_post($post_id_sql); # #-----[ 在這行後面增加此行 ]--------------------------------------- # delete_attachment(explode(', ', $post_id_sql)); # #-----[ 尋找 ]--------------------------------------------- # 約在第 1143 行 'TOPIC_ID' => $topic_id, # #-----[ 在這行的下面增加 ]--------------------------------------- # 'TOPIC_ATTACHMENT_IMG' => topic_attachment_image($row['topic_attachment']), # #-----[ 開啟 ]--------------------------------------------- # posting.php # #-----[ 尋找 ]--------------------------------------------- # 約在第 427 行 $attach_sig = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['attach_sig']) ) ? TRUE : 0 ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? 0 : $userdata['user_attachsig'] ); # #-----[ 在上面這行的下面加上 ]--------------------------------------- # execute_posting_attachment_handling(); # #-----[ 尋找 ]--------------------------------------------- # 約在第 584 行 user_notification($mode, $post_data, $post_info['topic_title'], $forum_id, $topic_id, $post_id, $notify_user); } # #-----[ 在上面那行的下面增加 ]--------------------------------------- # ps....是在大括號後唷....別弄錯了 $attachment_mod['posting']->insert_attachment($post_id); # #-----[ 尋找 ]--------------------------------------------- # 約在第 713 行 'preview' => 'posting_preview.tpl') ); # #-----[ 在上面那行的下面增加 ]--------------------------------------- # ps....是加在 ); 的下面喔 別搞錯了 $attachment_mod['posting']->preview_attachments(); # #-----[ 開啟 ]--------------------------------------------- # privmsg.php # #-----[ 尋找 ]--------------------------------------------- # 約在第 139 行 // ---------- // Start main # #-----[ 在上面那行之前增加 ]-------------------------------------- # execute_privmsgs_attachment_handling($mode); # #-----[ 尋找 ]--------------------------------------------- # 約在第 358 行 // // Pick a folder, any folder, so long as it's one below ... # #-----[ 在上面這段的上面加入 ]-------------------------------------- # $attachment_mod['pm']->duplicate_attachment_pm($privmsg['privmsgs_attachment'], $privmsg['privmsgs_id'], $privmsg_sent_id); # #-----[ 尋找 ]--------------------------------------------- # 約在 498 行 $user_id_to = $privmsg['user_id_2']; # #-----[ 在上面那行的下面增加 ]--------------------------------------- # init_display_pm_attachments($privmsg['privmsgs_attachment']); # #-----[ 尋找 ]--------------------------------------------- # 約在第 757 行 unset($delete_type); } # #-----[ 在上面那段之後增加 ]--------------------------------------- # ps....是在大括號之後增加唷 別搞錯\r $attachment_mod['pm']->delete_all_pm_attachments($mark_list); # #-----[ 尋找 ]--------------------------------------------- # 約在第 310 行 if ( $mode != 'edit' ) { // // Add to the users new pm counter // # #-----[ 在上面這段的上面增加 ]--------------------------------------- # ps....也就是 if ( $mode != 'edit' )' 的上面啦\r $attachment_mod['pm']->insert_attachment_pm($privmsg_id); # #-----[ 尋找 ]--------------------------------------------- # 約在第 1611 行 "preview" => 'privmsgs_preview.tpl') ); # #-----[ 在上面這段的後面增加]--------------------------------------- # ps...是在 ); 之後唷 不搞錯\r $attachment_mod['pm']->preview_attachments(); # #-----[ 尋找 ]--------------------------------------------- # 約在第 2148 行 'DATE' => $msg_date, # #-----[ 在上面那行的下面增加 ]-------------------------------------- # 'PRIVMSG_ATTACHMENTS_IMG' => privmsgs_attachment_image($privmsg_id), # #-----[ 開啟 ]--------------------------------------------- # viewforum.php # #-----[ 尋找 ]--------------------------------------------- # 約在 370 行 $s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . '<br />'; # #-----[ 在上面那行的下面增加]--------------------------------------- # attach_build_auth_levels($is_auth, $s_auth_can); # #-----[ 尋找 ]--------------------------------------------- 'NEWEST_POST_IMG' => $newest_post_img, # #-----[ 在上面那行的下面增加]--------------------------------------- # 'TOPIC_ATTACHMENT_IMG' => topic_attachment_image($topic_rowset[$i]['topic_attachment']), # #-----[ 開啟 ]--------------------------------------------- # viewtopic.php # #-----[ 尋找 ]--------------------------------------------- AND f.forum_id = t.forum_id $order_sql"; # #-----[ 在下面增加]--------------------------------------- # attach_setup_viewtopic_auth($order_sql, $sql); # #-----[尋找]--------------------------------------------- $s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . '<br />'; # #-----[ 在下面增加]--------------------------------------- # attach_build_auth_levels($is_auth, $s_auth_can); # #-----[ 尋找 ]--------------------------------------------- // // Update the topic view counter # #-----[ 在之前增加 --------------------------------------- # init_display_post_attachments($forum_topic_data['topic_attachment']); # #-----[ 尋找 ]--------------------------------------------- # around line 1205 'U_POST_ID' => $postrow[$i]['post_id']) ); # #-----[ 之後增加]--------------------------------------- # ps...是在 ); 的下面\r display_post_attachments($postrow[$i]['post_id'], $postrow[$i]['post_attachment']); # #-----[開啟]--------------------------------------------- # admin/admin_forumauth.php # #-----[ 尋找 ]--------------------------------------------- $forum_auth_const = array(AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN); # #-----[ 之後增加]--------------------------------------- # attach_setup_forum_auth($simple_auth_ary, $forum_auth_fields, $field_names); # #-----[ 開啟 ]--------------------------------------------- # admin/admin_forums.php # #-----[ 尋找 ]--------------------------------------------- # around line 52 // // Mode setting # #-----[ 之前增加]--------------------------------------- # $forum_auth_ary['auth_attachments'] = AUTH_REG; $forum_auth_ary['auth_download'] = AUTH_REG; # #-----[ 開啟 ]--------------------------------------------- # admin/admin_groups.php # #-----[ 尋找 ]--------------------------------------------- if ( isset($HTTP_POST_VARS['edit']) || isset($HTTP_POST_VARS['new']) ) # #-----[ 之前增加 ]--------------------------------------- # attachment_quota_settings('group', $HTTP_POST_VARS['group_update'], $mode); # #-----[ 開啟]--------------------------------------------- # admin/admin_ug_auth.php # #-----[ 尋找 ]--------------------------------------------- // --------------- // Start Functions # #-----[ 之前增加 ]--------------------------------------- # attach_setup_usergroup_auth($forum_auth_fields, $auth_field_match, $field_names); # #-----[ 開啟 ]--------------------------------------------- # admin/admin_users.php # #-----[ 尋找 ]--------------------------------------------- // // Ok, the profile has been modified and submitted, let's update # #-----[ 之前增加]--------------------------------------- # attachment_quota_settings('user', $HTTP_POST_VARS['submit'], $mode); # #-----[開啟]--------------------------------------------- # includes/auth.php # #-----[ 尋找 ]--------------------------------------------- case AUTH_ATTACH: break; default: break; } # #-----[ 之後增加 ]--------------------------------------- # ps...是在 } 大括號之後唷 別搞錯\r attach_setup_basic_auth($type, $auth_fields, $a_sql); # #-----[ 開啟]--------------------------------------------- # includes/functions.php # #-----[ 尋找]--------------------------------------------- // // Set up style // # #-----[ 之前增加 ]--------------------------------------- # include_attach_lang(); # #-----[ 開啟]--------------------------------------------- # includes/functions_admin.php # #-----[ 尋找]--------------------------------------------- message_die(GENERAL_ERROR, 'Could not update topic', '', __LINE__, __FILE__, $sql); } } # #-----[ AFTER, ADD ]--------------------------------------- # ps//是在第二個大括號之後但在break;之前增加 別搞錯\r attachment_sync_topic($id); # #-----[ 開啟]--------------------------------------------- # includes/prune.php # #-----[ 尋找]--------------------------------------------- remove_search_post($sql_post); # #-----[ 之後增加]--------------------------------------- # prune_attachments($sql_post); # #-----[ 開啟]--------------------------------------------- # includes/topic_review.php # #-----[ 尋找]--------------------------------------------- WHERE t.topic_id = $topic_id AND f.forum_id = t.forum_id"; # #-----[ 之後增加]--------------------------------------- # $tmp = ''; attach_setup_viewtopic_auth($tmp, $sql); # #-----[ 開啟]--------------------------------------------- // // Okay, let's do the loop, yeah come on baby let's do the loop // and it goes like this ... # #-----[ 之前增加]--------------------------------------- # init_display_review_attachments($is_auth); # #-----[ 尋找]--------------------------------------------- 'L_MINI_POST_ALT' => $mini_post_alt) ); # #-----[ AFTER, ADD ]--------------------------------------- # ps...是在 ); 之後增加此行 display_review_attachments($row['post_id'], $row['post_attachment'], $is_auth); # #-----[ 開啟]--------------------------------------------- # includes/usercp_viewprofile.php # #-----[ 尋找 ]--------------------------------------------- include($phpbb_root_path . 'includes/page_header.'.$phpEx); # #-----[ 之後增加]--------------------------------------- # display_upload_attach_box_limits($profiledata['user_id']); # #-----[ 開啟]--------------------------------------------- # templates/subSilver/modcp_body.tpl # #-----[ 尋找]--------------------------------------------- {topicrow.TOPIC_TYPE} # #-----[ 直接在{topicrow.TOPIC_TYPE} 的後面增加]---------------------------- # ps....不用換行.... {topicrow.TOPIC_ATTACHMENT_IMG} # #-----[ 開啟]--------------------------------------------- # templates/subSilver/posting_body.tpl # #-----[ 尋找]--------------------------------------------- <form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)"> # #-----[ 取代成 ]--------------------------------------- # <form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)" {S_FORM_ENCTYPE}> # #-----[ 尋找]--------------------------------------------- {POLLBOX} # #-----[ 之前增加 ]--------------------------------------- # {ATTACHBOX} # #-----[ 開啟]--------------------------------------------- # templates/subSilver/posting_preview.tpl # #-----[ 尋找]--------------------------------------------- <span class="postbody">{MESSAGE}</span> # #-----[ 之後增加]--------------------------------------- \n# <!-- BEGIN postrow --> {ATTACHMENTS} <!-- END postrow --> # #-----[ 開啟]--------------------------------------------- # templates/subSilver/posting_topic_review.tpl # #-----[ 尋找]--------------------------------------------- {postrow.MESSAGE}</span> # #-----[ 之後增加]--------------------------------------- # ps....直接加到{postrow.MESSAGE}</span>的後面 不用換行 {postrow.ATTACHMENTS} # #-----[ 開啟]--------------------------------------------- # templates/subSilver/privmsgs_body.tpl # #-----[ 尋找 ]--------------------------------------------- <table border="0" cellspacing="0" cellpadding="0" align="center" width="100%"> <tr> # #-----[ 之後增加]--------------------------------------- # <td align="right"> <!-- BEGIN switch_box_size_notice -->\r <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> # #-----[ 尋找]--------------------------------------------- <span class="topictitle"> <a href="{listrow.U_READ}" class="topictitle">{listrow.SUBJECT} # #-----[ 之前增加]--------------------------------------- # {listrow.PRIVMSG_ATTACHMENTS_IMG} # #-----[ 開啟]--------------------------------------------- # templates/subSilver/privmsgs_preview.tpl # #-----[ 尋找]--------------------------------------------- <td valign="top" colspan="2" class="row1"><span class="postbody">{MESSAGE}</span></td> # #-----[ 替換成]--------------------------------------- # <td valign="top" colspan="2" class="row1"><span class="postbody">{MESSAGE}</span> <!-- BEGIN postrow --> {ATTACHMENTS} <!-- END postrow --> </td> # #-----[ 開啟]--------------------------------------------- # templates/subSilver/privmsgs_read_body.tpl # #-----[ 尋找]--------------------------------------------- <td valign="top" colspan="3" class="row1"><span class="postbody">{MESSAGE}</span></td> # #-----[ 替換成]--------------------------------------- # <td valign="top" colspan="3" class="row1"><span class="postbody">{MESSAGE}</span> <!-- BEGIN postrow --> {ATTACHMENTS} <!-- END postrow --> </td> # #-----[ 尋找]--------------------------------------------- <input type="submit" name="delete" value="{L_DELETE_MSG}" class="liteoption" /> # #-----[ 之後增加]--------------------------------------- # <!-- BEGIN switch_attachments --> <input type="submit" name="pm_delete_attach" value="{L_DELETE_ATTACHMENTS}" class="liteoption" /> <!-- END switch_attachments --> # #-----[ 開啟]--------------------------------------------- # templates/subSilver/profile_view_body.tpl # #-----[ 尋找]--------------------------------------------- <td> <b><span class="gen">{INTERESTS}</span></b></td> </tr> # #-----[ 之後增加]--------------------------------------- # <!-- 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 --> # #-----[ 開啟]--------------------------------------------- # templates/subSilver/viewforum_body.tpl # #-----[ 尋找 ]--------------------------------------------- {topicrow.NEWEST_POST_IMG} # #-----[ 之後增加]--------------------------------------- # ps....直接加在{topicrow.NEWEST_POST_IMG}的後面 不用換行 {topicrow.TOPIC_ATTACHMENT_IMG} # #-----[ 開啟]--------------------------------------------- # templates/subSilver/viewtopic_body.tpl # #-----[ 尋找]--------------------------------------------- {postrow.SIGNATURE} # #-----[ 之前增加]--------------------------------------- # ps...直接加在{postrow.SIGNATURE}的前面 不用在上一行加唷\r </span>{postrow.ATTACHMENTS}<span class="postbody"> # #-----[ 開啟]--------------------------------------------- # templates/subSilver/admin/group_edit_body.tpl # #-----[ 尋找]--------------------------------------------- <!-- END group_edit --> # #-----[ 之前增加]--------------------------------------- # <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> # #-----[ 開啟]--------------------------------------------- # templates/subSilver/admin/user_edit_body.tpl # #-----[ 尋找]--------------------------------------------- <td class="row1" colspan="2"><span class="gensmall">{L_SPECIAL_EXPLAIN}</span></td> </tr> # #-----[ 之後增加]--------------------------------------- # <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> # #-----[ 儲存你剛剛修改過的檔案]------------------------------------------ #
手快抽筋了
我再比較重要易出錯的地方都加上 ps....
新手安裝時請注意
另外 請安裝時裝備份唷\r
以免不小心掛點還可以還原
大概就是降啦\r
希望如果有人也安裝成功 請上來po一下
證明我沒虎爛 呵呵
我成功ㄌ.. 修改ㄌ3個小時.. 快死ㄌ... @@"
架設主機作業系統:Windows Server 2003
上網方式:LOCAL NET
安裝的程式:IIS6.0 + php5.1.4 + MySQL 5.0.22 + phpMyAdmin 2.8.1
版本:PHPBB 2.0.21
上網方式:LOCAL NET
安裝的程式:IIS6.0 + php5.1.4 + MySQL 5.0.22 + phpMyAdmin 2.8.1
版本:PHPBB 2.0.21
Re: [問題]爲何我不能上傳wmv檔案
版面要設成可以上傳該檔案群組calvin168 寫:爲何我不能上傳wmv檔案,
只是一個700Kb的檔案,
看過管理副檔名有wmv在副檔名column內,
還有,加入了exe在副檔名column內,
也不能上傳exe,
但其他一些檔案是正常的呢?
Re: [教學] attach_mod_v237 成功安裝法分享
ansonku 寫:看到很多人都在安裝 attach_mod_v237
但好像很多人都會發生問題
所以我在這簡單講一下安裝的方法
剛剛試成功 不過過程有點長 請大家要有耐心唷\r
首先請先下載 attach_mod_v237 及中文包
http://www.opentools.de/board/viewtopic.php?t=262
中文包
http://www.opentools.de/board/viewtopic.php?t=1449
之後請參考一下這篇
http://phpbb-tw.net/phpbb/viewtopic.php ... chment+mod
在這麼先說明一下 因為要等等要修改一些檔案
所以我建議新手使用Ultraedit這套編輯器\r
這樣比較方便
下載點http://www.softking.com.tw/soft/clickco ... fid3=17607
加下來開始安裝attach_mod_v237 吧\r
首先把你下載的attach_mod_v237.rar解壓縮到任一個暫存目錄
假設在這我們叫attach_mod
之後將lang_chinese_traditional_taiwan_amod_v235.rar中文包解壓縮至\r
attach_mod中的root\language\lang_chinese_traditional_taiwan中\r
之後把attach_mod
oot這目錄下的資料都複製到你 phpbb2 的目錄中\r
理論上 這些檔案都是你本來沒有的 所以不用怕重複或蓋掉你之前裝的mod
之後執行phpbb2\install\mod_table_inst.php
你應該可以成功執行的 除非你的 mysql 有問題
之後準備修改那些煩人的檔案吧\r
.....ㄎ.....寫ㄌ快40分鐘代碼: 選擇全部
# #-----[開啟]--------------------------------------------- # common.php # #-----[ 尋找 ]--------------------------------------------- # 大約在第 181 行 $board_config[$row['config_name']] = $row['config_value']; } # #-----[ 在上面那行的大括號 } 之後增加這些碼...注意這邊容易出錯 是加在大括號後 ]-------------------------------------- include($phpbb_root_path . 'attach_mod/attachment_mod.'.$phpEx); # #-----[ 開啟 ]--------------------------------------------- # faq.php # #-----[ 尋找 ]--------------------------------------------- # 約在第 59 行 include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/' . $lang_file . '.' . $phpEx); # #-----[ 在上面那行的下面加上這段 ]--------------------------------------- # attach_faq_include($lang_file); # #-----[ 開啟 ]--------------------------------------------- # modcp.php # #-----[ 尋找 ]--------------------------------------------- # 約在第 321 行 remove_search_post($post_id_sql); # #-----[ 在這行後面增加此行 ]--------------------------------------- # delete_attachment(explode(', ', $post_id_sql)); # #-----[ 尋找 ]--------------------------------------------- # 約在第 1143 行 'TOPIC_ID' => $topic_id, # #-----[ 在這行的下面增加 ]--------------------------------------- # 'TOPIC_ATTACHMENT_IMG' => topic_attachment_image($row['topic_attachment']), # #-----[ 開啟 ]--------------------------------------------- # posting.php # #-----[ 尋找 ]--------------------------------------------- # 約在第 427 行 $attach_sig = ( $submit || $refresh ) ? ( ( !empty($HTTP_POST_VARS['attach_sig']) ) ? TRUE : 0 ) : ( ( $userdata['user_id'] == ANONYMOUS ) ? 0 : $userdata['user_attachsig'] ); # #-----[ 在上面這行的下面加上 ]--------------------------------------- # execute_posting_attachment_handling(); # #-----[ 尋找 ]--------------------------------------------- # 約在第 584 行 user_notification($mode, $post_data, $post_info['topic_title'], $forum_id, $topic_id, $post_id, $notify_user); } # #-----[ 在上面那行的下面增加 ]--------------------------------------- # ps....是在大括號後唷....別弄錯了 $attachment_mod['posting']->insert_attachment($post_id); # #-----[ 尋找 ]--------------------------------------------- # 約在第 713 行 'preview' => 'posting_preview.tpl') ); # #-----[ 在上面那行的下面增加 ]--------------------------------------- # ps....是加在 ); 的下面喔 別搞錯了 $attachment_mod['posting']->preview_attachments(); # #-----[ 開啟 ]--------------------------------------------- # privmsg.php # #-----[ 尋找 ]--------------------------------------------- # 約在第 139 行 // ---------- // Start main # #-----[ 在上面那行之前增加 ]-------------------------------------- # execute_privmsgs_attachment_handling($mode); # #-----[ 尋找 ]--------------------------------------------- # 約在第 358 行 // // Pick a folder, any folder, so long as it's one below ... # #-----[ 在上面這段的上面加入 ]-------------------------------------- # $attachment_mod['pm']->duplicate_attachment_pm($privmsg['privmsgs_attachment'], $privmsg['privmsgs_id'], $privmsg_sent_id); # #-----[ 尋找 ]--------------------------------------------- # 約在 498 行 $user_id_to = $privmsg['user_id_2']; # #-----[ 在上面那行的下面增加 ]--------------------------------------- # init_display_pm_attachments($privmsg['privmsgs_attachment']); # #-----[ 尋找 ]--------------------------------------------- # 約在第 757 行 unset($delete_type); } # #-----[ 在上面那段之後增加 ]--------------------------------------- # ps....是在大括號之後增加唷 別搞錯\r $attachment_mod['pm']->delete_all_pm_attachments($mark_list); # #-----[ 尋找 ]--------------------------------------------- # 約在第 310 行 if ( $mode != 'edit' ) { // // Add to the users new pm counter // # #-----[ 在上面這段的上面增加 ]--------------------------------------- # ps....也就是 if ( $mode != 'edit' )' 的上面啦\r $attachment_mod['pm']->insert_attachment_pm($privmsg_id); # #-----[ 尋找 ]--------------------------------------------- # 約在第 1611 行 "preview" => 'privmsgs_preview.tpl') ); # #-----[ 在上面這段的後面增加]--------------------------------------- # ps...是在 ); 之後唷 不搞錯\r $attachment_mod['pm']->preview_attachments(); # #-----[ 尋找 ]--------------------------------------------- # 約在第 2148 行 'DATE' => $msg_date, # #-----[ 在上面那行的下面增加 ]-------------------------------------- # 'PRIVMSG_ATTACHMENTS_IMG' => privmsgs_attachment_image($privmsg_id), # #-----[ 開啟 ]--------------------------------------------- # viewforum.php # #-----[ 尋找 ]--------------------------------------------- # 約在 370 行 $s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . '<br />'; # #-----[ 在上面那行的下面增加]--------------------------------------- # attach_build_auth_levels($is_auth, $s_auth_can); # #-----[ 尋找 ]--------------------------------------------- 'NEWEST_POST_IMG' => $newest_post_img, # #-----[ 在上面那行的下面增加]--------------------------------------- # 'TOPIC_ATTACHMENT_IMG' => topic_attachment_image($topic_rowset[$i]['topic_attachment']), # #-----[ 開啟 ]--------------------------------------------- # viewtopic.php # #-----[ 尋找 ]--------------------------------------------- AND f.forum_id = t.forum_id $order_sql"; # #-----[ 在下面增加]--------------------------------------- # attach_setup_viewtopic_auth($order_sql, $sql); # #-----[尋找]--------------------------------------------- $s_auth_can .= ( ( $is_auth['auth_vote'] ) ? $lang['Rules_vote_can'] : $lang['Rules_vote_cannot'] ) . '<br />'; # #-----[ 在下面增加]--------------------------------------- # attach_build_auth_levels($is_auth, $s_auth_can); # \r #-----[ 尋找 ]--------------------------------------------- // // Update the topic view counter # #-----[ 在之前增加 --------------------------------------- # init_display_post_attachments($forum_topic_data['topic_attachment']); # #-----[ 尋找 ]--------------------------------------------- # around line 1205 'U_POST_ID' => $postrow[$i]['post_id']) ); # #-----[ 之後增加]--------------------------------------- # ps...是在 ); 的下面\r display_post_attachments($postrow[$i]['post_id'], $postrow[$i]['post_attachment']); # #-----[開啟]--------------------------------------------- # admin/admin_forumauth.php # #-----[ 尋找 ]--------------------------------------------- $forum_auth_const = array(AUTH_ALL, AUTH_REG, AUTH_ACL, AUTH_MOD, AUTH_ADMIN); # #-----[ 之後增加]--------------------------------------- # attach_setup_forum_auth($simple_auth_ary, $forum_auth_fields, $field_names); # #-----[ 開啟 ]--------------------------------------------- # admin/admin_forums.php # #-----[ 尋找 ]--------------------------------------------- # around line 52 // // Mode setting # #-----[ 之前增加]--------------------------------------- # $forum_auth_ary['auth_attachments'] = AUTH_REG; $forum_auth_ary['auth_download'] = AUTH_REG; # #-----[ 開啟 ]--------------------------------------------- # admin/admin_groups.php # #-----[ 尋找 ]--------------------------------------------- if ( isset($HTTP_POST_VARS['edit']) || isset($HTTP_POST_VARS['new']) ) # #-----[ 之前增加 ]--------------------------------------- # attachment_quota_settings('group', $HTTP_POST_VARS['group_update'], $mode); # #-----[ 開啟]--------------------------------------------- # admin/admin_ug_auth.php # #-----[ 尋找 ]--------------------------------------------- // --------------- // Start Functions # #-----[ 之前增加 ]--------------------------------------- # attach_setup_usergroup_auth($forum_auth_fields, $auth_field_match, $field_names); # #-----[ 開啟 ]--------------------------------------------- # admin/admin_users.php # #-----[ 尋找 ]--------------------------------------------- // // Ok, the profile has been modified and submitted, let's update # #-----[ 之前增加]--------------------------------------- # attachment_quota_settings('user', $HTTP_POST_VARS['submit'], $mode); # #-----[開啟]--------------------------------------------- # includes/auth.php # #-----[ 尋找 ]--------------------------------------------- case AUTH_ATTACH: break; default: break; } # #-----[ 之後增加 ]--------------------------------------- # ps...是在 } 大括號之後唷 別搞錯\r attach_setup_basic_auth($type, $auth_fields, $a_sql); # #-----[ 開啟]--------------------------------------------- # includes/functions.php # #-----[ 尋找]--------------------------------------------- // // Set up style // # #-----[ 之前增加 ]--------------------------------------- # include_attach_lang(); # #-----[ 開啟]--------------------------------------------- # includes/functions_admin.php # #-----[ 尋找]--------------------------------------------- message_die(GENERAL_ERROR, 'Could not update topic', '', __LINE__, __FILE__, $sql); } } # #-----[ AFTER, ADD ]--------------------------------------- # ps//是在第二個大括號之後但在break;之前增加 別搞錯\r attachment_sync_topic($id); # #-----[ 開啟]--------------------------------------------- # includes/prune.php # #-----[ 尋找]--------------------------------------------- remove_search_post($sql_post); # #-----[ 之後增加]--------------------------------------- # prune_attachments($sql_post); # #-----[ 開啟]--------------------------------------------- # includes/topic_review.php # #-----[ 尋找]--------------------------------------------- WHERE t.topic_id = $topic_id AND f.forum_id = t.forum_id"; # #-----[ 之後增加]--------------------------------------- # $tmp = ''; attach_setup_viewtopic_auth($tmp, $sql); # #-----[ 開啟]--------------------------------------------- // // Okay, let's do the loop, yeah come on baby let's do the loop // and it goes like this ... # #-----[ 之前增加]--------------------------------------- # init_display_review_attachments($is_auth); # #-----[ 尋找]--------------------------------------------- 'L_MINI_POST_ALT' => $mini_post_alt) ); # #-----[ AFTER, ADD ]--------------------------------------- # ps...是在 ); 之後增加此行 display_review_attachments($row['post_id'], $row['post_attachment'], $is_auth); # #-----[ 開啟]--------------------------------------------- # includes/usercp_viewprofile.php # #-----[ 尋找 ]--------------------------------------------- include($phpbb_root_path . 'includes/page_header.'.$phpEx); # #-----[ 之後增加]--------------------------------------- # display_upload_attach_box_limits($profiledata['user_id']); # #-----[ 開啟]--------------------------------------------- # templates/subSilver/modcp_body.tpl # #-----[ 尋找]--------------------------------------------- {topicrow.TOPIC_TYPE} # #-----[ 直接在{topicrow.TOPIC_TYPE} 的後面增加]---------------------------- # ps....不用換行.... {topicrow.TOPIC_ATTACHMENT_IMG} # #-----[ 開啟]--------------------------------------------- # templates/subSilver/posting_body.tpl # #-----[ 尋找]--------------------------------------------- <form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)"> # #-----[ 取代成 ]--------------------------------------- # <form action="{S_POST_ACTION}" method="post" name="post" onsubmit="return checkForm(this)" {S_FORM_ENCTYPE}> # #-----[ 尋找]--------------------------------------------- {POLLBOX} # #-----[ 之前增加 ]--------------------------------------- # {ATTACHBOX} # #-----[ 開啟]--------------------------------------------- # templates/subSilver/posting_preview.tpl # #-----[ 尋找]--------------------------------------------- <span class="postbody">{MESSAGE}</span> # #-----[ 之後增加]--------------------------------------- # <!-- BEGIN postrow --> {ATTACHMENTS} <!-- END postrow --> # #-----[ 開啟]--------------------------------------------- # templates/subSilver/posting_topic_review.tpl # #-----[ 尋找]--------------------------------------------- {postrow.MESSAGE}</span> # #-----[ 之後增加]--------------------------------------- # ps....直接加到{postrow.MESSAGE}</span>的後面 不用換行 {postrow.ATTACHMENTS} # #-----[ 開啟]--------------------------------------------- # templates/subSilver/privmsgs_body.tpl # #-----[ 尋找 ]--------------------------------------------- <table border="0" cellspacing="0" cellpadding="0" align="center" width="100%"> <tr> # #-----[ 之後增加]--------------------------------------- # <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> # #-----[ 尋找]--------------------------------------------- <span class="topictitle"> <a href="{listrow.U_READ}" class="topictitle">{listrow.SUBJECT} # #-----[ 之前增加]--------------------------------------- # {listrow.PRIVMSG_ATTACHMENTS_IMG} # #-----[ 開啟]--------------------------------------------- # templates/subSilver/privmsgs_preview.tpl # #-----[ 尋找]--------------------------------------------- <td valign="top" colspan="2" class="row1"><span class="postbody">{MESSAGE}</span></td> # #-----[ 替換成]--------------------------------------- # <td valign="top" colspan="2" class="row1"><span class="postbody">{MESSAGE}</span> <!-- BEGIN postrow --> {ATTACHMENTS} <!-- END postrow --> </td> # #-----[ 開啟]--------------------------------------------- # templates/subSilver/privmsgs_read_body.tpl # #-----[ 尋找]--------------------------------------------- <td valign="top" colspan="3" class="row1"><span class="postbody">{MESSAGE}</span></td> # #-----[ 替換成]--------------------------------------- # <td valign="top" colspan="3" class="row1"><span class="postbody">{MESSAGE}</span> <!-- BEGIN postrow --> {ATTACHMENTS} <!-- END postrow --> </td> # #-----[ 尋找]--------------------------------------------- <input type="submit" name="delete" value="{L_DELETE_MSG}" class="liteoption" /> # #-----[ 之後增加]--------------------------------------- # <!-- BEGIN switch_attachments --> <input type="submit" name="pm_delete_attach" value="{L_DELETE_ATTACHMENTS}" class="liteoption" /> <!-- END switch_attachments --> # #-----[ 開啟]--------------------------------------------- # templates/subSilver/profile_view_body.tpl # #-----[ 尋找]--------------------------------------------- <td> <b><span class="gen">{INTERESTS}</span></b></td> </tr> # #-----[ 之後增加]--------------------------------------- # <!-- 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 --> # #-----[ 開啟]--------------------------------------------- # templates/subSilver/viewforum_body.tpl # #-----[ 尋找 ]--------------------------------------------- {topicrow.NEWEST_POST_IMG} # #-----[ 之後增加]--------------------------------------- # ps....直接加在{topicrow.NEWEST_POST_IMG}的後面 不用換行 {topicrow.TOPIC_ATTACHMENT_IMG} # #-----[ 開啟]--------------------------------------------- # templates/subSilver/viewtopic_body.tpl # #-----[ 尋找]--------------------------------------------- {postrow.SIGNATURE} # #-----[ 之前增加]--------------------------------------- # ps...直接加在{postrow.SIGNATURE}的前面 不用在上一行加唷\r </span>{postrow.ATTACHMENTS}<span class="postbody"> # #-----[ 開啟]--------------------------------------------- # templates/subSilver/admin/group_edit_body.tpl # #-----[ 尋找]--------------------------------------------- <!-- END group_edit --> # #-----[ 之前增加]--------------------------------------- # <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> # #-----[ 開啟]--------------------------------------------- # templates/subSilver/admin/user_edit_body.tpl # #-----[ 尋找]--------------------------------------------- <td class="row1" colspan="2"><span class="gensmall">{L_SPECIAL_EXPLAIN}</span></td> </tr> # #-----[ 之後增加]--------------------------------------- # <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> # #-----[ 儲存你剛剛修改過的檔案]------------------------------------------ #
手快抽筋了
我再比較重要易出錯的地方都加上 ps....
新手安裝時請注意
另外 請安裝時裝備份唷\r
以免不小心掛點還可以還原
大概就是降啦\r
希望如果有人也安裝成功 請上來po一下
證明我沒虎爛 呵呵
各位大大啊! attach_mod\contrib\premodified_files\裡的是已經改好了的tpl和php等 只要安裝完mod_table_inst.php後 delete install。
把attach_mod\contrib\premodified_files\的files貼到phpbb2\就行了 要取代的。一分鐘就裝好了
下列這一排代碼我不太清楚怎麼加上去﹋a
可能是筆誤的關係,在之前增加是增加到「// Update the topic view counter」的前面,
還是「Update the topic view counter」的前面才對﹋a
因為我是第一次架外掛上去,所以不太清楚要加在哪邊﹋a
可能是筆誤的關係,在之前增加是增加到「// Update the topic view counter」的前面,
還是「Update the topic view counter」的前面才對﹋a
因為我是第一次架外掛上去,所以不太清楚要加在哪邊﹋a
代碼: 選擇全部
#-----[ 在下面增加]---------------------------------------
#
attach_build_auth_levels($is_auth, $s_auth_can);
#
#-----[ 尋找 ]---------------------------------------------
//
// Update the topic view counter
#
#-----[ 在之前增加 ---------------------------------------
#
init_display_post_attachments($forum_topic_data['topic_attachment']);
經過整理後, 這個可以用em裝了, 但至於檔案複製的步驟, 還請大家自行上載, 太多啦...
代碼: 選擇全部
#
#-----[ OPEN ]---------------------------------------------
#
common.php
#
#-----[ FIND ]---------------------------------------------
# 大約在第 181 行
$board_config[$row['config_name']] = $row['config_value'];
}
#
#-----[ AFTER, ADD ]--------------------------------------
include($phpbb_root_path . 'attach_mod/attachment_mod.'.$phpEx);
#
#-----[ OPEN ]---------------------------------------------
#
faq.php
#
#-----[ FIND ]---------------------------------------------
# 約在第 59 行
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/' . $lang_file . '.' . $phpEx);
#
#-----[ AFTER, ADD ]---------------------------------------
#
attach_faq_include($lang_file);
#
#-----[ OPEN ]---------------------------------------------
#
modcp.php
#
#-----[ FIND ]---------------------------------------------
# 約在第 321 行
remove_search_post($post_id_sql);
#
#-----[ AFTER, ADD ]---------------------------------------
#
delete_attachment(explode(', ', $post_id_sql));
#
#-----[ FIND ]---------------------------------------------
# 約在第 1143 行
'TOPIC_ID' => $topic_id,
#
#-----[ AFTER, ADD ]---------------------------------------
#
'TOPIC_ATTACHMENT_IMG' => topic_attachment_image($row['topic_attachment']),
#
#-----[ OPEN ]---------------------------------------------
#
posting.php
#
#-----[ FIND ]---------------------------------------------
# 約在第 427 行
$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 ]---------------------------------------------
# 約在第 584 行
user_notification($mode, $post_data, $post_info['topic_title'], $forum_id, $topic_id, $post_id, $notify_user);
}
#
#-----[ AFTER, ADD ]---------------------------------------
# ps....是在大括號後唷....別弄錯了
$attachment_mod['posting']->insert_attachment($post_id);
#
#-----[ FIND ]---------------------------------------------
# 約在第 713 行
'preview' => 'posting_preview.tpl')
);
#
#-----[ AFTER, ADD ]---------------------------------------
# ps....是?#91;在 ); 的下面喔 別搞錯了
$attachment_mod['posting']->preview_attachments();
#
#-----[ OPEN ]---------------------------------------------
#
privmsg.php
#
#-----[ FIND ]---------------------------------------------
# 約在第 139 行
// ----------
// Start main
#
#-----[ BEFORE, ADD ]--------------------------------------
#
execute_privmsgs_attachment_handling($mode);
#
#-----[ FIND ]---------------------------------------------
# 約在第 358 行
//
// 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 ]---------------------------------------------
# 約在 498 行
$user_id_to = $privmsg['user_id_2'];
#
#-----[ AFTER, ADD ]---------------------------------------
#
init_display_pm_attachments($privmsg['privmsgs_attachment']);
#
#-----[ FIND ]---------------------------------------------
# 約在第 757 行
unset($delete_type);
}
#
#-----[ AFTER, ADD ]---------------------------------------
# ps....是在大括號AFTER, ADD 唷 別搞錯
$attachment_mod['pm']->delete_all_pm_attachments($mark_list);
#
#-----[ FIND ]---------------------------------------------
# 約在第 310 行
if ( $mode != 'edit' )
{
//
// Add to the users new pm counter
//
#
#-----[ BEFORE, ADD ]---------------------------------------
# ps....?#93;就是 if ( $mode != 'edit' )' 的上面啦
$attachment_mod['pm']->insert_attachment_pm($privmsg_id);
#
#-----[ FIND ]---------------------------------------------
# 約在第 1611 行
"preview" => 'privmsgs_preview.tpl')
);
#
#-----[ AFTER, ADD ]---------------------------------------
# ps...是在 ); 之後唷 不搞錯
$attachment_mod['pm']->preview_attachments();
#
#-----[ FIND ]---------------------------------------------
# 約在第 2148 行
'DATE' => $msg_date,
#
#-----[ AFTER, ADD ]--------------------------------------
#
'PRIVMSG_ATTACHMENTS_IMG' => privmsgs_attachment_image($privmsg_id),
#
#-----[ OPEN ]---------------------------------------------
#
viewforum.php
#
#-----[ FIND ]---------------------------------------------
# 約在 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 ]---------------------------------------------
'NEWEST_POST_IMG' => $newest_post_img,
#
#-----[ AFTER, ADD ]---------------------------------------
#
'TOPIC_ATTACHMENT_IMG' => topic_attachment_image($topic_rowset[$i]['topic_attachment']),
#
#-----[ OPEN ]---------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]---------------------------------------------
AND f.forum_id = t.forum_id
$order_sql";
#
#-----[ AFTER, ADD ]---------------------------------------
#
attach_setup_viewtopic_auth($order_sql, $sql);
#
#-----[FIND]---------------------------------------------
$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 ]---------------------------------------------
//
// Update the topic view counter
#
#-----[ AFTER, ADD ]---------------------------------------
#
init_display_post_attachments($forum_topic_data['topic_attachment']);
#
#-----[ FIND ]---------------------------------------------
# around line 1205
'U_POST_ID' => $postrow[$i]['post_id'])
);
#
#-----[ AFTER, ADD ]---------------------------------------
# ps...是在 ); 的下面
display_post_attachments($postrow[$i]['post_id'], $postrow[$i]['post_attachment']);
#
#-----[OPEN]---------------------------------------------
#
admin/admin_forumauth.php
#
#-----[ FIND ]---------------------------------------------
$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 ]---------------------------------------------
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 ]---------------------------------------------
// ---------------
// Start Functions
#
#-----[ BEFORE, ADD ]---------------------------------------
#
attach_setup_usergroup_auth($forum_auth_fields, $auth_field_match, $field_names);
#
#-----[ OPEN ]---------------------------------------------
#
admin/admin_users.php
#
#-----[ FIND ]---------------------------------------------
//
// 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 ]---------------------------------------------
case AUTH_ATTACH:
break;
default:
break;
}
#
#-----[AFTER, ADD ]---------------------------------------
# ps...是在 } 大括號之後唷 別搞錯
attach_setup_basic_auth($type, $auth_fields, $a_sql);
#
#-----[ OPEN]---------------------------------------------
#
includes/functions.php
#
#-----[ FIND]---------------------------------------------
//
// Set up style
//
#
#-----[ BEFORE, ADD ]---------------------------------------
#
include_attach_lang();
#
#-----[ OPEN]---------------------------------------------
#
includes/functions_admin.php
#
#-----[ FIND]---------------------------------------------
message_die(GENERAL_ERROR, 'Could not update topic', '', __LINE__, __FILE__, $sql);
}
}
#
#-----[ AFTER, ADD ]---------------------------------------
# ps//是在第二個大括號之後但在break;BEFORE, ADD 別搞錯
attachment_sync_topic($id);
#
#-----[ OPEN]---------------------------------------------
#
includes/prune.php
#
#-----[ FIND]---------------------------------------------
remove_search_post($sql_post);
#
#-----[ AFTER, ADD ]---------------------------------------
#
prune_attachments($sql_post);
#
#-----[ OPEN]---------------------------------------------
#
includes/topic_review.php
#
#-----[ FIND]---------------------------------------------
WHERE t.topic_id = $topic_id
AND f.forum_id = t.forum_id";
#
#-----[ AFTER, ADD ]---------------------------------------
#
$tmp = '';
attach_setup_viewtopic_auth($tmp, $sql);
#
#-----[ FIND ]---------------------------------------------
//
// 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]---------------------------------------------
'L_MINI_POST_ALT' => $mini_post_alt)
);
#
#-----[ AFTER, ADD ]---------------------------------------
# ps...是在 ); AFTER, ADD 此行
display_review_attachments($row['post_id'], $row['post_attachment'], $is_auth);
#
#-----[ OPEN]---------------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]---------------------------------------------
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
#
#-----[ AFTER, ADD ]---------------------------------------
#
display_upload_attach_box_limits($profiledata['user_id']);
#
#-----[ OPEN]---------------------------------------------
#
templates/subSilver/modcp_body.tpl
#
#-----[ FIND]---------------------------------------------
{topicrow.TOPIC_TYPE}
#
#-----[ AFTER, ADD ]----------------------------
# ps....不用換行....
{topicrow.TOPIC_ATTACHMENT_IMG}
#
#-----[ OPEN]---------------------------------------------
#
templates/subSilver/posting_body.tpl
#
#-----[ FIND]---------------------------------------------
<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]---------------------------------------------
{POLLBOX}
#
#-----[ BEFORE, ADD ]---------------------------------------
#
{ATTACHBOX}
#
#-----[ OPEN]---------------------------------------------
#
templates/subSilver/posting_preview.tpl
#
#-----[ FIND ]---------------------------------------------
<span class="postbody">{MESSAGE}</span>
#
#-----[ AFTER, ADD ]---------------------------------------
#
<!-- BEGIN postrow -->
{ATTACHMENTS}
<!-- END postrow -->
#
#-----[ OPEN]---------------------------------------------
#
templates/subSilver/posting_topic_review.tpl
#
#-----[ FIND]---------------------------------------------
{postrow.MESSAGE}</span>
#
#-----[ AFTER, ADD ]---------------------------------------
# ps....直接?#91;到{postrow.MESSAGE}</span>的後面 不用換行
{postrow.ATTACHMENTS}
#
#-----[ OPEN]---------------------------------------------
#
templates/subSilver/privmsgs_body.tpl
#
#-----[ FIND ]---------------------------------------------
<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]---------------------------------------------
<span class="topictitle"> <a href="{listrow.U_READ}" class="topictitle">{listrow.SUBJECT}
#
#-----[ BEFORE, ADD ]---------------------------------------
#
{listrow.PRIVMSG_ATTACHMENTS_IMG}
#
#-----[ OPEN]---------------------------------------------
#
templates/subSilver/privmsgs_preview.tpl
#
#-----[ FIND]---------------------------------------------
<td valign="top" colspan="2" class="row1"><span class="postbody">{MESSAGE}</span></td>
#
#-----[ REPLACE WITH ]---------------------------------------
#
<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]---------------------------------------------
<td valign="top" colspan="3" class="row1"><span class="postbody">{MESSAGE}</span></td>
#
#-----[ REPLACE WITH ]---------------------------------------
#
<td valign="top" colspan="3" class="row1"><span class="postbody">{MESSAGE}</span>
<!-- BEGIN postrow -->
{ATTACHMENTS}
<!-- END postrow -->
</td>
#
#-----[ FIND]---------------------------------------------
<input type="submit" name="delete" value="{L_DELETE_MSG}" class="liteoption" />
#
#-----[ AFTER, ADD ]---------------------------------------
#
<!-- 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]---------------------------------------------
<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 ]---------------------------------------------
{topicrow.NEWEST_POST_IMG}
#
#-----[ AFTER, ADD ]---------------------------------------
# ps....直接?#91;在{topicrow.NEWEST_POST_IMG}的後面 不用換行
{topicrow.TOPIC_ATTACHMENT_IMG}
#
#-----[ OPEN]---------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND]---------------------------------------------
{postrow.SIGNATURE}
#
#-----[ BEFORE, ADD ]---------------------------------------
# ps...直接?#91;在{postrow.SIGNATURE}的前面 不用在上一行?#91;唷
</span>{postrow.ATTACHMENTS}<span class="postbody">
#
#-----[ OPEN]---------------------------------------------
#
templates/subSilver/admin/group_edit_body.tpl
#
#-----[ FIND]---------------------------------------------
<!-- 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]---------------------------------------------
<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 ]------------------------------------------
#
# EoM