[問題] 請問水色論壇的一個功能

phpBB 2 MOD Support
無論是官方或非官方認證之外掛,安裝與使用問題討論。
(發表文章請按照公告格式發表,違者砍文)

版主: 版主管理群

主題已鎖定
chsa
星球公民
星球公民
文章: 259
註冊時間: 2004-12-27 20:45

[問題] 請問水色論壇的一個功能

文章 chsa »

問題外掛:
參考連結:http://bbs.2233.idv.tw/
使用版本:phpBB 2.0.17
網站位置:http://forum.no89275.net/
狀況描述:

水色論壇(http://bbs.2233.idv.tw/)首頁中,有一個
最多回覆主題 最強人氣主題 評價前五大 灌水前五大\r
不知道這外掛的下載點在哪裡?,可否提供一下,謝謝..

補充:
我不想要評價前五大,我要虛擬貨幣前五大..的..
有的人,提供一下 ^^
先謝謝 :-D
御津闇慈
竹貓忠實會員
竹貓忠實會員
文章: 645
註冊時間: 2001-11-17 10:59

文章 御津闇慈 »

top5的改造版
請自己去參考
chsa
星球公民
星球公民
文章: 259
註冊時間: 2004-12-27 20:45

文章 chsa »

御津闇慈 寫:top5的改造版
請自己去參考
謝謝御津闇慈學長的指教,
可否告訴我是那一版的TOP5,
因為竹貓有很多種TOP5,
記得有一種是切換式的,
我不想要那種 :-D
w2812451
星球公民
星球公民
文章: 255
註冊時間: 2005-07-16 21:38

文章 w2812451 »

虛擬貨幣是哪一種的?
ˊˋ銀行裡面的還是身上的!
故天將降大任於是人也,必先苦其心志,勞其筋骨,餓其體膚,空乏其身,行拂亂其所為,所以動心忍性,曾益其所不能。然後知生於憂患而死於安樂也。
☆╮¥藍 天 星 雨£╭★
chsa
星球公民
星球公民
文章: 259
註冊時間: 2004-12-27 20:45

文章 chsa »

w2812451 寫:虛擬貨幣是哪一種的?
ˊˋ銀行裡面的還是身上的!
你搞笑嗎? 虛擬貨幣
w2812451
星球公民
星球公民
文章: 255
註冊時間: 2005-07-16 21:38

文章 w2812451 »

chsa 寫:
w2812451 寫:虛擬貨幣是哪一種的?
ˊˋ銀行裡面的還是身上的!
你搞笑嗎? 虛擬貨幣
聽不懂!真的
故天將降大任於是人也,必先苦其心志,勞其筋骨,餓其體膚,空乏其身,行拂亂其所為,所以動心忍性,曾益其所不能。然後知生於憂患而死於安樂也。
☆╮¥藍 天 星 雨£╭★
問題狂
竹貓忠實會員
竹貓忠實會員
文章: 1947
註冊時間: 2004-06-28 17:13

文章 問題狂 »

w2812451 寫:虛擬貨幣是哪一種的?
ˊˋ銀行裡面的還是身上的!
這個解釋怪怪的
虛擬貨幣有很多種\r
通常是以在資料庫內的欄位來區分的
較常用的有"user_points"和"user_money"兩種
一般來說如果只要用的是同一種欄位的貨幣的話\r
不管在銀行,股市或是RPG等都是通用的
chsa
星球公民
星球公民
文章: 259
註冊時間: 2004-12-27 20:45

文章 chsa »

痾..,可以回到我的問題嗎?(TOP5)
w2812451
星球公民
星球公民
文章: 255
註冊時間: 2005-07-16 21:38

文章 w2812451 »

chsa 寫:痾..,可以回到我的問題嗎?(TOP5)
這很簡單寫阿ˊˋ
$sql = 'SELECT username, user_money FROM phpbb_users u ORDER BY user_money DESC LIMIT 0, 5';
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, '無法取得金錢 TOP5列表!!', '', __LINE__, __FILE__, $sql);
}

