1 頁 (共 1 頁)

[外掛] 顯示完成度 M-Finish Points 之修正

發表於 : 2005-08-09 22:54
yungyeh
此外掛可以顯示論壇的完成度\r
系統管理員可以從控制台設定

參考主題
http://phpbb-tw.net/phpbb/viewtopic.php?t=31538

外掛已不適用 PHPBB 2.0.17
我自己做了一些修正
現在可以用在 2.0.17 了

代碼: 選擇全部


############################################################## 
## 外掛名稱: M-Finished Points eXtreme 
## 外掛作者: clpl < clplforum@yahoo.com.hk > http://clpl.timebase.us/ 
## eXtreme 作者: sunlight < sunlight@no.reply.sunairlite.com > http://www.sunairlite.com/ 
## 外掛簡介: 這個外掛是一個顯示完成?#123;度的外掛。 
## 外掛版本: 1.0.?? 
## eXtreme 版本: 1.0.?? 
## 
## 安裝難度: 粉容易 
## 安裝時間: 5 分鐘 
## 修改檔案: 6 
##              includes/page_tail.php 
##              admin/admin_board.php 
##              templates/subSilver/overall_footer.tpl 
##              templates/subSilver/admin/board_config_body.tpl 
##              language/lang_chinese_traditional_taiwan/lang_admin.php 
##              language/lang_chinese_traditional_taiwan/lang_main.php 
############################################################## 
## 作者之言: 
## 這個外掛是一個顯示完成?#123;度的外掛。 
## 
##   - ACP: 更改完成?#123;度 
##   - 論壇底部: 顯示完成?#123;度 
############################################################## 
## v1.0.0 
##   - 版本釋出 
## v1.0.1 
##   - 語系更改 
##   - 風格檔改動 
##   - page_tail.php一段?#123;式碼更改 
############################################################## 
## 安裝此外掛之前請先備份好你的論壇。 
############################################################## 
# 
#-----[ ADD,SQL ]------------------------------------------ 
# 
INSERT INTO phpbb_config (config_name, config_value) VALUES ('finished', '0'); 

# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/page_tail.php 
# 
#-----[ FIND ]------------------------------------------ 
# 
$admin_link = ( $userdata['user_level'] == ADMIN ) ? '<a href="admin/index.' . $phpEx . '?sid=' . $userdata

['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '';
# 
#-----[ AFTER, ADDD ]------------------------------------------ 
# 
// M-Finish Points eXtreme Part 
if ( $board_config['finished'] < 100 )
{ 
$finished_points = $lang['Finished_Points_Text'] . $board_config['finished'] . '%'; 
} 
else 
{ 
$finished_points = $lang['Finished_Points_All']; 
} 
//EoF  M-Finish Points eXtreme Part 
# 
#-----[ FIND ]------------------------------------------ 
# 
$template->assign_vars(array(
	'TRANSLATION_INFO' => ( isset($lang['TRANSLATION_INFO']) ) ? $lang['TRANSLATION_INFO'] : '',

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
	'FINISHED_POINTS' => $finished_points,
# 
#-----[ OPEN ]------------------------------------------ 
# 
admin/admin_board.php 

# 
#-----[ FIND ]------------------------------------------ 
# 
        "L_RESET" => $lang['Reset'], 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
	"L_FINISHED_POINTS" => $lang['Finished_Points'], 
	"L_FINISHED_POINTS_DES" => $lang['Finished_Points_Des'], 
	"FINISHED_POINTS" => $new['finished'], 

# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subSilver/overall_footer.tpl 

# 
#-----[ FIND ]------------------------------------------ 
# 
{ADMIN_LINK} 

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
{FINISHED_POINTS}<br /> 

# 
#-----[ OPEN ]------------------------------------------ 
# 
templates/subSilver/admin/board_config_body.tpl 

# 
#-----[ FIND ]------------------------------------------ 
# 
   <tr> 
      <td class="row1">{L_HOT_THRESHOLD}</td> 
      <td class="row2"><input class="post" type="text" name="hot_threshold" size="3" maxlength="4" 

value="{HOT_TOPIC}" /></td> 
   </tr> 

# 
#-----[ AFTER, ADD ]------------------------------------------ 
# 
	<tr> 
		<td class="row1">{L_FINISHED_POINTS}<br />{L_FINISHED_POINTS_DES}</td> 
		<td class="row2"><input class="post" type="text" name="finished" size="3" maxlength="4" 

value="{FINISHED_POINTS}" />%</td> 
	</tr> 
# 
#-----[ OPEN ]------------------------------------------ 
# 
language/lang_chinese_traditional_taiwan/lang_admin.php 

# 
#-----[ FIND ]------------------------------------------ 
# 
// 
// That's all Folks! 

# 
#-----[ BEFORE, ADD ]------------------------------------------ 
# 
// Start add - M-Finished Points 
$lang['Finished_Points'] = '完成度'; 
$lang['Finished_Points_Des'] = '這裡輸入你的討論區的完成度(不用打入%)'; 
// End add - M-Finished Points 

# 
#-----[ OPEN ]------------------------------------------ 
# 
language/lang_chinese_traditional_taiwan/lang_main.php 

# 
#-----[ FIND ]------------------------------------------ 
# 
// 
// That's all Folks! 

# 
#-----[ BEFOREN, ADD ]------------------------------------------ 
# 
// Start add - M-Finished Points 
$lang['Finished_Points_Text']= '本站已完成: '; 
$lang['Finished_Points_All']= '本站的功能已全部完成'; 
// End add - M-Finished Points 
# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM