1 頁 (共 1 頁)

[問題] index.php版面主題發表者跟文章瀏覽數

發表於 : 2005-06-02 16:53
yung821
請問為何有的論壇index.php版面上會有主題發表者跟文章瀏覽數.請問要如何增加這2個欄位呢??不是TOP5喔.是下面的版面.

發表於 : 2005-06-05 11:49
shihchieh

代碼: 選擇全部

//
// If you don't use these stats on your index you may want to consider
// removing them
//
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
$newest_uid = $newest_userdata['user_id'];

if( $total_posts == 0 )
{
	$l_total_post_s = $lang['Posted_articles_zero_total'];
}
else if( $total_posts == 1 )
{
	$l_total_post_s = $lang['Posted_article_total'];
}
else
{
	$l_total_post_s = $lang['Posted_articles_total'];
}

if( $total_users == 0 )
{
	$l_total_user_s = $lang['Registered_users_zero_total'];
}
else if( $total_users == 1 )
{
	$l_total_user_s = $lang['Registered_user_total'];
}
else
{
	$l_total_user_s = $lang['Registered_users_total'];
}
你可以試著研究這段,再以上面的變數找到tpl相對應的傳遞變數\r
然後在你要的地方上作增修

發表於 : 2005-06-06 09:09
yung821
我還是改不出來.對到眼睛都花了..........