if ( $row = $db->sql_fetchrow($result) )
{
$i = 1;
$mt5 = '<table class="forumline" width="?%" cellspacing="1" cellpadding="3" border="0">
<tr><td align="center" class="catLeft"><b><span class="gen">名次</span></b></td>
<td align="center" class="catLeft"><b><span class="gen">金錢TOP5</span></b></td></tr>';
do
{
$mt5 .= '<tr><td class="row3" align="center"><span class="gensmall">第' . $i .'名'
'</span></td><td class="catLeft"><span class="gensmall">' . $row['username'] .
'</span></td></tr>';
$i++;
}
while ( $row = $db->sql_fetchrow($result) );
$mt5 .= '</table>';
}
然後下面的
XXXX = $mt5,
自己弄喔
上面的user_money自己改成正確的!
這樣應該對!
故天將降大任於是人也,必先苦其心志,勞其筋骨,餓其體膚,空乏其身,行拂亂其所為,所以動心忍性,曾益其所不能。然後知生於憂患而死於安樂也。
☆╮¥藍 天 星 雨£╭★
ETERNAL
星球公民
星球公民
文章: 297
註冊時間: 2002-01-23 11:23

文章 ETERNAL »

這功能是top5改出來的
下面是網站上的程式碼,參考看看吧\r

1.熱門前五大\r

代碼: 選擇全部

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html LANG="zh-TW">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=big5">
	<title>Untitled</title>
</head>
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" bgcolor="#F2F8FF">
<STYLE type="text/css">
td{ font-size: 10pt; font-family: verdana }
</STYLE>
<table align="center" bgcolor="#F2F8FF">
<?
define('FORUMS_TABLE', 'phpbb_forums');
define('TOPICS_TABLE', 'phpbb_topics');
	define('IN_PHPBB', true);
	$phpbb_root_path = './';
	include($phpbb_root_path . 'config.php');
	include($phpbb_root_path . 'extension.inc');
	include($phpbb_root_path . 'includes/db.'.$phpEx);

// 
// Mod setting 
// 
// Topics text length 
$MAX_STR_LEN = 26; 
// Topics to display 
$MAX_TOPICS = 5; 
// 0 => users can see all topics including authorized issue(but they cant read the posts) 
// 1 => users can see only authorized topics 


function cutStr($str) { 

   global $MAX_STR_LEN; 

   $str = (strlen($str) > $MAX_STR_LEN) ? (substr($str, 0, $MAX_STR_LEN - 1) . "...") : $str; 
   return $str; 
} 


$sql = "SELECT topic_id, topic_title
   FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f 
   WHERE t.forum_id = f.forum_id 
   AND t.topic_moved_id = '0' and f.auth_view=0 and t.topic_type = '0'
   ORDER BY t.topic_views DESC LIMIT 0, $MAX_TOPICS"; 

if( !$result = $db->sql_query($sql) ) 
{ 
   echo '<p align="center"><font color="red"><b>ADV_TOPN_MOD TOPICS QUERY ERROR!!</b></font></p>'; 
   exit; 
} 


// fetch rows 
while( $rows = $db->sql_fetchrow($result) ) 
{ 
	echo "<tr><td><a href=\"http://www.2233.idv.tw/viewtopic.php?t=".$rows['topic_id']."\" target=\"_blank\">".cutStr($rows["topic_title"])."</a></td></tr>";
}
$db->sql_freeresult($rows);
$db->sql_close();
?>
</table>
2.評價前五大\r

代碼: 選擇全部

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html LANG="zh-TW">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=big5">
	<title>Untitled</title>
</head>
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" bgcolor="#F2F8FF">
<STYLE type="text/css">
td{ font-size: 10pt; font-family: verdana }
</STYLE>
<table align="center" bgcolor="#F2F8FF">
<?
define('FORUMS_TABLE', 'phpbb_forums');
define('TOPICS_TABLE', 'phpbb_topics');
	define('IN_PHPBB', true);
	$phpbb_root_path = './';
	include($phpbb_root_path . 'config.php');
	include($phpbb_root_path . 'extension.inc');
	include($phpbb_root_path . 'includes/db.'.$phpEx);

