[分享] [mod] 主題類型(資料庫化) v4.0.0 by hentaibbc for plus 1.53

phpBB Plus Support
本區是討論關於 phpBB 2 plus 使用上的問題討論!
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

主題已鎖定
hanson.hung
星球公民
星球公民
文章: 48
註冊時間: 2006-05-07 16:15

[分享] [mod] 主題類型(資料庫化) v4.0.0 by hentaibbc for plus 1.53

文章 hanson.hung »

##############################################################
## 外掛名稱: 主題類型by hentaibbc (資料庫化) for plus 1.53a
## 外掛名稱: 主題類型by hentaibbc (資料庫化) phpbb2版本下載處:http://bbc.sytes.net/phpbb2/dload.php?a ... &file_id=7
## 外掛版本: 4.0.0
## 外掛作者: HentaiBBC
##
## 安裝難度: 中等
## 安裝時間: 15-20 分鐘
##
## 需要編輯的檔案: 19
## common.php
## modcp.php
## posting.php
## search.php
## viewforum.php
## viewtopic.php
## includes/constants.php
## includes/functions_post.php
## includes/functions_topics_list.php
## language/lang_chinese_traditional_taiwan/lang_admin.php
## language/lang_chinese_traditional_taiwan/lang_main.php
## templates/fisubsilversh/modcp_body.tpl
## templates/fisubsilversh/modcp_split.tpl
## templates/fisubsilversh/posting_body.tpl
## tepmlates/fisubsilversh/search_body.tpl
## tepmlates/fisubsilversh/search_results_posts.tpl
## tepmlates/fisubsilversh/search_results_topics.tpl
## tepmlates/fisubsilversh/topics_list_box.tpl
## templates/fisubsilversh/viewforum_body.tpl
## templates/fisubsilversh/viewtopic_body.tpl
##
## 附加的檔案: 14
## modcp_topictypes.php
## tt_db_update.php
## admin/admin_topictypes.php
## admin/admin_topictypes_config.php
## admin/admin_topictypes_forums.php
## includes/constents_topictypes.php
## includes/functions_topictypes.php
## includes/functions_topictypes_admin.php
## language/lang_chinese_traditional_taiwan/lang_topictypes.php.big5
## language/lang_chinese_traditional_taiwan/lang_topictypes.php.utf8
## templates/fisubsilversh/modcp_topictypes_body.tpl
## templates/fisubsilversh/admin/topictypes_body.tpl
## templates/fisubsilversh/admin/topictypes_config_body.tpl
## templates/fisubsilversh/admin/topictypes_forums_bosy.tpl
##
## 附加的圖示: n/a
##
##############################################################
##############################################################
## 版本修改資訊:
##
## 0.8.0 初版
##
## 1.0.0 修正: 0.8.0中的誤錯內容
##
## 1.1.0 增加功能: 搜尋時可設定主題類型
##
## 1.1.1 修正: 管理者版面在移動版面時可能發生的問題
##
## 1.1.2 修正: 發文預覽時沒有記錄
##
## 1.1.3 增加功能: 後台可控制單一版面是否強制使用主題類型
##
## 1.2.0 增加功能: 管理者版面中可以大量修改主題類型
##
## 2.0.0 修改基本架構, 增加後台控制版面
##
## 2.1.0 修改基本架構, 主題類型控制版面中直接修改版面主題類型資料
##
## 2.1.1 增加功能: 後台設定主題類型的字體顏色
##
## 2.1.2 修改一些Bugs
##
## 2.1.3 修正一些Bugs
##
## 3.0.0 修改基本架構, 可設定版面主題類型的順序, 並移除搜尋時的主題類型選單
##
## 3.0.1 修正一些Bugs
##
## 3.0.2 修正一些Bugs
##
## 3.1.0 後台功能增加, 新增版主專用主題類型
##
## 3.2.0 增加前台主題類型控制
##
## 3.2.1 後台增加一個控制, 控制版主在前台是否有刪除主題類型的功能
##
## 3.2.2 修正一個BUG, 並加上在看「主題」時,主題名稱會顯示主題類型
##
## 3.3.0 新增:分割主題控制台增加主題類型選單,以設定分割主題的主題類型
## 新增:搜尋功能增加主題類型選單,以設定要搜尋哪一種主題類型
## 新增:版面控制台增加主題類型列,可以選擇單一主題類型
## 新增:版面控制台的主題類型變更功能中,增加移除功能(但該版面必須是不強制使用主題類型的)
## 功能修改:可大量新增主題類型, 不再是一次只能增加一個
##
## 3.3.1 BUG修正:修正一個已知BUG, 此BUG會造成搜尋時文章總數錯誤
## 功能補上:在3.3.0就應該要出現的功能,因為編修文章中沒有寫到,以致該功能失效
## 程式碼修改:1.為了以後修改上的簡便性,增加了一個方程式。
## 2.搜尋的部份,用另一種方式去執行,之前的方式會導致BUG太多。
##
## 3.3.2 BUG修正:修正一些已知的錯誤。
## 內容修正:1.取消字數上限的限制。
## 2.後台增加自訂色碼。
##
## 4.0.0 因為進行了大幅度的更改,所以用第4版做為這一次修改的代號。
## 修改:1.主題類型顯示方式。
## 2.後台頁面。
##
##############################################################
##############################################################
## 在增加此外掛前, 請務必備份所有需要修改的檔案
##############################################################
STEP 1:
將root資料夾中的檔案複製至對應位置
並將
language/lang_chinese_traditional_taiwan/lang_topictypes.php.big5
language/lang_chinese_traditional_taiwan/lang_topictypes.php.utf8
依你的預設語言, 其中一個改為lang_topictypes.php
##############################################################
STEP 2:
執行 tt_db_update.php
執行完成後, 建議刪除此檔
##############################################################
STEP 3:
編輯檔案
#
#-----[ OPEN ]-----------------------------
#
common.php
#
#-----[ FIND ]-----------------------------
#
include($phpbb_root_path . 'includes/db.'.$phpEx);
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
include($phpbb_root_path . 'includes/constants_topictypes.'.$phpEx);
//topic types mod end
#
#-----[ OPEN ]-----------------------------
#
modcp.php
#
#-----[ FIND ]-----------------------------
#
include($phpbb_root_path . 'includes/functions_admin.'.$phpEx);
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
include($phpbb_root_path . 'includes/functions_topictypes.'.$phpEx);
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
$unlock = ( isset($_POST['unlock']) ) ? TRUE : FALSE;
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
$types = ( isset($_POST['types']) ) ? TRUE : FALSE;
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
$mode = 'unlock';
}
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
else if ( $types )
{
$mode = 'types';
}
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
$sql = "SELECT forum_name, forum_topics
FROM " . FORUMS_TABLE . "
WHERE forum_id = " . $forum_id;
#
#-----[ REPLACE ]--------------------------
#
$sql = "SELECT forum_name, forum_topics, forum_topictypes_force
FROM " . FORUMS_TABLE . "
WHERE forum_id = " . $forum_id;

