phpbb3 hack: 自訂主題分類
for PHPBB3.0, PHPBB 3.0.1
個人開發網站使用, 有任問題不保證能立即幫忙解決.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | 修改資料庫欄位 ALTER TABLE `phpbb_forums` ADD `forum_topic_type` VARCHAR( 255 ) NOT NULL DEFAULT '[其他]'; open: ===== posting.php find: ===== $form_enctype = (@ini_get('file_uploads') == '..... add_form_key('posting'); after, add: ====== // Hack Start: forum_topic_type, 2007.09.07 $topic_type_option = ''; $topic_type = explode("||",$post_data['forum_topic_type']); foreach ($topic_type as $type_item) { $topic_type_option .= '<option value="[' . $type_item . ']">[' . $type_item . ']</option>'; } // Hack End: forum_topic_type find: ===== 'FORUM_NAME' => $post_data['forum_name'], 'FORUM_DESC' => ($post_data['forum_desc']) ? generate_text_for_display($post_data['forum_desc'], $post_data['forum_desc_uid'], $post_data['forum_desc_bitfield'], $post_data['forum_desc_options']) : '', afert, add: =========== // Hack Start: forum_topic_type, 2007.09.07 'FORUM_TOPIC_TYPE' => $topic_type_option, 'L_TOPIC_TYPES_EXPLAIN' => $user->lang['L_TOPIC_TYPES_EXPLAIN'], // Hack End: forum_topic_type open: ===== phpBB3stylesprosilvertemplateposting_editor.html find: ===== <dd><input type="text" name="subject" id="subject" size="45" maxlength=" .... between <dd> and <input.... add: ===== <select onchange="document.getElementById('postform').subject.focus(); document.getElementById('postform').subject.value = this.options[this.selectedIndex].value + document.getElementById('postform').subject.value;"> <option selected value="">{L_TOPIC_TYPES_EXPLAIN}</option> {FORUM_TOPIC_TYPE} </select> open: ===== languag /zh_TW/posting.php find: ===== 'WRONG_SIZE' => after, add: ===== // Hack Start: forum_topic_type, 2007.09.07 'L_TOPIC_TYPES_EXPLAIN' => '主題類型', // Hack End: forum_topic_type |
修改完, 收工下班!