1 頁 (共 1 頁)

[問題]PHPBB2.0.5與人氣指數外掛相容問題

發表於 : 2003-07-01 15:13
[=AZN-TW=]Frank
●快速架站程式:Appserv 1.8
●您的上網方式:ADSL
●您的 phpBB2 版本:phpBB 2.05

我原本是用PHPBB2.0.4 用加上人氣指數外掛都沒問題
但是換成2.0.5之後就有問題了

只要我加上這段\r

代碼: 選擇全部

// RPG Ranking Hack 
   if($postrow[$i]['user_id'] != ANONYMOUS ) 
   { 
      $sql = "SELECT COUNT(topic_id) AS count_topics, " . 
             "SUM(topic_replies) AS sum_topic_replies, " . 
             "SUM(topic_views) AS sum_topic_views " . 
             "FROM " . TOPICS_TABLE . " " . 
             "WHERE topic_poster = " . $postrow[$i]['user_id']; 

                $result = $db->sql_query($sql); 
                $rr_row = $db->sql_fetchrow($result); 

                // 發表的主題總數 
                $count_topics = $rr_row['count_topics']; 

                // 所有主題的回應總數 
                $sum_topic_replies = $rr_row['sum_topic_replies']; 

                // 主題人氣(觀看數) 
                $sum_topic_views = $rr_row['sum_topic_views']; 

      $profiledata = get_userdata_from_id($postrow[$i]['user_id']); 

                // 發文總數 
                $sum_posts = $postrow[$i]['user_posts']; 

                // 回應文章總數 = 發文總數 - 發表的主題總數 
                $count_replies = $sum_posts - $count_topics; 

                                // 魅力值 = (發表的主題總數*100 + 所有主題的回應總數*5 + 回應文章總數*100 + 主題人氣(

觀看數)) / ((發文總數+1)*100) 
      $rr_hack = ($count_topics * 100 + $sum_topic_replies * 5 + $count_replies * 100 + $sum_topic_views) / 

(($sum_posts+1)*100); 

                // 取小數點後一位 
                $rr_hack = "魅力值: " . sprintf("%01.2f", $rr_hack); 
   } 
   else 
   { 
      $rr_hack = "";    
   }
觀看文章就會一片空白...是不相容嗎?

發表於 : 2003-07-01 15:42
Mowd
會空白是程式碼有問題吧!

發表於 : 2003-07-02 15:45
hayosa
我是2.05 沒問題....
但是不用竹貓的公式為何就會倒扣人氣指數呀?

發表於 : 2003-07-06 23:20
syk1986
我也是用2.0.5但卻不行...

Fatal error: Call to undefined function: get_userdata_from_id() in c:\appserv\www\phpbb\viewtopic.php on line 1221

進入主題就出問題了>..<


不知道get_userdata_from_id是什麼意思

發表於 : 2003-07-07 00:54
白爛賤客
這篇有提到了
http://phpbb-tw.net/phpbb/viewtopic.php ... t=%BEy%A4O
試著把
[php]$profiledata = get_userdata_from_id($postrow[$i]['user_id']);
[/php]
改成
[php]$profiledata = get_userdata($postrow[$i]['user_id']);[/php]