返回列表 回复 发帖

无心宠物 原版安装(含最新版补丁)

无心宠物V2.3 For Discuz! 6.0(简体GBK)
声明1:安装插件存在风险,安装前请考虑清楚,对于安装此插件所造成的文件、数据丢失、系统安全问题,一概不负责。
声明2:在插件的编写过程中,已尽量避免了bug的产生,但水平有限,难免出现疏忽,如果遇到Bug,请及时反映
相关下载

宠物源程序:  

宠物图片包:

20080214在2.3基础上升级程序(安装说明见2楼):
压缩包的文件说明

Web目录:此目录里所有文件必须上传到您的论坛根目录下

discuz_plugin_wxpet.txt:无心宠物的插件数据

pet_install.php文件:无心宠物V2.3全新数据库安装程序

pet_upgrade.php文件:无心宠物V2.3数据库升级程序,适合从V1.75升级到V2.3
V2.3升级安装说明
1.在宠物后台关闭宠物中心

2.备份数据库,防止意外发生

3.上传Web目录所有文件到论坛根目录下覆盖原来的文件

4.上传pet_upgrade.php 文件到论坛根目录下

5.运行http://您的论坛地址/pet_upgrade.php,执行数据库升级操作,然后删除此文件

6.petshop/log目录petshop/system目录的权限设置:Windows系统设置可写权限,Unix系统设置属性为777
  说明:以前安装和升级过程中设置过了的,就不用设置了

7.请到论坛后台重新导入插件数据discuz_plugin_wxpet.txt  

   说明:此插件无需在论坛后台设置插件参数,直接启用此插件就可以了

8.更新缓存

V2.3全新安装说明
1.备份论坛数据库,防止意外发生

2.上传Web目录所有文件到论坛根目录下

3.解压缩宠物图片包,把图片Pet目录上传到论坛的images目录下

4.上传pet_install.php 文件到论坛根目录下

5.运行http://您的论坛地址/pet_install.php,执行数据库安装操作,然后删除此文件

6.修改文件include/db_mysql.class.php文件