#
#-----[ FIND ]-----------------------------
#
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
// $forum_name = $topic_row['forum_name'];
//-- add
$forum_name = get_object_lang(POST_FORUM_URL . $topic_row['forum_id'], 'name');
//-- fin mod : categories hierarchy -------------------------------------------------------------
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
$forum_topictypes_force = $topic_row['forum_topictypes_force'];
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
$sql = "INSERT INTO " . TOPICS_TABLE . " (forum_id, topic_title, topic_poster, topic_time, topic_status, topic_type, topic_vote, topic_views, topic_replies, topic_first_post_id, topic_last_post_id, topic_moved_id)
VALUES ($old_forum_id, '" . addslashes(str_replace("\'", "''", $row[$i]['topic_title'])) . "', '" . str_replace("\'", "''", $row[$i]['topic_poster']) . "', " . $row[$i]['topic_time'] . ", " . TOPIC_MOVED . ", " . POST_NORMAL . ", " . $row[$i]['topic_vote'] . ", " . $row[$i]['topic_views'] . ", " . $row[$i]['topic_replies'] . ", " . $row[$i]['topic_first_post_id'] . ", " . $row[$i]['topic_last_post_id'] . ", $topic_id)";
#
#-----[ REPLACE ]--------------------------
#
$sql = "INSERT INTO " . TOPICS_TABLE . " (forum_id, topic_title, topic_poster, topic_time, topic_status, topic_type, topic_vote, topic_views, topic_replies, topic_first_post_id, topic_last_post_id, topic_moved_id, types_id)
VALUES ($old_forum_id, '" . addslashes(str_replace("\'", "''", $row[$i]['topic_title'])) . "', '" . str_replace("\'", "''", $row[$i]['topic_poster']) . "', " . $row[$i]['topic_time'] . ", " . TOPIC_MOVED . ", " . POST_NORMAL . ", " . $row[$i]['topic_vote'] . ", " . $row[$i]['topic_views'] . ", " . $row[$i]['topic_replies'] . ", " . $row[$i]['topic_first_post_id'] . ", " . $row[$i]['topic_last_post_id'] . ", $topic_id, " . $row[$i]['types_id'] . ")";
#
#-----[ FIND ]-----------------------------
#
message_die(GENERAL_MESSAGE, $lang['Topics_Unlocked'] . '<br /><br />' . $message);

break;
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
case 'types':

if ( empty($_POST['topic_id_list']) && empty($topic_id) )
{
message_die(GENERAL_MESSAGE, $lang['None_selected']);
}

if ( empty($_POST['topic_types']) )
{
message_die(GENERAL_MESSAGE ,$lang['None_selected_types']);
}

$topics = ( isset($_POST['topic_id_list']) ) ? $_POST['topic_id_list'] : array($topic_id);

$types_id = ($_POST['topic_types'] > 0) ? $_POST['topic_types'] : 0;

$topic_id_sql = '';
for($i = 0; $i < count($topics); $i++)
{
$topic_id_sql .= ( ( $topic_id_sql != "") ? ', ' : '' ) . intval($topics[$i]);
}

$sql = "UPDATE " . TOPICS_TABLE . "
SET types_id = $types_id
WHERE topic_id IN ($topic_id_sql)
AND forum_id = $forum_id
AND topic_moved_id = 0";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update topics table', '', __LINE__, __FILE__, $sql);
}

if ( !empty($topic_id) )
{
$redirect_page = "viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&sid=" . $userdata['session_id'];
$message = sprintf($lang['Click_return_topic'], '<a href="' . $redirect_page . '">', '</a>');
}
else
{
$redirect_page = "modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'];
$message = sprintf($lang['Click_return_modcp'], '<a href="' . $redirect_page . '">', '</a>');
}

$message = $message . '<br \><br \>' . sprintf($lang['Click_return_forum'], '<a href="' . "viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'] . '">', '</a>');

$template->assign_vars(array(
'META' => '<meta http-equiv="refresh" content="3;url=' . $redirect_page . '">')
);

message_die(GENERAL_MESSAGE, $lang['Topics_types_changes'] . '<br /><br />' . $message);

break;
//topic types mod
#
#-----[ FIND ]-----------------------------
#
$sql = 'SELECT forum_id FROM ' . FORUMS_TABLE . '
WHERE forum_id = ' . $new_forum_id;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select from forums table', '', __LINE__, __FILE__, $sql);
}

if (!$db->sql_fetchrow($result))
{
message_die(GENERAL_MESSAGE, 'New forum does not exist');
}

$db->sql_freeresult($result);

$sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type)
VALUES ('" . str_replace("\'", "''", $post_subject) . "', $first_poster, " . $topic_time . ", $new_forum_id, " . TOPIC_UNLOCKED . ", " . POST_NORMAL . ")";
#
#-----[ REPLACE ]--------------------------
#
//topic types mod
$sql = 'SELECT forum_id, forum_topictypes_force FROM ' . FORUMS_TABLE . '
WHERE forum_id = ' . $new_forum_id;
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not select from forums table', '', __LINE__, __FILE__, $sql);
}

if (!$row = $db->sql_fetchrow($result))
{
message_die(GENERAL_MESSAGE, 'New forum does not exist');
}

$db->sql_freeresult($result);

$error = false;
$types_id = ( isset($_POST['topic_types']) ) ? intval($_POST['topic_types']) : 0;
if( $row['forum_topictypes_force'] && !$types_id )
{
$error = true;
$message = $lang['New_forum_must_topictypes'];
}
else if( $types_id )
{
$types_row = get_types_row($new_forum_id);
if(empty($types_row[$types_id]))
{
$error = true;
$message = $lang['New_forum_have_no_such_types'];
}
}

if( $error )
{
$message .= '<br /><br />' . sprintf($lang['Click_return_split'], '<a href="' . append_sid("modcp.$phpEx?mode=split&" . POST_TOPIC_URL . "=$topic_id&sid=" . $userdata['session_id']) . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_modcp'], '<a href="' . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&start=0&sid=" . $userdata['session_id']) . '">', '</a>');

message_die(GENERAL_MESSAGE, $message);
}

$sql = "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, types_id)
VALUES ('" . str_replace("\'", "''", $post_subject) . "', $first_poster, " . $topic_time . ", $new_forum_id, " . TOPIC_UNLOCKED . ", " . POST_NORMAL . ", $types_id)";
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
$template->set_filenames(array(
'split_body' => 'modcp_split.tpl')
);
#
#-----[ BEFORE, ADD ]----------------------
#
//topic types mod
$types_rowset = get_types_rowset();
if( count($types_rowset) )
{
$template->assign_block_vars('switch_topictypes_box', array());
}
$select_topic_types = '<option value="">' . $lang['Topic_types'] . '</option>';
for($i=0;$i<count($types_rowset);$i++)
{
$select_topic_types .= '<option value="' . $types_rowset[$i]['types_id'] . '">' . $types_rowset[$i]['types_name'] . '</option>';
}
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
'L_UNMARK_ALL' => $lang['Unmark_all'],
'L_POST' => $lang['Post'],
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
'S_SELECT_TOPIC_TYPES' => sprintf($tt_box['sbox'], 'topic_types', $select_topic_types),
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
default:
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
$types_rowset = get_types_rowset($forum_id);

if ( !empty($_POST['types_id']) || !empty($_GET['types_id']) )
{
$types_id = ( !empty($_POST['types_id']) ) ? $_POST['types_id'] : $_GET['types_id'];

$sql = "SELECT COUNT(t.topic_id) AS forum_topics
FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
WHERE t.forum_id = $forum_id
AND p.post_id = t.topic_last_post_id
AND t.types_id = $types_id";

if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain limited topics count information', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);

$forum_topics = ( $row['forum_topics'] ) ? $row['forum_topics'] : 1;
$limit_topic_types = "AND t.types_id = $types_id ";

if ( !empty($_POST['types_id']) )
{
$start = 0;
}
}
else
{
$forum_topics = ( $forum_topics ) ? $forum_topics : 1;
$limit_topic_types = '';
$topic_types = '';
}

if ( count($types_rowset) )
{
$select_topic_types = ( $types_id !='' ) ? '<a href="' . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&start=0&sid=" . $userdata['session_id']) . '" class="gen">'. $lang['All_Topics'] .'</a>' : $lang['All_Topics'];
$tt_bar = sprintf($tt_box['sbar_td'], $select_topic_types);
for($i=0;$i<count($types_rowset);$i++)
{
$select_topic_types = ($types_id != $types_rowset[$i]['types_id']) ? '<a href="' . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&start=0&sid=" . $userdata['session_id'] . "&types_id=" . $types_rowset[$i]['types_id'] ) . '" class="gen">'. $types_rowset[$i]['types_name'] .'</a>' : $types_rowset[$i]['types_name'];
$tt_bar .= sprintf($tt_box['sbar_td'], $select_topic_types);
}
$template->assign_vars(array(
'S_TOPIC_TYPES_BAR' => sprintf($tt_box['sbar'], $tt_bar))
);

$template->assign_block_vars('switch_topictypes_box',array());
}

