第一步:
升級資料庫
ALTER TABLE `pw_forums` ADD `renqi` INT( 8 ) DEFAULT '0' NOT NULL AFTER `topic` ;
第二步:
修改 requre/forum.php檔案
在最頂部:
<?php
之後加入:
$query = $db->query("UPDATE pw_forums SET renqi=renqi+'1' where fid='$fid' ");
第三步:
在index.php
查找:
$query = $db->query("SELECT fid、fup、type,logo,name、descrip,forumadmin,tpost,topic
在,topic之後加入:
,renqi
第四步:
修改index.htm範本
查找
$forum[name]
在後面加入:
<font face="Trebuchet MS" style="font-size: 7pt">HIT </font>
<font color="#808080" face="Georgia" style="font-size: 8pt">$forums[renqi]</font>
好了,刷新首頁,就能在板塊名稱之後看到人氣值了。
如果要限制會員看到該值,只允許管理員查看,第四步改成這樣:
修改index.htm範本
查找
$forum[name]
在後面加入:
<!--
EOT;
if($windid==$manager ||$SYSTEM['allowadmincp']){print <<<EOT
--><font face="Trebuchet MS" style="font-size: 7pt">HIT </font>
<font color="#808080" face="Georgia" style="font-size: 8pt">$forums[renqi]</font>
<!--
EOT;
}print <<<EOT
-->
| 歡迎光臨 中央論壇 - CENTER BBS (https://mail.centerbbs.com/) | Powered by Discuz! X3 |