用了這個Style會令魅力指數的顏色改不了...
解決方法如下:
代碼: 選擇全部
*
*------ [Open viewtopic.php]
*
*
*------ [Find, Replace the Red Text]
*
//
// RPG Ranking Hack by OOHOO
//
$user_id = $postrow[$i]['user_id'];
if($user_id != ANONYMOUS )
{
if($user_id == 0)
{
$rr_hack = '人氣指數: [color=red]<b><span style="color:' . $theme['fontcolor1'] . ';">FULL</span></b>[/color]';
}
else if($user_id == 5)
{
$rr_hack = '人氣指數: [color=red]<b><span style="color:' . $theme['fontcolor2'] . ';">MAX</span></b>[/color]';
}
else if($user_id == 2)
{
$rr_hack = '人氣指數: [color=red]<b><span style="color:FF0000;">Unlimited</span></b>[/color]';
}
else
{
$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; \r
$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); \r
// 取小數點後一位
$rr_hack = '人氣指數: [color=red]<b><span style="color:' . $theme['fontcolor1'] . ';">' . sprintf("%01.2f", $rr_hack) . '</span></b>[/color]';
}
}
else
{
$rr_hack = "";
}