Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[发布] 猪头术 2.0 for Discuz! 6.0

[复制链接]
Arice 发表于 2007-12-12 23:32:08 | 显示全部楼层 |阅读模式
本帖最后由 Arice 于 2012-3-8 18:59 编辑

猪头术 2.0 for Discuz! 6.0

名称: 猪头术 2.0 for Discuz! 6.0
适用: Discuz! 6.0.0
作者: HPotter
升级:Arice
美化:Arice
版本:2.0
演示: http://bbs.tkxxd.com/plugin.php?identifier=pig&module=pig (谁的装好了也可提供演示)
相比 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

找到
  1. $fieldsadd
复制代码
记得前面有空格

在空格前面加
  1. , mf.pighead
复制代码
找到
  1. if($showavatars) {
复制代码
在下面的if前面加
  1. global $timestamp;
  2.                         if($post['pighead']) {//判断是否有猪头
  3.                                 @include DISCUZ_ROOT.'./forumdata/cache/plugin_pig.php';
  4.                                 if($_DPLUGIN['pig']['vars']['pig_status']) {
  5.                                         $post['pigheadarray'] = explode("\t", $post['pighead']);
  6.                                         $post['pigheadtype'] = $post['pigheadarray'][0];
  7.                                         $post['pigheadovertime'] = $post['pigheadarray'][1];
  8.                                 }
  9.                         }
  10.                         if($post['pigheadtype'] && $post['pigheadovertime'] > $timestamp + $_DCACHE['settings']['timeoffset'] * 3600) {//判断是否显示猪头
  11.                                 $post['avatar'] = '<div class="avatar"><img src="./images/plugins/pig/'.$post['pigheadtype'].'.gif" width="100" height="160" border="0" alt="我是猪头&#10&#10被诅咒中....&#10恢复时间:'.gmdate('Y-n-d H:i', $post['pigheadovertime']).'" />';
  12.                         } else
复制代码
4、修改 include/viewpro.inc.php

找到
  1. $uid = $member['uid'];
复制代码
在下面加
  1. if($member['pighead']) {//增加猪头显示
  2.         @include DISCUZ_ROOT.'./forumdata/cache/plugin_pig.php';
  3.         if($_DPLUGIN['pig']['vars']['pig_status']) {
  4.                 $member['pigheadarray'] = explode("\t", $member['pighead']);
  5.                 $member['pigheadtype'] = $member['pigheadarray'][0];
  6.                 $member['pigheadovertime'] = $member['pigheadarray'][1];
  7.                 if($member['pigheadtype'] && $member['pigheadovertime'] > $timestamp + $_DCACHE['settings']['timeoffset'] * 3600) {
  8.                         $member['avatar'] = './images/plugins/pig/'.$member['pigheadtype'].'.gif';
  9.                         $member['avatarwidth'] = '100';
  10.                         $member['avatarheight'] = '160';
  11.                 }
  12.         }
  13. }
复制代码

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x

评分

4

查看全部评分

 楼主| Arice 发表于 2007-12-12 23:32:26 | 显示全部楼层
升级方法
本版本不支持 1.0 的直接升级。

如果以前有装过 1.0 的,请按如下步骤操作:
1、将 viewthread.php 和 include/viewpro.inc.php 所做的修改还原。
2、到后台插件管理处删除 猪头术 这个插件
3、上传本程序覆盖 1.0 的程序
4、运行 http://您的论坛地址/pig_install.php 安装 2.0



[ 本帖最后由 Arice 于 2007-12-13 00:12 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

x
回复

使用道具 举报

realkang2 发表于 2007-12-12 23:36:48 | 显示全部楼层
说明一下做什么用的吧 :)
回复

使用道具 举报

零风 发表于 2007-12-12 23:37:07 | 显示全部楼层
ding.....................\
回复

使用道具 举报

玻璃屋女孩 发表于 2007-12-12 23:37:20 | 显示全部楼层
强烈支持
回复

使用道具 举报

安全出口2 发表于 2007-12-12 23:38:37 | 显示全部楼层
顶啦:) :)
回复

使用道具 举报

jeep2007 发表于 2007-12-12 23:45:00 | 显示全部楼层
不错,谢谢
回复

使用道具 举报

爱雪的人 发表于 2007-12-12 23:45:54 | 显示全部楼层
前排不容易啊!!!
回复

使用道具 举报

爱雪的人 发表于 2007-12-12 23:46:48 | 显示全部楼层
我现在使用的那个如何卸载呢,楼主
回复

使用道具 举报

 楼主| Arice 发表于 2007-12-12 23:51:28 | 显示全部楼层
请看二楼
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-6-29 12:32 , Processed in 0.209634 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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