TShopping

 找回密碼
 註冊
搜索
查看: 2068|回復: 0
打印 上一主題 下一主題

[分享] [轉貼]每天登錄都有積分獎勵插件 for 6.0

[複製鏈接]
跳轉到指定樓層
1#
發表於 2008-5-31 12:43:29 | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
 
Push to Facebook
因為這篇 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 檔
尋找
  1. $lastvisit = empty($lastvisit) ? $timestamp - 86400 lastvisit;
  2. $timenow = array('time' => gmdate("$dateformat $timeformat", $timestamp + 3600 * $timeoffset),
  3.         'offset' => ($timeoffset >= 0 ? ($timeoffset == 0 ? '' : '+'.$timeoffset) timeoffset));
複製代碼
下面加入
  1. if($discuz_user)
  2. {
  3.         if(gmdate("Y-m-d",$timestamp) != gmdate("Y-m-d",$lastvisit))
  4.         {
  5.                 $db->query("UPDATE {$tablepre}members SET extcredits2=extcredits2+10 , lastvisit=$timestamp WHERE username='$discuz_user'");
  6.                 $IsAward=true;
  7.         }
  8. }
複製代碼
2.開啟 templates 目錄下您所使用風格目錄的 footer.htm 檔
尋找最底下的
  1. </body>
複製代碼
上面加入
  1. <!--{if $IsAward}--><script language=JavaScript>alert('每日登入獎勵,系統已在你的現金中加了 10 元,請注意查收');
  2. </script><!--{/if}-->
複製代碼
完成,祝各位使用愉快

 

臉書網友討論
*滑块验证:
您需要登錄後才可以回帖 登錄 | 註冊 |

本版積分規則



Archiver|手機版|小黑屋|免責聲明|TShopping

GMT+8, 2024-4-25 18:45 , Processed in 0.071760 second(s), 18 queries .

本論壇言論純屬發表者個人意見,與 TShopping綜合論壇 立場無關 如有意見侵犯了您的權益 請寫信聯絡我們。

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表