Discuz教程网

[代码修改] 会员每日登入社区奖励积分 For Discuz 7.2

[复制链接]
authicon 小白 发表于 2013-4-5 09:53:09 | 显示全部楼层 |阅读模式
效果图:

20131.jpg

include/common.inc.php
找到
  1. $pluginhooks = array();
复制代码
在上面添加
  1. if($discuz_uid)
  2. {
  3.         if(gmdate("Y-m-d",$timestamp) != gmdate("Y-m-d",$lastvisit))
  4.         {
  5.    updatecredits($discuz_uid,array('1'=>10),1,"lastvisit=$timestamp");
  6.    //updatecredits($discuz_uid,array('1'=>10,'2'=>20),1,"lastvisit=$timestamp");
  7.    //上面那个是多积分的
  8.    $IsAward=true;
  9.         }
  10. }
复制代码
template/default/footer.htm
找到
  1. {eval output();}
复制代码
在上面添加
  1. <!--{if $IsAward}--><script type="text/javascript">showPrompt(null,null,"每日登陆奖励积分+10",3000);</script><!--{/if}-->
复制代码
3000是毫秒数,3000就是显示3秒

--------------

来自 官方论坛版主 肥爷指点 实现动态随机奖励代码如下
游客,如果您要查看本帖隐藏内容请回复



上一篇:1314学习网签到记录贴-2013年4月5日
下一篇:Discuz7.x论坛备份数据互补工具
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

1314学习网 ( 浙ICP备10214163号 )

GMT+8, 2025-5-3 15:17

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表