from:
http://www.discuz.net/thread-766185-1-1.html
第一步,修改
index.
php:
找到:
複製內容到剪貼簿
代碼:
include template('discuz');上面加
複製內容到剪貼簿
代碼:
// 分別統計論壇會員性別-首頁顯示 - START
$malenum = $femalenum = $nofmnum = 0;
$query = $db->query("SELECT gender FROM {$tablepre}members");
while($chk = $db->fetch_array($query)) {
if($chk['gender'] == '1') {
$malenum++;
} else if($chk['gender'] == '2') {
$femalenum++;
} else {
$nofmnum++;
}
}
// 分別統計論壇會員性別-首頁顯示 - END第二步:修改 ./templates/default/discuz.htm
找
複製內容到剪貼簿
代碼:
<em>$totalmembers</em>無
圖片直接顯示,請在後面加(不需要下載附件):
複製內容到剪貼簿
代碼:
/ 帥哥 <span style="color: blue">{$malenum}</span> 位 | 美女 <span style="color: red">{$femalenum}</span> 位 | 保密 <span style="color: green">{$nofmnum}</span> 位若要不同性別不同圖片顯示,請在後面加(下載附件上傳到論壇對應目錄。):
複製內容到剪貼簿
代碼:
, <img src="images/default/online_boy.gif" alt="帥哥" /> <span style="color: blue">{$malenum}</span> 位 <img src="images/default/online_girl.gif" alt="美女" /> <span style="color: red">{$femalenum}</span> 位 <img src="images/default/online_secret.gif" alt="保密" /> <span style="color: green">{$nofmnum}</span> 位[ 本帖最後由 wgding 於 2007-10-18 00:03 編輯 ]