To s88602:
根據我在測試論壇, 安裝, 測試的結果, 提供您分享:
1. 原作者設定" 精華" 主題
我猜想, 它的位階, 應該是低於" 公告或置頂" 的主題的
所以安裝
i-Commend Mod - Part 1 時, 有這麼一段修改( 部分擷取)
代碼: 選擇全部
#
#-----[ OPEN ]--------------------------------------------
#
viewforum.php
#
#-----[ FIND ]--------------------------------------------
#
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
#
#-----[ REPLACE WITH ]--------------------------------------------
#
ORDER BY t.topic_type = 1 DESC, t.topic_last_post_id DESC
因此, 您即使另外安裝了
Split topic type( 公告置頂分區)
也是沒有辦法, 將所有精華的主題集結在一起的.
也就是說,
如果您想將所有精華的主題, 集結在一起的話,
最快的方法, 就是將上述的修改還原回去;
如此一來, 版面將會依照主題型態( topic_type )排序.
另外, 您在另一篇文章所提到的" ???"
http://phpbb-tw.net/phpbb/viewtopic.php?p=217168#217168
則可以做以下的修改:
#
#-----[ OPEN ]--------------------------------------------
#
viewforum.php
#
#-----[ FIND ]--------------------------------------------
#
代碼: 選擇全部
case POST_STICKY:
$title = $lang['Post_Sticky'];
break;
#
#-----[ AFTER, ADD ]------------------------------------------
#
代碼: 選擇全部
case POST_COMMEND:
$title = $lang['Post_Commend'];
break;
2. 關於在後台增加" 分割精華" 的控制選項
以下的修改, 提供您參考:
#
#-----[ OPEN ]--------------------------------------------
#
viewforum.php
#
#-----[ FIND ]--------------------------------------------
#
代碼: 選擇全部
// if no split between sticky and normal, group them with normal
if ( (!$switch_split_sticky) && ($topic_real_type == POST_STICKY) ) $topic_real_type = POST_NORMAL;
#
#-----[ AFTER, ADD ]------------------------------------------
#
代碼: 選擇全部
// if no split between commend and normal, group them with normal
if ( (!$switch_split_commend) && ($topic_real_type == POST_COMMEND) ) $topic_real_type = POST_NORMAL;
#
#-----[ OPEN ]------------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]------------------------------------------------
#
代碼: 選擇全部
// split sticky
$switch_split_sticky = true;
if ( !isset( $board_config['split_sticky'] ) )
{
$sqlw = "INSERT INTO ".CONFIG_TABLE." (config_name,config_value) VALUES('split_sticky','" . $switch_split_sticky . "')";
if ( !($resultw = $db->sql_query($sqlw)) ) message_die(GENERAL_ERROR, 'Could not add key split_sticky in config table', '', __LINE__, __FILE__, $sql);
$board_config['split_sticky'] = $switch_split_sticky;
}
$switch_split_sticky = intval($board_config['split_sticky']);
#
#-----[ AFTER, ADD ]------------------------------------------
#
代碼: 選擇全部
// split commend
$switch_split_sticky = true;
if ( !isset( $board_config['split_commend'] ) )
{
$sqlw = "INSERT INTO ".CONFIG_TABLE." (config_name,config_value) VALUES('split_commend','" . $switch_split_commend . "')";
if ( !($resultw = $db->sql_query($sqlw)) ) message_die(GENERAL_ERROR, 'Could not add key split_commend in config table', '', __LINE__, __FILE__, $sql);
$board_config['split_commend'] = $switch_split_commend;
}
$switch_split_commend = intval($board_config['split_commend']);
#
#-----[ OPEN ]------------------------------------------------
#
admin/admin_board.php
#
#-----[ FIND ]------------------------------------------------
#
代碼: 選擇全部
$split_sticky_yes = ( $new['split_sticky'] ) ? 'checked="checked"' : '';
$split_sticky_no = (!$new['split_sticky'] ) ? 'checked="checked"' : '';
#
#-----[ AFTER, ADD ]------------------------------------------
#
代碼: 選擇全部
$split_commend_yes = ( $new['split_commend'] ) ? 'checked="checked"' : '';
$split_commend_no = (!$new['split_commend'] ) ? 'checked="checked"' : '';
#
#-----[ FIND ]------------------------------------------------
#
代碼: 選擇全部
'L_SPLIT_STICKY' => $lang['split_sticky'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
代碼: 選擇全部
'L_SPLIT_COMMEND' => $lang['split_commend'],
#
#-----[ FIND ]------------------------------------------------
#
代碼: 選擇全部
'SPLIT_STICKY_NO' => $split_sticky_no,
#
#-----[ AFTER, ADD ]------------------------------------------
#
代碼: 選擇全部
'SPLIT_COMMEND_YES' => $split_commend_yes,
'SPLIT_COMMEND_NO' => $split_commend_no,
#
#-----[ OPEN ]------------------------------------------------
#
templates/subSilver/admin/board_config_body.tpl
#
#-----[ FIND ]------------------------------------------------
#
代碼: 選擇全部
<tr>
<td class="row1">{L_SPLIT_STICKY}</td>
<td class="row2"><input type="radio" name="split_sticky" value="1" {SPLIT_STICKY_YES} /> {L_YES} <input type="radio" name="split_sticky" value="0" {SPLIT_STICKY_NO} /> {L_NO}</td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
代碼: 選擇全部
<tr>
<td class="row1">{L_SPLIT_COMMEND}</td>
<td class="row2"><input type="radio" name="split_commend" value="1" {SPLIT_COMMEND_YES} /> {L_YES} <input type="radio" name="split_commend" value="0" {SPLIT_COMMEND_NO} /> {L_NO}</td>
</tr>
#
#-----[ OPEN ]------------------------------------------------
#
language/lang_chinese_traditional_taiwan/lang_admin.php
#
#-----[ FIND ]------------------------------------------------
#
代碼: 選擇全部
$lang['split_sticky'] = '分割置頂';
#
#-----[ AFTER, ADD ]------------------------------------------
#
代碼: 選擇全部
$lang['split_commend'] = '分割精華';
#
#-----[ SAVE & CLOSE ]-----
#
3. 實際運作結果:
如果我在後檯設定:
分割精華-> 否( 如圖 1)
那麼測試版面如下圖 2:
如果我在後檯設定:
分割精華-> 是( 如圖 3)
那麼測試版面如下圖 4:
會出現圖 4 的情況, 就在於做了上頭的第 1 項修改;
還是那句話:
如果您想將所有精華的主題, 集結在一起的話,
最快的方法, 就是將上述的修改還原回去
#
#-----[ OPEN ]--------------------------------------------
#
viewforum.php
# 若要分割精華主題, 有集結在一起的效果的話, 則必須做此修改!
#
#-----[ FIND ]--------------------------------------------
# ps. 此乃安裝精華區外掛所做變更\r
代碼: 選擇全部
ORDER BY t.topic_type = 1 DESC, t.topic_last_post_id DESC
#
#-----[ REPLACE WITH ]--------------------------------------------
# ps. 此乃還原原始碼\r
代碼: 選擇全部
ORDER BY t.topic_type DESC, t.topic_last_post_id DESC
#
#-----[ SAVE & CLOSE ]-----
#