$select_topic_types_box = '<option value="">' . $lang['Topic_types'] . '</option>';
for($i=0;$i<count($types_rowset);$i++)
{
$select_topic_types_box .= '<option value="' . $types_rowset[$i]['types_id'] . '">' . $types_rowset[$i]['types_name'] . '</option>';
}
if(!$forum_topictypes_force)
{
$select_topic_types_box .= '<option value="">---------------</option><option value="-1">' . $lang['Types_none'] . '</option>';
}
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
'L_LASTPOST' => $lang['Last_Post'],
'L_SELECT' => $lang['Select'],
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
'L_CHANGE' => $lang['Change'],
'S_SELECT_TOPIC_TYPES' => sprintf($tt_box['sbox'], 'topic_types', $select_topic_types_box),
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
$sql = "SELECT t.*, u.username, u.user_id, p.post_time
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p
#
#-----[ BEFORE, ADD ]----------------------
#
//topic types mod
$types_row = get_types_row();
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
$sql = "SELECT t.*, u.username, u.user_id, p.post_time
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . POSTS_TABLE . " p
WHERE t.forum_id = $forum_id
AND t.topic_poster = u.user_id
AND p.post_id = t.topic_last_post_id
#
#-----[ AFTER, ADD ]-----------------------
#
$limit_topic_types
#
#-----[ FIND ]-----------------------------
#
$u_view_topic = "modcp.$phpEx?mode=split&" . POST_TOPIC_URL . "=$topic_id&sid=" . $userdata['session_id'];
#
#-----[ BEFORE, ADD ]----------------------
#
//topic types mod
$types_id = $row['types_id'];
$temp_url = append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&start=0&sid=" . $userdata['session_id'] . "&types_id=" . $types_id);
$types_name = ($types_id) ? sprintf($tt_box['types_name'], $temp_url, $types_row[$types_id]['types_color'], $types_row[$types_id]['types_color'], 10, 'normal', $types_row[$types_id]['types_name']) : '';
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
'TOPIC_TITLE' => $topic_title,
#
#-----[ BEFORE, ADD ]----------------------
#
//topic types mod
'TYPES_NAME' => $types_name,
//topic types mod
#
#-----[ FIND ]-----------------------------
#
'PAGINATION' => generate_pagination("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'], $forum_topics, $board_config['topics_per_page'], $start),
#
#-----[ REPLACE ]--------------------------
#
'PAGINATION' => generate_pagination("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'] . (($types_id)?"&types_id=$types_id":''), $forum_topics, $board_config['topics_per_page'], $start),
#
#-----[ OPEN ]-----------------------------
#
posting.php
#
#-----[ FIND ]-----------------------------
#
include($phpbb_root_path . 'includes/functions_post.'.$phpEx);
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
include($phpbb_root_path . 'includes/functions_topictypes.'.$phpEx);
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, p.post_id, p.poster_id" . $select_sql . "
#
#-----[ REPLACE ]--------------------------
#
$sql = "SELECT f.*, t.topic_id, t.topic_status, t.topic_type, t.topic_first_post_id, t.topic_last_post_id, t.topic_vote, t.types_id, p.post_id, p.poster_id" . $select_sql . "
#
#-----[ FIND ]-----------------------------
#
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
// $forum_name = $post_info['forum_name'];
//-- add
$forum_name = get_object_lang(POST_FORUM_URL . $post_info['forum_id'], 'name');
//-- fin mod : categories hierarchy ----------------------------------------------------------------
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
$types_rowset = get_types_rowset($forum_id, $userdata['user_level']);
$post_data['topictypes_force'] = ( count($types_rowset) && $post_info['forum_topictypes_force'] == 1 ) ? true : false;
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
$subject = ( !empty($_POST['subject']) ) ? trim($_POST['subject']) : '';
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
$post_data['types_id'] = ( !empty($_POST['topic_types']) ) ? $_POST['topic_types'] : 0;
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
$subject = ( !empty($_POST['subject']) ) ? htmlspecialchars(trim(stripslashes($_POST['subject']))) : '';
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
$types_id = ( !empty($_POST['topic_types']) ) ? $_POST['topic_types'] : 0;
//topic types mod
#
#-----[ FIND ]-----------------------------
#
$subject = ( $post_data['first_post'] ) ? $post_info['topic_title'] : $post_info['post_subject'];
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
$types_id = ( $post_data['first_post'] ) ? $post_info['types_id'] : 0;
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
//
// Include page header
#
#-----[ BEFORE, ADD ]----------------------
#
//topic types mod
if ( count($types_rowset) && ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) ) )
{
$select_topic_types = '<option value="">' . $lang['Topic_types'] . '</option>';
for($i=0;$i<count($types_rowset);$i++)
{
$select = ($types_rowset[$i]['types_id'] == $types_id) ? 'selected="selected"':'';
$select_topic_types .= '<option ' . $select . 'value="' . $types_rowset[$i]['types_id'] . '">' . $types_rowset[$i]['types_name'] . '</option>';
}
$template->assign_vars(array(
'S_SELECT_TOPIC_TYPES' => sprintf($tt_box['sbox'], 'topic_types', $select_topic_types))
);
$template->assign_block_vars('switch_topictypes', array());
}
//topic types mod end
#
#-----[ OPEN ]-----------------------------
#
search.php
#
#-----[ FIND ]-----------------------------
#
include($phpbb_root_path . 'includes/functions_search.'.$phpEx);
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
include($phpbb_root_path . 'includes/functions_topictypes.'.$phpEx);
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
for ($i = 0; $i < count($search_id_chunks); $i++)
{
$where_sql = '';
#
#-----[ BEFORE, ADD ]----------------------
#
//topic types mod
$types_id = ( isset($_POST['topic_types']) ) ? intval($_POST['topic_types']) : ( (isset($_GET['types_id'])) ? intval($_GET['types_id']) : 0 );
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
if ( $search_author == '' && $auth_sql == '' )
{
$sql = "SELECT topic_id
FROM " . POSTS_TABLE . "
WHERE post_id IN (" . implode(", ", $search_id_chunks[$i]) . ")
$where_sql
GROUP BY topic_id";
}
else
{
$from_sql = POSTS_TABLE . " p";

if ( $search_author != '' )
{
$from_sql .= ", " . USERS_TABLE . " u";
$where_sql .= " AND u.user_id = p.poster_id AND u.username LIKE '$search_author' ";
}

if ( $auth_sql != '' )
{
$from_sql .= ", " . FORUMS_TABLE . " f";
$where_sql .= " AND f.forum_id = p.forum_id AND $auth_sql";
}

$sql = "SELECT p.topic_id
FROM $from_sql
WHERE p.post_id IN (" . implode(", ", $search_id_chunks[$i]) . ")
$where_sql
GROUP BY p.topic_id";
}
#
#-----[ REPLACE ]--------------------------
#
//topic types mod
if($types_id)
{
if ( $search_author == '' && $auth_sql == '' )
{
$sql = "SELECT t.topic_id
FROM " . POSTS_TABLE . " p, " . TOPICS_TABLE . " t
WHERE p.post_id IN (" . implode(", ", $search_id_chunks[$i]) . ")
AND p.topic_id = t.topic_id
AND t.types_id = $types_id
$where_sql
GROUP BY topic_id";
}
else
{
$from_sql = POSTS_TABLE . " p";

if ( $search_author != '' )
{
$from_sql .= ", " . USERS_TABLE . " u";
$where_sql .= " AND u.user_id = p.poster_id AND u.username LIKE '$search_author' ";
}

if ( $auth_sql != '' )
{
$from_sql .= ", " . FORUMS_TABLE . " f";
$where_sql .= " AND f.forum_id = p.forum_id AND $auth_sql";
}

$sql = "SELECT p.topic_id
FROM $from_sql, " . TOPICS_TABLE . " t
WHERE p.post_id IN (" . implode(", ", $search_id_chunks[$i]) . ")
AND p.topic_id = t.topic_id
AND t.types_id = $types_id
$where_sql
GROUP BY p.topic_id";
}
}
else
{
if ( $search_author == '' && $auth_sql == '' )
{
$sql = "SELECT topic_id
FROM " . POSTS_TABLE . "
WHERE post_id IN (" . implode(", ", $search_id_chunks[$i]) . ")
$where_sql
GROUP BY topic_id";
}
else
{
$from_sql = POSTS_TABLE . " p";

if ( $search_author != '' )
{
$from_sql .= ", " . USERS_TABLE . " u";
$where_sql .= " AND u.user_id = p.poster_id AND u.username LIKE '$search_author' ";
}

if ( $auth_sql != '' )
{
$from_sql .= ", " . FORUMS_TABLE . " f";
$where_sql .= " AND f.forum_id = p.forum_id AND $auth_sql";
}

$sql = "SELECT p.topic_id
FROM $from_sql
WHERE p.post_id IN (" . implode(", ", $search_id_chunks[$i]) . ")
$where_sql
GROUP BY p.topic_id";
}
}
//topic types mod
#
#-----[ FIND ]-----------------------------
#
if ( $search_results != '' )
{
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
$types_row = get_types_row();
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
$topic_title = $searchset[$i]['topic_title'];
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
$types_id = $searchset[$i]['types_id'];
$types_name = ($types_id) ? sprintf($tt_box['types_name_na'], $types_row[$types_id]['types_color'], $types_row[$types_id]['types_color'], 10, 'normal', $types_row[$types_id]['types_name']) : '';
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
'TOPIC_TITLE' => $topic_title,
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- delete
// 'FORUM_NAME' => $searchset[$i]['forum_name'],
//-- add
'FORUM_NAME' => get_object_lang(POST_FORUM_URL . $searchset[$i]['forum_id'], 'name'),
//-- fin mod : categories hierarchy ----------------------------------------------------------------
#
#-----[ BEFORE, ADD ]----------------------
#
//topic types mod
'TYPES_NAME' => $types_name,
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
'TOPIC_TITLE' => $topic_title,
'TOPIC_TYPE' => $topic_type,
#
#-----[ BEFORE, ADD ]----------------------
#
//topic types mod
'TYPES_NAME' => $types_name,
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
//
// Output the basic page
#
#-----[ BEFORE, ADD ]----------------------
#
//topic types mod
$types_rowset = get_types_rowset();
if( count($types_rowset) )
{
$template->assign_block_vars('switch_topictypes', array());
}
$select_topic_types = '<option value="">' . $lang['Topic_types'] . '</option>';
for($i=0;$i<count($types_rowset);$i++)
{
$select_topic_types .= '<option value="' . $types_rowset[$i]['types_id'] . '">' . $types_rowset[$i]['types_name'] . '</option>';
}
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
'L_TOPICS' => $lang['Topics'],
'L_POSTS' => $lang['Posts'],
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
'L_SEARCH_TOPIC_TYPES' => $lang['Search_topic_types'],
'L_SEARCH_TOPIC_TYPES_E' => $lang['Search_topic_types_explain'],
'S_SELECT_TOPIC_TYPES' => sprintf($tt_box['sbox'], 'topic_types', $select_topic_types),
//topic types mod end
#
#-----[ OPEN ]-----------------------------
#
viewforum.php
#
#-----[ FIND ]-----------------------------
#
include($phpbb_root_path . 'common.'.$phpEx);
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
include($phpbb_root_path . 'includes/functions_topictypes.'.$phpEx);
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
$select_topic_days .= '</select>';
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
$types_rowset = get_types_rowset($forum_id);

if ( !empty($_POST['types_id']) || !empty($_GET['types_id']) )
{
$types_id = ( !empty($_POST['types_id']) ) ? $_POST['types_id'] : $_GET['types_id'];

$sql = "SELECT COUNT(t.topic_id) AS forum_topics
FROM " . TOPICS_TABLE . " t, " . POSTS_TABLE . " p
WHERE t.forum_id = $forum_id
AND p.post_id = t.topic_last_post_id
AND t.types_id = $types_id
$limit_topics_time";

if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain limited topics count information', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);

$topics_count = ( $row['forum_topics'] ) ? $row['forum_topics'] : 1;
$limit_topic_types = "AND t.types_id = $types_id";

if ( !empty($_POST['types_id']) )
{
$start = 0;
}
}
else
{
$topics_count = ( $forum_row['forum_topics'] ) ? $forum_row['forum_topics'] : 1;
$limit_topic_types = '';
$topic_types = '';
}

if ( count($types_rowset) )
{
$select_topic_types = ( $types_id !='' ) ? '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">'. $lang['All_Topics'] .'</a>' : $lang['All_Topics'];
$tt_bar = sprintf($tt_box['sbar_td'], $select_topic_types);
for($i=0;$i<count($types_rowset);$i++)
{
$select_topic_types = ($types_id != $types_rowset[$i]['types_id']) ? '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&starter=0&types_id=" . $types_rowset[$i]['types_id'] . (($topic_days > 0) ? "&topicdays=". $topic_days : "") ) . '">'. $types_rowset[$i]['types_name'] .'</a>' : $types_rowset[$i]['types_name'];
$tt_bar .= sprintf($tt_box['sbar_td'], $select_topic_types);
}
$template->assign_vars(array(
'S_TOPIC_TYPES_BAR' => sprintf($tt_box['sbar'], $tt_bar))
);
}
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
AND t.topic_type <> " . POST_GLOBAL_ANNOUNCE . "
$limit_topics_time
#
#-----[ AFTER, ADD ]-----------------------
#
$limit_topic_types
#
#-----[ FIND ]-----------------------------
#
$s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&start=" . $start . "&sid=" . $userdata['session_id'] . '">', '</a>');
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
$s_auth_can .= ( $board_config['topictypes_mod_enabled'] ) ? '<br />' . sprintf($lang['Rules_topictypes_moderate'], "<a href=\"modcp_topictypes.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'] . '">', '</a>') : '';
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
if( $total_topics )
#
#-----[ BEFORE, ADD ]----------------------
#
//topic types mod
$types_row = get_types_row();
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
$topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'];
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
$temp_tid = $topic_rowset[$i]['types_id'];
$temp_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&start=$start&types_id=$temp_tid");
$types_name = ($temp_tid) ? sprintf($tt_box['types_name'], $temp_url, $types_row[$temp_tid]['types_color'], $types_row[$temp_tid]['types_color'], 10, 'normal', $types_row[$temp_tid]['types_name']) : '';
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
'TOPIC_TITLE' => $topic_title,
#
#-----[ BEFORE, ADD ]----------------------
#
//topic types mod
'TYPES_NAME' => $types_name,
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
'PAGINATION' => generate_pagination("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&topicdays=$topic_days", $topics_count, $board_config['topics_per_page'], $start),
#
#-----[ REPLACE ]--------------------------
#
'PAGINATION' => generate_pagination("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&topicdays=$topic_days&types_id=$types_id", $topics_count, $board_config['topics_per_page'], $start),
#
#-----[ OPEN ]-----------------------------
#
viewtopic.php
#
#-----[ FIND ]-----------------------------
#
include_once($phpbb_root_path . 'includes/functions_profile_fields.'.$phpEx);
#
#-----[ AFTER, ADD ]-----------------------
#
// topic types mod
include($phpbb_root_path . 'includes/functions_topictypes.'.$phpEx);
// topic types mod end
#
#-----[ FIND ]-----------------------------
#
$s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'] . '">', '</a>');
#
#-----[ AFTER, ADD ]-----------------------
#
//topic types mod
$s_auth_can .= ( $board_config['topictypes_mod_enabled'] ) ? '<br />' . sprintf($lang['Rules_topictypes_moderate'], "<a href=\"modcp_topictypes.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'] . '">', '</a>') : '';
//topie types mod end
#
#-----[ FIND ]-----------------------------
#
//
// Send vars to template
//
#
#-----[ BEFORE, ADD ]-----------------------
#
//topic types mod
$types_info = get_typesinfo($topic_id);
$types_name = (($types_info['types_id']) ? sprintf($tt_box['types_name'], append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&types_id=" . $types_info['types_id']), $types_info['types_color'], $types_info['types_color'], 12, 'bold', $types_info['types_name']) : '');
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
'TOPIC_TITLE' => $topic_title,
#
#-----[ BEFORE, ADD ]----------------------
#
//topic types mod
'TYPES_NAME' => $types_name,
//topic types mod end
#
#-----[ OPEN ]-----------------------------
#
includes/constants.php
#
#-----[ FIND ]-----------------------------
#
?>
#
#-----[ BEFORE, ADD ]----------------------
#
//topic types mod
define('TYPES_TABLE', $table_prefix.'types');
define('TYPES_FORUM_TABLE', $table_prefix.'types_forum');
//topic types mod end
#
#-----[ OPEN ]-----------------------------
#
includes/functions_post.php
#
#-----[ FIND ]-----------------------------
#
// Check message
if (!empty($message))
#
#-----[ BEFORE, ADD ]----------------------
#
// Check topic_types
if ( !empty($post_data['types_id']) )
{
$post_data['types_id'] = intval($post_data['types_id']);
}
else if ( $post_data['topictypes_force'] && ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post'])))
{
$error_msg .= (!empty($error_msg)) ? '<br />'. $lang['Empty_topictypes'] : $lang['Empty_topictypes'];
}
#
#-----[ FIND ]-----------------------------
#
$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_desc, topic_poster, topic_time, forum_id, news_id, topic_status, topic_type, topic_calendar_time, topic_calendar_duration, topic_icon, topic_announce_duration, topic_vote) VALUES ('$post_subject', '$topic_desc', " . $userdata['user_id'] . ", $current_time, $forum_id, $news_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_calendar_time, $topic_calendar_duration, $post_icon, $topic_announce_duration, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_desc = '$topic_desc', news_id = $news_id, topic_type = $topic_type, topic_calendar_time = $topic_calendar_time, topic_calendar_duration = $topic_calendar_duration, topic_icon=$post_icon, topic_announce_duration = $topic_announce_duration " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";
#
#-----[ REPLACE ]--------------------------
#
$sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (types_id, topic_title, topic_desc, topic_poster, topic_time, forum_id, news_id, topic_status, topic_type, topic_calendar_time, topic_calendar_duration, topic_icon, topic_announce_duration, topic_vote) VALUES (" . $post_data['types_id'] . ", '$post_subject', '$topic_desc', " . $userdata['user_id'] . ", $current_time, $forum_id, $news_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_calendar_time, $topic_calendar_duration, $post_icon, $topic_announce_duration, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET types_id = " . $post_data['types_id'] . ", topic_title = '$post_subject', topic_desc = '$topic_desc', news_id = $news_id, topic_type = $topic_type, topic_calendar_time = $topic_calendar_time, topic_calendar_duration = $topic_calendar_duration, topic_icon=$post_icon, topic_announce_duration = $topic_announce_duration " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id";
#
#-----[ OPEN ]-----------------------------
#
includes/functions_topics_list.php
#
#-----[ FIND ]-----------------------------
#
@include_once($phpbb_root_path . 'includes/functions_announces.' . $phpEx);
#
#-----[ AFTER, ADD ]-----------------------------
#
//topic types mod
include_once($phpbb_root_path . 'includes/functions_topictypes.' . $phpEx);
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
global $db, $template, $board_config, $userdata, $phpEx, $lang, $images, $HTTP_COOKIE_VARS;
global $tree;
static $box_id;
#
#-----[ AFTER, ADD ]-----------------------------
#
//topic types mod
global $start, $tt_box;
$types_row = get_types_row();
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
$forum_id = $topic_rowset[$i]['forum_id'];

#
#-----[ AFTER, ADD ]-----------------------------
#
//topic types mod
$types_id = $topic_rowset[$i]['types_id'];
$temp_url = append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id&start=$start&types_id=$types_id");
$types_name = ($types_id) ? sprintf($tt_box['types_name'], $temp_url, $types_row[$types_id]['types_color'], $types_row[$types_id]['types_color'], 10, 'normal', $types_row[$types_id]['types_name']) : '';
//topic types mod end
#
#-----[ FIND ]-----------------------------
#
'TOPIC_TITLE' => $topic_title,
#
#-----[ BEFORE, ADD ]-----------------------------
#
//topic types mod
'TYPES_NAME' => $types_name,
//topic types mod end
#
#-----[ OPEN ]-----------------------------
#
language/lang_chinese_traditional_taiwan/lang_admin.php
#
#-----[ FIND ]-----------------------------
#
$lang['Restore_DB'] = '還原資料庫';
#
#-----[ AFTER, ADD ]----------------------
#
//topic types mod
$lang['Topictypes'] = '主題類型';
$lang['Types_add_delete'] = '新增/移除/編輯';
$lang['Types_config'] = '一般設定';
$lang['Types_forums'] = '版面設定';
//topic types mod end
#
#-----[ OPEN ]-----------------------------
#
language/lang_chinese_traditional_taiwan/lang_main.php
#
#-----[ FIND ]-----------------------------
#
//
// That's all Folks!
#
#-----[ BEFORE, ADD ]----------------------
#
//topic types mod
$lang['Topic_types'] = '主題類型';
$lang['Empty_topictypes'] = '發表主題必須選擇一種主題類型';
$lang['Change'] = '變更';
$lang['None_selected_types'] = '您沒有選擇任何主題類型來執行這個動作, 請返回並選擇一個主題類型.';
$lang['Topics_types_changes'] = '選擇的主題已更改主題類型';
$lang['Rules_topictypes_moderate'] = '您 <b>可以</b> %s執行版面主題類型管理功能%s';
$lang['New_forum_must_topictypes'] = '新主題的版面必須選擇主題類型';
$lang['New_forum_have_no_such_types'] = '新主題的版面沒有此主題類型';
$lang['Click_return_split'] = '點選 %s這裡%s 返回主題分割控制台';
$lang['Types_none'] = '移除主題類型';
$lang['Search_topic_types'] = '指定主題類型';
$lang['Search_topic_types_explain'] = '您可以指定一種主題類型, 當做搜尋的依據';
//topic types mod end
#
#-----[ OPEN ]-----------------------------
#
templates/fisubsilversh/modcp_body.tpl
#
#-----[ FIND ]-----------------------------
#
<table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline">
#
#-----[ BEFORE, ADD ]----------------------
#
<!-- topic types mod -->
{S_TOPIC_TYPES_BAR}
<!-- topic types mod end -->
#
#-----[ FIND ]-----------------------------
#
<td width="100%" class="row1" ondblclick="AJAXTitleEdit({topicrow.TOPIC_FIRST_POST_ID}, 0)">&nbsp;<span class="topictitle">{topicrow.TOPIC_ATTACHMENT_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" id="topiclink_{topicrow.TOPIC_FIRST_POST_ID}">{topicrow.TOPIC_TITLE}</a><span id="title_{topicrow.TOPIC_FIRST_POST_ID}" style="display:none;"><input type="text" class="post" name="topictitle_{topicrow.TOPIC_FIRST_POST_ID}" id="topictitle_{topicrow.TOPIC_FIRST_POST_ID}" value="{topicrow.TOPIC_TITLE}" size="40" maxlength="60" /><input type="hidden" id="orig_topictitle_{topicrow.TOPIC_FIRST_POST_ID}" value="{topicrow.TOPIC_TITLE}" />&nbsp;<input type="button" onclick="AJAXEndTitleEdit({topicrow.TOPIC_FIRST_POST_ID})" value="{L_SAVE_CHANGES}" class="mainoption" />&nbsp;<input type="button" onclick="AJAXCancelTitleEdit({topicrow.TOPIC_FIRST_POST_ID})" value="{L_CANCEL}" class="liteoption" /></span></span></td>
#
#-----[ IN-LINE FIND ]---------------------
#
{topicrow.TOPIC_TYPE}
#
#-----[ IN-LINE AFTER, ADD ]---------------
#
{topicrow.TYPES_NAME}
#
#-----[ FIND ]-----------------------------
#
<td colspan="5" align="right" class="cat"> {S_HIDDEN_FIELDS}
#
#-----[ AFTER, ADD ]-----------------------
#
<!-- BEGIN switch_topictypes_box -->
{S_SELECT_TOPIC_TYPES}
&nbsp;
<input type="submit" name="types" class="liteoption" value="{L_CHANGE}" />
&nbsp;
<!-- END switch_topictypes_box -->
#
#-----[ OPEN ]-----------------------------
#
templates/fisubsilversh/modcp_split.tpl
#
#-----[ FIND ]-----------------------------
#
<td class="row2" colspan="2"><input type="text" size="35" style="width: 350px" maxlength="100" name="subject" class="post" />
</td>
#
#-----[ REPLACE ]--------------------------
#
<td class="row2" colspan="2">
<!-- BEGIN switch_topictypes_box -->
{S_SELECT_TOPIC_TYPES}&nbsp;
<!-- END switch_topictypes_box -->
<input class="post" type="text" size="35" style="width: 350px" maxlength="100" name="subject" /></td>
#
#-----[ OPEN ]-----------------------------
#
templates/fisubsilversh/posting_body.tpl
#
#-----[ FIND ]-----------------------------
#
<td class="row2" width="78%"><input type="text" {S_LOCK_SUBJECT} name="subject" size="45" maxlength="60" style="width:450px" tabindex="2" class="post" value="{SUBJECT}" {S_AJAX_BLUR} />
#
#-----[ REPLACE ]----------------------
#
<td class="row2" width="78%">
<!-- topic types mod -->
<!-- BEGIN switch_topictypes -->
{S_SELECT_TOPIC_TYPES}
<!-- END switch_topictypes -->
<!-- topic types mod end -->
<input type="text" {S_LOCK_SUBJECT} name="subject" size="45" maxlength="60" style="width:450px" tabindex="2" class="post" value="{SUBJECT}" {S_AJAX_BLUR} />
#
#-----[ OPEN ]-----------------------------
#
templates/fisubsilversh/search_body.tpl
#
#-----[ FIND ]-----------------------------
#
<tr>
<td class="row1" colspan="2" width="50%"><span class="explaintitle">{L_SEARCH_KEYWORDS}:</span><br />
<span class="gensmall">{L_SEARCH_KEYWORDS_EXPLAIN}</span></td>
#
#-----[ BEFORE, ADD ]----------------------
#
<!-- topic types mod -->
<!-- BEGIN switch_topictypes -->
<tr>
<td class="row1" colspan="2" width="50%"><span class="gen">{L_SEARCH_TOPIC_TYPES}:</span><br /><span class="gensmall">{L_SEARCH_TOPIC_TYPES_E}</span></td>
<td class="row2" colspan="2" valign="middle">{S_SELECT_TOPIC_TYPES}</td>
</tr>
<!-- END switch_topictypes -->
<!-- topic types mod end -->
#
#-----[ OPEN ]-----------------------------
#
templates/fisubsilversh/search_results_posts.tpl
#
#-----[ FIND ]-----------------------------
#
<td class="cat" colspan="2">{L_TOPIC}:&nbsp;<a href="{searchresults.U_TOPIC}" class="topictitle" id="topiclink_top_{searchresults.U_POST_ID}">{searchresults.TOPIC_TITLE}</a></td>
#
#-----[ IN-LINE FIND ]---------------------
#
{L_TOPIC}:&nbsp;
#
#-----[ IN-LINE AFTER, ADD ]---------------
#
{searchresults.TYPES_NAME}
#
#-----[ OPEN ]-----------------------------
#
templates/fisubsilversh/search_results_topics.tpl
#
#-----[ FIND ]-----------------------------
#
<td class="row2" {searchresults.S_AJAX_EDIT_TITLE}><span class="topictitle"><span id="topicnewest_{searchresults.TOPIC_ID}">{searchresults.NEWEST_POST_IMG}</span>{searchresults.TOPIC_TYPE}<a href="{searchresults.U_VIEW_TOPIC}" id="topiclink_{searchresults.TOPIC_FIRST_POST_ID}" >{searchresults.TOPIC_TITLE}</a>
#
#-----[ IN-LINE FIND ]---------------------
#
{searchresults.TOPIC_TYPE}
#
#-----[ IN-LINE AFTER, ADD ]---------------
#
{searchresults.TYPES_NAME}
#
#-----[ OPEN ]-----------------------------
#
templates/fisubsilversh/topics_list_box.tpl
#
#-----[ FIND ]-----------------------------
#
<span class="topictitle"><span id="topicnewest_{topics_list_box.row.TOPIC_ID}">{topics_list_box.row.NEWEST_POST_IMG}</span>{topics_list_box.row.TOPIC_ATTACHMENT_IMG} {topics_list_box.row.TOPIC_TYPE}<a href="{topics_list_box.row.U_VIEW_TOPIC}" id="topiclink_{topics_list_box.row.TOPIC_FIRST_POST_ID}" class="topictitle">{topics_list_box.row.TOPIC_TITLE}</a>
#
#-----[ IN-LINE FIND ]---------------------
#
{topics_list_box.row.TOPIC_TYPE}
#
#-----[ IN-LINE AFTER, ADD ]---------------
#
{topics_list_box.row.TYPES_NAME}
#
#-----[ OPEN ]-----------------------------
#
templates/fisubsilversh/viewforum_body.tpl
#
#-----[ FIND ]-----------------------------
#
<script type="text/javascript" src="includes/javascript/ajax_topicfunctions.js"></script>
#
#-----[ BEFORE, ADD ]-----------------------
#
<!-- topic types mod -->
{S_TOPIC_TYPES_BAR}
<!-- topic types mod end -->
#
#-----[ OPEN ]-----------------------------
#
templates/fisubsilversh/viewtopic_body.tpl
#
#-----[ FIND ]-----------------------------
#
<td height="34" valign="top" class="nav">{BANNER_14_IMG}<br/><a href="{U_VIEW_TOPIC}" id="topiclink_top" class="maintitle">{TOPIC_TITLE}</a><br />
#
#-----[ IN-LINE FIND ]---------------------
#
{BANNER_14_IMG}<br/>
#
#-----[ IN-LINE AFTER, ADD ]---------------
#
{TYPES_NAME}
#
#-----[ SAVE/CLOSE ALL FILES ]-------------
#
#EoM

檔案下載處:請點我下載
主題已鎖定

回到「phpBB 2 plus 綜合討論」