Mowd 寫:你在view_topic.tpl這個檔案的修改錯誤,請檢查是否正確。
感謝版大的回覆
小弟又再從新檢視一次\r
可是版大\r
安裝此MOD所動到修改的檔案有:
第一篇:viewtopic.php , /templates/template_dirXX/viewtopic_body.tpl ,
第二篇:includes/usercp_viewprofile.php , templates/your_template/profile_view_body.tpl ,
第三篇: includes/usercp_viewprofile.php , lang_main.php , profile_view_body.tpl
其中並沒有去動到版大你所說的view_topic.tpl 這個檔耶\r
看來看去比較像的是第一篇裡的viewtopic.php或是viewtopic_body.tpl
小弟有再度確認過還是沒有錯誤
在原始的viewtopic.php檔裡面:
開啟viewtopic.php,找到\r
代碼: 選擇全部
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
在下面加上
代碼: 選擇全部
//
// RPG Ranking Hack by OOHOO
//
$user_id = $postrow[$i]['user_id'];
if($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 = " . $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($postrow[$i]['user_id']);
// 發文總數
$sum_posts = $profiledata['user_posts'];
// 回應文章總數 = 發文總數 - 發表的主題總數
$count_replies = $sum_posts - $count_topics;
// 魅力值 = (發表的主題總數*100 + 所有主題的回應總數*50 + 回應文章數*75 + 主題人氣(觀看數)*2) / (50 + 發文總數)
$rr_hack = ($count_topics * 100 + $sum_topic_replies * 50 + $count_replies * 75 + $sum_topic_views * 2) / (50 + $sum_posts);
// 取小數點後一位
$rr_hack = '人氣指數: <b><font color="#FF6633">' . sprintf("%01.2f", $rr_hack) . '</font></b>';
}
else
{
$rr_hack = "";
}
小弟的改完後是:
代碼: 選擇全部
$row_class = ( !($i % 2) ) ? $theme['td_class1'] : $theme['td_class2'];
//
// RPG Ranking Hack by OOHOO
//
$user_id = $postrow[$i]['user_id'];
if($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 = " . $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($postrow[$i]['user_id']);
// 發文總數
$sum_posts = $profiledata['user_posts'];
// 回應文章總數 = 發文總數 - 發表的主題總數
\n $count_replies = $sum_posts - $count_topics;
// 魅力值 = (發表的主題總數*100 + 所有主題的回應總數*50 + 回應文章數*75 + 主題人氣(觀看數)*2) / (50 + 發文總數)
$rr_hack = ($count_topics * 100 + $sum_topic_replies * 50 + $count_replies * 75 + $sum_topic_views * 2) / (50 + $sum_posts);
// 取小數點後一位
$rr_hack = '人氣指數: <b><font color="#FF6633">' . sprintf("%01.2f", $rr_hack) . '</font></b>';
}
else
{
$rr_hack = "";
}
接著找到\r
代碼: 選擇全部
'DELETE' => $delpost,
在下面加上
代碼: 選擇全部
'RR_HACK' => $rr_hack, // RPG Ranking Hack by OOHOO
小弟的改完後是:
代碼: 選擇全部
'DELETE' => $delpost,
'RR_HACK' => $rr_hack, // RPG Ranking Hack by OOHOO
在原始的viewtopic_body.tpl檔裡面:
開啟/templates/template_dirXX/viewtopic_body.tpl,找到\r
代碼: 選擇全部
{postrow.POSTER_JOINED}<br />
{postrow.POSTER_POSTS}<br />
{postrow.POSTER_FROM}</span><br />
在適當位置加上
代碼: 選擇全部
{postrow.RR_HACK}<br />
因為這只是上下順序的排列
小弟對於順序的排列有做了一下調整\r
但是還是在這一大行的裡面\r
小弟的改完後是:(紅色的字部分就是插入的代碼)
代碼: 選擇全部
{postrow.POSTER_POSTS}<br />[color=#ee0000]{postrow.RR_HACK}<br />[/color]{postrow.POSTER_MONEY}<br />{postrow.POSTER_POINTS}<br />{postrow.POSTER_AUTH_VALUE}<br />{postrow.POSTER_JOINED}<br />{postrow.POSTER_FROM}
可否請版大幫小弟再看一下
然後再給小弟明示一下呢??
謝謝!!