本帖最后由 Arice 于 2012-3-8 18:59 编辑
猪头术 2.0 for Discuz! 6.0
相比 1.0, 2.0 改进的地方:
1、模板重写,完全适应 Discuz! 6.0
2、数据库结构重构,加快程序执行效率
3、修改开关机制,关闭即可全站停用,方便站长全局控制
4、新增时间基数设置,灵活控制诅咒时间
5、新增天使保护用户组设置,免除一些用户组不必要的骚扰和保护弱小群体
6、新增查看自己的作案记录(诅咒记录)和行善记录(解咒记录)
等等代码上的修正。 安装说明:
1、解压后,将upload下的所有文件上传到论坛的根目录下
2、运行 http://您论坛访问地址/pig_install.php 进行安装,安装完成将 pig_install.php 删除
3、修改 viewthread.php
找到记得前面有空格
在空格前面加找到在下面的if前面加- global $timestamp;
- if($post['pighead']) {//判断是否有猪头
- @include DISCUZ_ROOT.'./forumdata/cache/plugin_pig.php';
- if($_DPLUGIN['pig']['vars']['pig_status']) {
- $post['pigheadarray'] = explode("\t", $post['pighead']);
- $post['pigheadtype'] = $post['pigheadarray'][0];
- $post['pigheadovertime'] = $post['pigheadarray'][1];
- }
- }
- if($post['pigheadtype'] && $post['pigheadovertime'] > $timestamp + $_DCACHE['settings']['timeoffset'] * 3600) {//判断是否显示猪头
- $post['avatar'] = '<div class="avatar"><img src="./images/plugins/pig/'.$post['pigheadtype'].'.gif" width="100" height="160" border="0" alt="我是猪头

被诅咒中....
恢复时间:'.gmdate('Y-n-d H:i', $post['pigheadovertime']).'" />';
- } else
复制代码 4、修改 include/viewpro.inc.php
找到在下面加- if($member['pighead']) {//增加猪头显示
- @include DISCUZ_ROOT.'./forumdata/cache/plugin_pig.php';
- if($_DPLUGIN['pig']['vars']['pig_status']) {
- $member['pigheadarray'] = explode("\t", $member['pighead']);
- $member['pigheadtype'] = $member['pigheadarray'][0];
- $member['pigheadovertime'] = $member['pigheadarray'][1];
- if($member['pigheadtype'] && $member['pigheadovertime'] > $timestamp + $_DCACHE['settings']['timeoffset'] * 3600) {
- $member['avatar'] = './images/plugins/pig/'.$member['pigheadtype'].'.gif';
- $member['avatarwidth'] = '100';
- $member['avatarheight'] = '160';
- }
- }
- }
复制代码
|
评分
-
4
查看全部评分
-
|