相容修修改 : Rating system 1.1 & Split topic type 2.0.1
資料來源 : http://www.integramod.com/home/
作者 : Integramod
影響到的檔案:
viewforum.php
includes/functions_topics_list.php
templates/subSilver/viewforum_body.tpl
templates/subSilver/topics_list_box.tpl
當你安裝修改 Rating system 時修改到以上檔案時
請將以上檔案還原到未安裝 Rating system 時期
再進行以下追加修改\r
#
#-----[ OPEN 打開 ]------------------------------------------------
#
#
#-----[ FIND 尋找 ]------------------------------------------------
#
代碼: 選擇全部
// send the list
$allow_split_type = true;
$display_nav_tree = false;
topic_list('TOPICS_LIST_BOX', 'topics_list_box', $topic_rowset, '', $allow_split_type, $display_nav_tree, $footer);
#
#-----[ REPLACE WITH 替換 ]----------------------------------------
#
代碼: 選擇全部
// send the list
$allow_split_type = true;
$display_nav_tree = false;
if(!count($topic_rank_set))
{
if(!$RATING_PATH)
{
define('RATING_PATH', $phpbb_root_path.'mods/rating/');
}
include_once(RATING_PATH.'functions_rating.'.$phpEx);
if(!$rating_config)
{
$rating_config = get_rating_config('1');
}
if ( $rating_config[1] == 1 )
{
$topic_rank_set = array();
get_rating_ranks();
}
}
if ( $rating_config[1] == 1 )
{
// SHOW DROPDOWN BOX FOR RATINGS SCREEN IF APPROPRIATE
if ( $rating_config[19] == 1 && $forum_topic_data['auth_view'] < 2 && $forum_topic_data['auth_read'] < 2 )
{
$u_ratings = append_sid($phpbb_root_path.'ratings.'.$phpEx);
$template->assign_block_vars('ratingsbox', array(
'U_RATINGS' => $u_ratings,
'L_LATEST_RATINGS' => $lang['Latest_ratings'],
'L_HIGHEST_RANKED_POSTS' => $lang['Highest_ranked_posts'],
'L_HIGHEST_RANKED_TOPICS' => $lang['Highest_ranked_topics'],
'L_HIGHEST_RANKED_POSTERS' => $lang['Highest_ranked_posters']
)
);
}
}
topic_list('TOPICS_LIST_BOX', 'topics_list_box', $topic_rowset, '', $allow_split_type, $display_nav_tree, $footer, true, '', 0, '', array(), $topic_rank_set);
#
#-----[ OPEN 打開 ]------------------------------------------------
#
代碼: 選擇全部
includes/functions_topics_list.php
#
#-----[ FIND 尋找 ]------------------------------------------------
#
代碼: 選擇全部
function topic_list($box, $tpl='', $topic_rowset, $list_title='', $split_type=false, $display_nav_tree=true, $footer='', $inbox=true, $select_field='', $select_type=0, $select_formname='', $select_values=array())
#
#-----[ REPLACE WITH 替換 ]----------------------------------------
#
代碼: 選擇全部
function topic_list($box, $tpl='', $topic_rowset, $list_title='', $split_type=false, $display_nav_tree=true, $footer='', $inbox=true, $select_field='', $select_type=0, $select_formname='', $select_values=array(), $topic_rank_set=array())
#
#-----[ FIND 尋找 ]------------------------------------------------
#
代碼: 選擇全部
$color = !$color;
$template->assign_block_vars( $tpl . '.row', array(
#
#-----[ REPLACE WITH 替換 ]----------------------------------------
#
代碼: 選擇全部
$color = !$color;
$topic_rating = ( count($topic_rank_set) > 0 && $topic_rowset[$i]['rating_rank_id'] > 0 ) ? $topic_rank_set[$topic_rowset[$i]['rating_rank_id']] : '';
$template->assign_block_vars( $tpl . '.row', array(
'RATING' => $topic_rating,
#
#-----[ OPEN 打開 ]------------------------------------------------
#
代碼: 選擇全部
templates/subSilver/viewforum_body.tpl
#
#-----[ FIND 尋找 ]------------------------------------------------
#
代碼: 選擇全部
<form method="post" action="{S_POST_DAYS_ACTION}">
#
#-----[ BEFORE ADD 之前, 加上 ]------------------------------------
#
代碼: 選擇全部
<!-- BEGIN ratingsbox -->
<form method="get" name="ratingsbox" action="{ratingsbox.U_RATINGS}">
<input type="hidden" name="forum_id" value="{FORUM_ID}">
<select name="type">
<option value="">{ratingsbox.L_LATEST_RATINGS}</option>
<option value="p">{ratingsbox.L_HIGHEST_RANKED_POSTS}</option>
<option value="t">{ratingsbox.L_HIGHEST_RANKED_TOPICS}</option>
<option value="u">{ratingsbox.L_HIGHEST_RANKED_POSTERS}</option>
</select> <input type="submit" value="Go" class="liteoption" />
</form><br />
<!-- END ratingsbox -->
#
#-----[ OPEN 打開 ]------------------------------------------------
#
代碼: 選擇全部
templates/subSilver/topics_list_box.tpl
#
#-----[ FIND 尋找 ]------------------------------------------------
#
代碼: 選擇全部
{topics_list_box.row.TOPIC_TITLE}</a>
#
#-----[ REPLACE WITH 替換 ]----------------------------------------
#
代碼: 選擇全部
{topics_list_box.row.TOPIC_TITLE}</a> <span class="quote">{topics_list_box.row.RATING}</span>
#
#-----[ 儲存/關閉所有檔案 ]----------------------------------------
#
# 外掛修正結束