找到:
  1. function version() {
复制代码
在上面添加:
  1.         function query_first($query_string) {
  2.                 $query_id = $this->query($query_string);
  3.                 $returnarray=$this->fetch_array($query_id);
  4.                 $this->free_result($query_id);
  5.                 return $returnarray;
  6.         }
复制代码
说明:此函数为把原有的query和fetch_array函数结合在一起,方便对只有一条数据的查询
   
7.修改templates\default\actions.lang.php文件
  找到:
  1. 211 => '修改系统设置',
复制代码
在下面添加:
  1. 222 => '宠物中心',
复制代码
8.请到论坛后台导入插件数据discuz_plugin_wxpet.txt  

   说明:此插件无需在论坛后台设置插件参数,直接启用此插件就可以了

9.把下载的宠物图片包Pet.rar上传到images目录供您论坛会员下载,用于宠物图片本地化

11.petshop/log目录petshop/system目录的权限设置:Windows系统设置可写权限,Unix系统设置属性为777

12.到论坛后台更新缓存

13.全新安装完毕,所以论坛管理员都拥有宠物GM权限

14.请用论坛管理员帐号登陆论坛进入宠物管理后台设置相关参数,如:其他宠物GM,论坛币积分字段

宠物信息贴内显示 For Discuz 6.0
当前修改仅限在默认DZ6.0文件下,如果您安装了其他相关贴内显示,以下查找和修改的地方仅供参考
需要更改的文件:
    viewthread.php
   templates/default/viewthread.htm

   (请务必先备份,以便出错后可以覆盖恢复)


一、viewthread.php 文件

1、查找
  1. mf.spacename
复制代码
在其后面紧跟着插入
  1. , pd.petname, pd.mypetpic, pd.pettype, pd.mypetjob, pd.mypetlevel, pd.mypetexp, pd.mypethp, pd.mypetmaxhp, pd.mypetsp, pd.mypetmp, pd.mypetmaxmp, pd.mypetgood, pd.mypetdead
复制代码
2、查找
  1. LEFT JOIN {$tablepre}memberfields mf ON mf.uid=m.uid
复制代码
在其下面插入
  1. LEFT JOIN {$tablepre}wxpetdata pd ON pd.username=m.username
复制代码
3、查找
  1. if(!$newpostanchor && $post['dateline'] > $lastvisit) {
复制代码
在其上面插入
  1. //宠物数据>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  2. if($post['petname']!=''){
  3.         $petjob = $post['mypetjob'];
  4.         $petlevel= $post['mypetlevel'];
  5.         $levelpic = ($petlevel/10)>11?11:intval($petlevel/10);
  6.         if ($petjob == 0 or ($petjob <=3 && $petlevel < 200) or $post['mypetpic']=='') {
  7.                 $post['petpic'] = "<img src=images/pet/pet/$post[pettype]/$post[pettype]$levelpic.gif border=0>";
  8.         } else {
  9.                 $post['petpic'] = "<img src=$post[mypetpic] border=0>";
  10.         }
  11.                         
  12.         $petlevelfloor = pow (log10 (ceil($post['mypetexp']/ ($petjob * 0.2 + 1))), 3);
  13.         $epf=intval (100 * ($petlevelfloor - intval ($petlevelfloor)));
  14.         $hpf = floor (100 * ($post['mypethp'] / $post['mypetmaxhp']));
  15.         $mpf = $post['mypetmaxmp']?(floor (100 * ($post['mypetmp'] / $post['mypetmaxmp']))):0;
  16.         $spf = floor (100 * ($post['mypetsp'] / 5000)) - 1;
  17.         $post['epf']=$epf>97?97epf;
  18.         $post['hpf']=$hpf>97?97hpf;
  19.         $post['mpf']=$mpf>97?97mpf;
  20.         $post['spf']=$spf>97?97spf;
  21.                         
  22.         $post['petdead']= $post['mypetdead']?'死亡':'生存';
  23.         $petgood = $post['mypetgood'];   
  24.         if ($petgood >= 100) {
  25.                 $post['shit'] = "死忠";
  26.         }elseif($petgood >=50) {
  27.                 $post['shit']="忠诚";
  28.         }elseif($petgood >= -50) {
  29.                 $post['shit'] = "猜疑";
  30.         }elseif($petgood > -100) {
  31.                 $post['shit'] = "厌恶";
  32.         }else{
  33.                 $post[shit] = "<font color=red>不鸟!</font>";
  34.         }
  35. }
  36. //宠物数据<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<               
复制代码
二、修改 template/default/viewthread.htm

查找:
                                
<script type="text/javascript">zoomstatus = parseInt($zoomstatus);</script>
在其下面插入
                                
<script type="text/javascript">
function showpetinfo(obj,s){
        if(document.getElementById(obj).style.display=='none'){
                document.getElementById(obj).style.display='block';
                document.getElementById(s).innerHTML='[<font color=darkgreen>隐藏宠物资料</font>]';
        }else{
                document.getElementById(obj).style.display='none';
                document.getElementById(s).innerHTML='[<font color=blue>显示宠物资料</font>]';
        }
}
</script>
查找:
                                
                                                        {lang member_deleted}
                                                <!--{/if}-->
                                        <!--{/if}-->
说明:此处可以进行模糊查找,查找 {lang member_deleted}

在其下面插入
<!--{if $post[petname]}-->
<div align="left">
<font color=red>宠物名字:</font><a href="pet.php?index=viewpet&username=$post[author]">$post[petname]</a><br>
<span style="cursor:hand;"  id=block$post[number] title="显示/隐藏 宠物资料">[<font color=blue>显示宠物资料</font>]</span><br />
<div id=none$post[number] style=display:none>
<div align="center">$post[petpic]</div>
宠物状态: $post[petdead] $post[shit]<br>
宠物级别: $post[mypetjob] 转/ $post[mypetlevel] 级<br>
HP:  $post[mypethp] /  $post[mypetmaxhp]<br>
        <table width='120px' border='0' cellspacing='0' cellpadding='0' bordercolor='#000000'>
                <tr>
                <TD style="padding:0px;" width=3 height=13><IMG height=13 src='images/pet/rpg/img_left.gif' width=3></TD>
                <TD style="padding:0px;" height=13 background= "images/pet/rpg/img_backing.gif" ><img src='images/pet/rpg/orange.gif' width=' $post[hpf]%' height='9'><img src=' images/pet/rpg/hp.gif' height='9'></td>
                <TD style="padding:0px;" width=3 height=13><IMG height=13 src='images/pet/rpg/img_right.gif' width=3></TD>
                </tr>
        </table>
MP:  $post[mypetmp] /  $post[mypetmaxmp]<br>
        <table width='120' border='0' cellspacing='0' cellpadding='0' bordercolor='#000000'>
                <tr>
                <TD style="padding:0px;" width=3 height=13><IMG height=13 src='images/pet/rpg/img_left.gif' width=3></TD>
                <TD style="padding:0px;" height=13 background="images/pet/rpg/img_backing.gif"><img src='images/pet/rpg/blue.gif' width=' $post[mpf]%' height='9'><img src=' images/pet/rpg/exp.gif' height='9'></td>
                <TD style="padding:0px;" width=3 height=13><IMG height=13 src='images/pet/rpg/img_right.gif' width=3></TD>
                </tr>
        </table>
SP:  $post[mypetsp] /  5000<br>
        <table width='120' border='0' cellspacing='0' cellpadding='0' bordercolor='#000000'>
                <tr>
                <TD style="padding:0px;" width=3 height=13><IMG height=13 src='images/pet/rpg/img_left.gif' width=3></TD>
                <TD style="padding:0px;" height=13 background="images/pet/rpg/img_backing.gif"><img src=' images/pet/rpg/green.gif' width='$post[spf]%' height='9'><img src=' images/pet/rpg/mp.gif' height='9'></td>
                <TD style="padding:0px;" width=3 height=13><IMG height=13 src=' images/pet/rpg/img_right.gif' width=3></TD>
                </tr>
        </table>
EXP:  $post[epf]% <br>
        <table width='120' border='0' cellspacing='0' cellpadding='0' bordercolor='#000000'>
                <tr>
                <TD style="padding:0px;" width=3 height=13><IMG height=13 src='images/pet/rpg/img_left.gif' alt= $post[mypetexp] width=3></TD>
                <TD style="padding:0px;" height=13 background="images/pet/rpg/img_backing.gif"><img src='images/pet/rpg/blue.gif' width='$post[epf]%' alt= $post[mypetexp] height='9'><img src=' images/pet/rpg/exp.gif' height='9'></td>
                <TD style="padding:0px;" width=3 height=13><IMG height=13 src='images/pet/rpg/img_right.gif' alt= $post[mypetexp] width=3></TD>
                </tr>
        </table>
</div>
</div>               
<!--{/if}-->


附件: 您所在的用户组无法下载或查看附件
做一个快乐的!,建一个漂亮的"
修正目前已发现的Bug和一些功能的增加和改进

更新步骤:
一:你论坛必须已经安装了无心宠物V2.3版本
二:执行下面的SQL语句
ALTER TABLE `cdb_wxstorage` ADD `updatetime` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';
三:下载对应编码的程序包,解压缩,上传Web目录里所有文件覆盖原来的文件
四:到论坛后台更新缓存


补丁程序已经在1楼提供了.
附件: 您所在的用户组无法下载或查看附件
做一个快乐的!,建一个漂亮的"
呵呵,要自己有论坛才行丫。

回复 板凳 的帖子

我买了,看看是什么?哦,安装说明呀.
我们玩的这个要下不???????????
当然不要了.
做一个快乐的!,建一个漂亮的"
很恐怖啊
看得眼都花了。
好东西
高手!
返回列表