// 
// Mod setting 
// 
// Topics text length 
$MAX_STR_LEN = 26; 
// Topics to display 
$MAX_TOPICS = 5; 
// 0 => users can see all topics including authorized issue(but they cant read the posts) 
// 1 => users can see only authorized topics 


function cutStr($str) { 

   global $MAX_STR_LEN; 

   $str = (strlen($str) > $MAX_STR_LEN) ? (substr($str, 0, $MAX_STR_LEN - 1) . "...") : $str; 
   return $str; 
} 

$sql_select = 't.topic_title, t.rating_rank_id AS topic_rating, p.rating_rank_id AS post_rating, t.topic_id, ro.points AS label2, SUM(ro.points) AS points';
$sql_from = ' phpbb_rating r, '. TOPICS_TABLE . ' t, phpbb_posts p, ' . FORUMS_TABLE . ' f, phpbb_rating_option ro ';
$sql_where = "r.post_id = p.post_id 
AND p.topic_id = t.topic_id 
AND t.topic_status = 0
AND t.forum_id = f.forum_id 
AND f.auth_view=0 
AND r.option_id = ro.option_id
GROUP BY p.post_id ORDER BY points DESC LIMIT 0, $MAX_TOPICS";
$sql ="select " .$sql_select." from ".$sql_from." where ".$sql_where;
if( !$result = $db->sql_query($sql) ) 
{ 
   echo '<p align="center"><font color="red"><b>ADV_TOPN_MOD TOPICS QUERY ERROR!!</b></font></p>'; 
   exit; 
} 


// fetch rows 
while( $rows = $db->sql_fetchrow($result) ) 
{ 
	echo "<tr><td><a href=\"http://www.2233.idv.tw/viewtopic.php?t=".$rows['topic_id']."\" target=\"_blank\">".cutStr($rows["topic_title"])."</a></td></tr>";
}
$db->sql_freeresult($rows);
$db->sql_close();
?>
</table>
3.回覆前五大\r

代碼: 選擇全部

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html LANG="zh-TW">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=big5">
	<title>Untitled</title>
</head>
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" bgcolor="#F2F8FF">
<STYLE type="text/css">
td{ font-size: 10pt; font-family: verdana }
</STYLE>
<table align="center" bgcolor="#F2F8FF">
<?
define('FORUMS_TABLE', 'phpbb_forums');
define('TOPICS_TABLE', 'phpbb_topics');
	define('IN_PHPBB', true);
	$phpbb_root_path = './';
	include($phpbb_root_path . 'config.php');
	include($phpbb_root_path . 'extension.inc');
	include($phpbb_root_path . 'includes/db.'.$phpEx);

// 
// Mod setting 
// 
// Topics text length 
$MAX_STR_LEN = 26; 
// Topics to display 
$MAX_TOPICS = 5; 
// 0 => users can see all topics including authorized issue(but they cant read the posts) 
// 1 => users can see only authorized topics 


function cutStr($str) { 

   global $MAX_STR_LEN; 

   $str = (strlen($str) > $MAX_STR_LEN) ? (substr($str, 0, $MAX_STR_LEN - 1) . "...") : $str; 
   return $str; 
} 


$sql = "SELECT topic_id, topic_title
   FROM " . TOPICS_TABLE . " t, " . FORUMS_TABLE . " f 
   WHERE t.forum_id = f.forum_id 
   AND t.topic_moved_id = '0' and f.auth_view=0 and t.topic_type = '0'
   ORDER BY t.topic_replies DESC LIMIT 0, $MAX_TOPICS"; 

if( !$result = $db->sql_query($sql) ) 
{ 
   echo '<p align="center"><font color="red"><b>ADV_TOPN_MOD TOPICS QUERY ERROR!!</b></font></p>'; 
   exit; 
} 


