[外掛] Rating system 1.1

MODs Released by Other phpbb Sites
非官方認證通過之 MOD ,或許有安全性之疑慮,所有問題由原發表者回覆!

版主: 版主管理群

主題已鎖定
天霜
竹貓忠實會員
竹貓忠實會員
文章: 882
註冊時間: 2003-04-15 19:40
來自: 星之鄉學園
聯繫:

[外掛] Rating system 1.1

文章 天霜 »

外掛名稱:Rating system
外掛版本:1.1
外掛描述:文章評分系統

外掛作者:Gentle Giant
作者網站:http://www.mywebcommunities.com

下載外掛:http://www.phpbb.com/phpBB/viewtopic.ph ... 805#270805

_________________________________________________________

lang chinese traditional taiwan:
  • NO
_________________________________________________________

Fixes to apply:
  • NO
_________________________________________________________

額外修改: _________________________________________________________

Style:
  • NO
_________________________________________________________
不回答來自 私人訊息, 電子郵件, 及時通 的相關 phpBB 問題
除非是個人疏失所造成的問題

這世界還有拼命守護的價值嗎...
天霜
竹貓忠實會員
竹貓忠實會員
文章: 882
註冊時間: 2003-04-15 19:40
來自: 星之鄉學園
聯繫:

文章 天霜 »

相容修修改 : 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 打開 ]------------------------------------------------
#

代碼: 選擇全部

viewforum.php
#
#-----[ 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>
#
#-----[ 儲存/關閉所有檔案 ]----------------------------------------
#
# 外掛修正結束
天霜
竹貓忠實會員
竹貓忠實會員
文章: 882
註冊時間: 2003-04-15 19:40
來自: 星之鄉學園
聯繫:

文章 天霜 »

相容修修改 : Rating system 1.1 & Categories hierarchy 2.0.5 - RC2

作者 : Rebellion

#
#-----[ 打開 ]-----------------------------------------------------
#

代碼: 選擇全部

ratings.php
#
#-----[ 尋找 ]-----------------------------------------------------
#

代碼: 選擇全部

// FORUM DROPDOWN BOX
$forums = array(0 => array('title'=>$lang['Rating_all_forums'], 'selected'=>''));
$sql = 'SELECT forum_id, forum_name FROM '.FORUMS_TABLE.' f
 WHERE f.auth_view <= '.$r_auth_level.' 
 AND f.auth_read <= '.$r_auth_level.' 
 ORDER BY f.forum_name';
if( !($result = $db->sql_query($sql)) ) 
{ 
	message_die(GENERAL_ERROR, "Couldn't obtain temporary rating information", '', __LINE__, __FILE__, $sql); 
}
while( $row = $db->sql_fetchrow($result) ) 
{
	$forums[$row['forum_id']] = array('title'=>stripslashes($row['forum_name']), 'selected'=>'');
}
#
#-----[ 替換 ]-----------------------------------------------------
#

代碼: 選擇全部

// FORUM DROPDOWN BOX
$forums = array(0 => array('title'=>$lang['Rating_all_forums'], 'selected'=>''));

$sql = "SELECT forum_id, forum_name, forum_link FROM " . FORUMS_TABLE;

if( !($result = $db->sql_query($sql)) ) 
{ 
	message_die(GENERAL_ERROR, "Couldn't obtain temporary rating information", '', __LINE__, __FILE__, $sql); 
}

$is_auth_ary = auth(AUTH_READ, AUTH_LIST_ALL, $userdata);

while( $row = $db->sql_fetchrow($result) ) 
{
	if ( ( $is_auth_ary[$row['forum_id']]['auth_read'] ) && ( empty($row['forum_link']) ) )
	{
		$forums[$row['forum_id']] = array('title'=>stripslashes($row['forum_name']), 'selected'=>'');
	}
}
#
#-----[ 儲存/關閉所有檔案 ]----------------------------------------
#
# 外掛修正結束
天霜
竹貓忠實會員
竹貓忠實會員
文章: 882
註冊時間: 2003-04-15 19:40
來自: 星之鄉學園
聯繫:

文章 天霜 »

相容修修改 : Rating system 1.1 & Topic calendar 1.0.1

作者 : Vergil

#
#-----[ 打開 ]-----------------------------------------------------
#

代碼: 選擇全部

rating.php
#
#-----[ 尋找 ]-----------------------------------------------------
#

代碼: 選擇全部

'MESSAGE' => $message,
#
#-----[ 替換 ]-----------------------------------------------------
#

代碼: 選擇全部

'RATING_MESSAGE' => $message,
#
#-----[ 尋找 ]-----------------------------------------------------
#

代碼: 選擇全部

'TOPIC_TITLE' => $topic_title,
#
#-----[ 替換 ]-----------------------------------------------------
#

代碼: 選擇全部

'RATING_TOPIC_TITLE' => $topic_title,
#
#-----[ 打開 ]-----------------------------------------------------
#

代碼: 選擇全部

templates/subSilver/rating.tpl
#
#-----[ 尋找 ]-----------------------------------------------------
#

代碼: 選擇全部

{MESSAGE}
#
#-----[ 替換 ]-----------------------------------------------------
#

代碼: 選擇全部

{RATING_MESSAGE}
#
#-----[ 尋找 ]-----------------------------------------------------
#

代碼: 選擇全部

{TOPIC_TITLE}
#
#-----[ 替換 ]-----------------------------------------------------
#

代碼: 選擇全部

{RATING_TOPIC_TITLE}
#
#-----[ 儲存/關閉所有檔案 ]----------------------------------------
#
# 外掛修正結束
主題已鎖定

回到「非官方認證外掛」