[phpBB2 譯文:MOD] 快速群組顯示

與 phpBB 2.0.x 相關主題。
回覆文章
bu
版面管理員
版面管理員
文章: 443
註冊時間: 2003-02-23 12:46
來自: 25° 4′N 121° 29′E
聯繫:

[phpBB2 譯文:MOD] 快速群組顯示

文章 bu »

代碼: 選擇全部

############################################################## 
## MOD Title:          Faster groupcp
## 外掛名稱:            快速群組顯示
## MOD Author:         Niels < ncr@db9.dk > (Niels Chr. R?d) http://mods.db9.dk
## 中文譯者: bu < buhip@yahoo.co.jp > http://phpbb-tw.net/, http://kuloo.com 
## MOD Description:    This mod will make groupcp faster, when looking up group members of large groups
##                     NOTE: you will only see the different on usergroups with meny users
##                     on my demo site, the time whent from +30 sek, down to 1 sek on a usergroup with +6000 members....
## 外掛說明:這外掛將會加快群組顯示的速度,當你在看一個有很多人的群組時,很有用。
## MOD Version:        1.0.0
## 外掛版本:            1.0.0
## Compatibility:      2.0.3->2.0.6
## 相容性:             2.0.3 至 2.0.6
## Installation Level: easy
## 安裝難度:            簡單\r
## Installation Time:  2 Minutes (1mn by EasyMOD of Nuttzy)
## 安裝時間:            2分鐘(用EasyMOD只須1分鐘)
## Files To Edit:      1
## 要修改的檔案: 1
##      groupcp.php
##
## Included Files:     0
## 附加的檔案: 0\r
##
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
##
## 由於安全上的考量,請檢查: 
## http://www.phpbb.com/mods/downloads/ 是否有此外掛的最新版本 
## 從其他地方下載此檔可能會造成你在你的 phpBB 討論版上寫入有誤的程式碼 
## 基於這個理由,phpBB 將不會為沒有收藏在我們的外掛資料庫的外掛提供支援 
## 我們的外掛資料庫在 http://www.phpbb.com/mods/downloads/ 
##
############################################################## 
## Author Notes: 
## 
## This MOD is compatible and can be installed by EasyMOD
## of Nuttzy (but is not officially EasyMOD Compliant)!
## http://www.phpbb.com/phpBB/viewtopic.php?t=124436
##
## 作者筆記:
## 這外掛通過了 Nuttzy 的 EasyMOD 語法檢查(不是官方的 EasyMOD 語法檢查)
## http://www.phpbb.com/phpBB/viewtopic.php?t=124436
##
############################################################## 
## MOD History: 
##
##   2003-09-05 - Version 1.0.0.
##      - Initial release phpBB2
##
## 外掛歷史:
##  2003-09-05 - 版本 1.0.0
##    - 第一個釋出的版本\r
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
## 在你加入這個外掛前,你應該把所有與這個外掛有關的檔案進行備份 
############################################################## 

# 
#-----[ OPEN 開啟 ]------------------------------------------------ 
# 
groupcp.php

# 
#-----[ FIND 尋找 尋找 ]------------------------------------------------ 
# 
ORDER BY u.username

# 
#-----[ IN-LINE FIND 尋找 ]------------------------------------------------ 
# 
";

# 
#-----[ IN-LINE REPLACE WITH 取代為 ]------------------------------------------------ 
# 
 LIMIT $start, ".$board_config['topics_per_page'];

# 
#-----[ FIND 尋找 ]------------------------------------------------ 
# 
$members_count = count($group_members);

# 
#-----[ REPLACE WITH 取代為 ]------------------------------------------------ 
# 
// $members_count code removed

# 
#-----[ FIND 尋找 ]------------------------------------------------ 
# 
$sql = "SELECT
FROM

# 
#-----[ IN-LINE FIND 尋找 ]------------------------------------------------ 
# 
FROM " . GROUPS_TABLE . " g, " .

# 
#-----[ IN-LINE REPLACE WITH 取代為 ]------------------------------------------------ 
# 
FROM " .

# 
#-----[ FIND 尋找 ]------------------------------------------------ 
# 
WHERE ug.group_id = $group_id
AND g.group_id = ug.group_id

# 
#-----[ REPLACE WITH 取代為 ]------------------------------------------------ 
# 
WHERE ug.group_id = $group_id
	
# 
#-----[ FIND 尋找 ]------------------------------------------------ 
# 
ORDER BY u.username

# 
#-----[ IN-LINE FIND 在該句中尋找 ]------------------------------------------------ 
# 
";

# 
#-----[ IN-LINE REPLACE WITH 在該句中取代為 ]------------------------------------------------ 
# 
 LIMIT $start, ".$board_config['topics_per_page'];

# 
#-----[ FIND 尋找 ]------------------------------------------------ 
# 
$modgroup_pending_count = count($modgroup_pending_list);

# 
#-----[ REPLACE WITH 取代為 ]------------------------------------------------ 
# 
$sql = "SELECT count(*) as total
	FROM " . USER_GROUP_TABLE . " 
	WHERE group_id = $group_id AND user_id <> " . $group_moderator['user_id'] . " 
		GROUP BY user_pending ASC"; 
if ( !($result = $db->sql_query($sql)) )
{
	message_die(GENERAL_ERROR, 'Error getting user count information', '', __LINE__, __FILE__, $sql);
}
$counting_list = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
$members_count = $counting_list['0']['total'];
$modgroup_pending_count = $counting_list['1']['total'];

# 
#-----[ FIND 尋找 ]------------------------------------------------ 
# 
for($i = $start; $i < min($board_config['topics_per_page'] + $start, $members_count); $i++)

# 
#-----[ REPLACE WITH 取代為 ]------------------------------------------------ 
# 
$i = -1;
while(!empty($group_members[++$i]['username']))

# 
#-----[ SAVE/CLOSE ALL FILES  儲存並且關閉所有檔案 ]-------------------------------- 
# 
# EoM
# 外掛結束
*譯文資料在phpBB 技術文件
bu.femto-size
*和我聯絡,請寄 or Google Talk 圖檔
*作品: Intergrated Toplist & Message Can
回覆文章

回到「2.0」