|
因為這篇 http://www.discuz.net/thread-766758-1-1.html
的求助,所以我試著去改出來了,分享給大家
原帖
http://www.discuz.net/thread-768720-1-1.html
試試註冊登錄就有增加
演示:
http://www.polewords.com/bbs/index.php
僅修改兩個文件而已,修改方法如下:
1.開啟 include/common.inc.php 檔
尋找- $lastvisit = empty($lastvisit) ? $timestamp - 86400 lastvisit;
- $timenow = array('time' => gmdate("$dateformat $timeformat", $timestamp + 3600 * $timeoffset),
- 'offset' => ($timeoffset >= 0 ? ($timeoffset == 0 ? '' : '+'.$timeoffset) timeoffset));
複製代碼 下面加入- if($discuz_user)
- {
- if(gmdate("Y-m-d",$timestamp) != gmdate("Y-m-d",$lastvisit))
- {
- $db->query("UPDATE {$tablepre}members SET extcredits2=extcredits2+10 , lastvisit=$timestamp WHERE username='$discuz_user'");
- $IsAward=true;
- }
- }
複製代碼 2.開啟 templates 目錄下您所使用風格目錄的 footer.htm 檔
尋找最底下的上面加入- <!--{if $IsAward}--><script language=JavaScript>alert('每日登入獎勵,系統已在你的現金中加了 10 元,請注意查收');
- </script><!--{/if}-->
複製代碼 完成,祝各位使用愉快 |
|