// fetch rows 
while( $rows = $db->sql_fetchrow($result) ) 
{ 
	echo "<tr><td><a href=\"http://www.2233.idv.tw/viewtopic.php?t=".$rows['topic_id']."\" target=\"_blank\">".cutStr($rows["topic_title"])."</a></td></tr>";
}
$db->sql_freeresult($rows);
$db->sql_close();
?>
</table>
<body>
4.灌水前五大\r

代碼: 選擇全部

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html LANG="zh-TW">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=big5">
	<title>Untitled</title>
</head>
<body leftmargin="0" topmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" bgcolor="#F2F8FF">
<STYLE type="text/css">
td{ font-size: 10pt; font-family: verdana }
</STYLE>
<table align="center" bgcolor="#F2F8FF">
<?
define('FORUMS_TABLE', 'phpbb_forums');
define('TOPICS_TABLE', 'phpbb_topics');
define('USERS_TABLE', 'phpbb_users');
	define('IN_PHPBB', true);
	$phpbb_root_path = './';
	include($phpbb_root_path . 'config.php');
	include($phpbb_root_path . 'extension.inc');
	include($phpbb_root_path . 'includes/db.'.$phpEx);

// 
// Mod setting 
// 
// Topics text length 
$MAX_STR_LEN = 30; 
// Topics to display 
$MAX_TOPICS = 5; 
// 0 => users can see all topics including authorized issue(but they cant read the posts) 
// 1 => users can see only authorized topics 


function cutStr($str) { 

   global $MAX_STR_LEN; 

   $str = (strlen($str) > $MAX_STR_LEN) ? (substr($str, 0, $MAX_STR_LEN - 1) . "...") : $str; 
   return $str; 
} 


$sql = "SELECT user_id, username,user_posts
   FROM " . USERS_TABLE . " t 
   WHERE t.user_active = 1 
   ORDER BY user_posts DESC LIMIT 0, $MAX_TOPICS"; 

if( !$result = $db->sql_query($sql) ) 
{ 
   echo '<p align="center"><font color="red"><b>ADV_TOPN_MOD TOPICS QUERY ERROR!!</b></font></p>'; 
   exit; 
} 


// fetch rows 
while( $rows = $db->sql_fetchrow($result) ) 
{ 
	echo "<tr><td><a href=\"http://www.2233.idv.tw/profile.php?mode=viewprofile&u=".$rows['user_id']."\" target=\"_blank\">".$rows["username"]."</a> 發表了 ".$rows["user_posts"]."篇文章</td></tr>";
}
$db->sql_freeresult($rows);
$db->sql_close();
?>
</table>
水色論壇 http://www.et99.net
簡德賢分享
小爆
星球公民
星球公民
文章: 86
註冊時間: 2005-07-22 12:46
聯繫:

文章 小爆 »

這.......樣的外掛有人寫過嗎??.....
ETERNAL大大提供的 我可以把他改寫成外掛貼出來嗎?? 還是大大不同意呢??
咖啡不加糖
星球公民
星球公民
文章: 99
註冊時間: 2005-08-23 22:14
聯繫:

文章 咖啡不加糖 »

這個有裝子分區的統計好像會怪怪的=_=..
●架設主機作業系統:LlNUX
●我安裝的程式:Apache 2.2.8 + php 5.2.6 + MySQL 5.0.45
●我的 phpBB2 版本:phpBB 3.0.1
jacktu
星球普通子民
星球普通子民
文章: 10
註冊時間: 2005-11-07 16:45

文章 jacktu »

請問這種TOP5的改良版已有大大研究出來了嗎?
剛看了一下水色論壇好像無法進入了..
目前只有在神川小羽大大的網站上有看到此種類似的TOP5功能..
而之前的i-top5 topic外掛也找不到載點..
國外的phpbb論壇好像也沒有..
難到真的沒有辦法了嗎? :cry:

3/30更新~
已在小羽大大的網站上獲得解答!
再次感謝小羽大大的幫忙哦! :mrgreen:
t54185
星球公民
星球公民
文章: 72
註冊時間: 2006-08-24 12:48

文章 t54185 »

架構中 標記 學習

適用於 2.0.22 !!
主題已鎖定

回到「外掛問題討論」