返回顶部
首页 > 资讯 > CMS >无心宠物帖子内显示(玫瑰花 版)for pw6.0
  • 550
分享到

无心宠物帖子内显示(玫瑰花 版)for pw6.0

显示宠物帖子<>read"heightwidthsrc 2022-06-12 02:06:34 550人浏览 泡泡鱼
摘要

关键字描述:显示 宠物 帖子 < > read " height width 功能说明: 除了在个人资料显示宠物信息外,增加在论坛ID右侧显示玫瑰花数量,玫瑰花由宠物系统打怪获得,也可以在特殊商店或普通商店出售。会

关键字描述:显示 宠物 帖子 < > read " height width

功能说明:

除了在个人资料显示宠物信息外,增加在论坛ID右侧显示玫瑰花数量,玫瑰花由宠物系统打怪获得,也可以在特殊商店或普通商店出售。会员打到或购买玫瑰花后赠送给谁,就显示在谁的用户名右侧。

效果演示:

见侠客站长论坛左侧(Http://bbs.jb51.net),本人个人资料。

需要更改的文件:

read.PHP

template/wind/read.htm

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

一、read.php 文件

1、查找:

复制内容到剪贴板

代码:

$J_sql="LEFT JOIN $pw_tmsgs tm ON t.tid=tm.tid LEFT JOIN pw_members m ON m.uid=t.authorid LEFT JOIN pw_memberdata md ON md.uid=t.authorid";

在其下面添加

复制内容到剪贴板

代码:

$S_sql.=', 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, pd.openpk, pr.nums, pr.fromuser';

$J_sql.=" LEFT JOIN pw_wxpetdata pd ON pd.username=m.username LEFT JOIN pw_wxrose pr ON pr.username=m.username";

2、查找:

复制内容到剪贴板

代码:

$query = $db->query("SELECT t.*,m.uid,m.username,m.gender,m.oicq,m.groupid,m.memberid,m.icon AS micon,m.hack,m.honor,m.signature,m.regdate,m.signchange,m.medals,m.showsign,m.payemail,md.postnum,md.digests,md.rvrc,md.money,md.credit,md.currency,md.thisvisit,md.lastvisit,md.onlinetime,md.starttime $fieldadd FROM $pw_posts t LEFT JOIN pw_members m ON m.uid=t.authorid LEFT JOIN pw_memberdata md ON md.uid=t.authorid $tablaadd WHERE t.tid='$tid' AND t.ifcheck='1' $sqladd ORDER BY $order LIMIT $start_limit, $readnum");

修改为:

复制内容到剪贴板

代码:

$query = $db->query("SELECT t.*,m.uid,m.username,m.gender,m.oicq,m.groupid,m.memberid,m.icon AS micon,m.hack,m.honor,m.signature,m.regdate,m.signchange,m.medals,m.showsign,m.payemail,md.postnum,md.digests,md.rvrc,md.money,md.credit,md.currency,md.thisvisit,md.lastvisit,md.onlinetime,md.starttime, 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, pd.openpk, pr.nums, pr.fromuser $fieldadd FROM $pw_posts t LEFT JOIN pw_members m ON m.uid=t.authorid LEFT JOIN pw_memberdata md ON md.uid=t.authorid LEFT JOIN pw_wxpetdata pd ON pd.username=m.username LEFT JOIN pw_wxrose pr ON pr.username=m.username $tablaadd WHERE t.tid='$tid' AND t.ifcheck='1' $sqladd ORDER BY $order LIMIT $start_limit, $readnum");

关键字描述:显示 宠物 帖子 < > read " height width

3、查找:

复制内容到剪贴板

代码:

$anonymous=($read['anonymous'] && !$SYSTEM['viewhide'] && !$admincheck && $winduid!=$read['authorid']) ? 1 : 0;

在其下面加入

复制内容到剪贴板

代码:

//宠物数据>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

if($read['petname']!=''){

if ($read['openpk'] == 0) {

$read['pk'] = "<font color=gray>躲在家里</font>";

}else{

$read['pk'] = "<a href=pet.php?index=petbattle&atkname=$read[username]&action=askpk><font color=red>接受挑战</font></a>";

}

$petjob = $read['mypetjob'];

$petlevel= $read['mypetlevel'];

$levelpic = ($petlevel/10)>11?11:intval($petlevel/10);

if ($petjob == 0 or ($petjob <=3 && $petlevel < 200) or $read['mypetpic']=='') {

$read['petpic'] = "<img src=wxpet/images/pet/$read[pettype]/$read[pettype]$levelpic.gif border=0>";

} else {

$read['petpic'] = "<img src=$read[mypetpic] border=0>";

}

$petlevelfloor = pow (log10 (ceil($read['mypetexp']/ ($petjob * 0.2 1))), 3);

$epf=intval (100 * ($petlevelfloor - intval ($petlevelfloor)));

$hpf = floor (100 * ($read['mypethp'] / $read['mypetmaxhp']));

$mpf = $read['mypetmaxmp']?(floor (100 * ($read['mypetmp'] / $read['mypetmaxmp']))):0;

$spf = floor (100 * ($read['mypetsp'] / 5000)) - 1;

$read['epf']=$epf>97?97:$epf;

$read['hpf']=$hpf>97?97:$hpf;

$read['mpf']=$mpf>97?97:$mpf;

$read['spf']=$spf>97?97:$spf;

$read['petdead']= $read['mypetdead']?'死 亡':'生存';

$petgood = $read['mypetgood'];

if ($petgood >= 100) {

$read['shit'] = "死忠";

}elseif($petgood >=50) {

$read['shit']="忠诚";

}elseif($petgood >= -50) {

$read['shit'] = "猜疑";

}elseif($petgood > -100) {

$read['shit'] = "厌恶";

}else{

$read[shit] = "<font color=red>不鸟!</font>";

}

}

//宠物数据<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

============================================================================

二、修改 template/wind/read.htm

查找:

复制内容到剪贴板

代码:

$read[author]

下面添加:

复制内容到剪贴板

代码:

<!--

EOT;

if($read[nums]){print <<<EOT

-->

<span class="fr"><img src='wxpet/images/item/other/rose.gif' alt="玫瑰花" width="15px" height="15px"> <font color="red" title="{$read[fromuser]}">$read[nums] 朵</font></span>

<!--

EOT;

}print <<<EOT

-->

查找:

复制内容到剪贴板

代码:

最后登录:{$read[lastlogin]} </span>

</span></span>

</th>

修改为:

复制内容到剪贴板

代码:

最后登录:{$read[lastlogin]} </span>

</span></span>

<!--

EOT;

if($read[petname]){print <<<EOT

-->

<div align="left">

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">

<tr><td>

<fieldset style='width:95%;'>

<legend><font color=red>宠物信息</font></legend>

<div align="center">宠物名: <a href="pet.php?index=viewpet&username=$read[username]">$read[petname]</a><br>

<script language="javascript">

var i=0;

function draw(obj,s){

if(obj.style.display=='none'){

obj.style.display='block';

s.innerhtml='[<font color=red>隐藏宠物资料</font>]';

}else{

obj.style.display='none';

s.innerHTML='[<font color=blue>显示宠物资料</font>]';

}

}

</script>

<span style=cursor:hand onclick=draw(none$read[lou],block$read[lou]) id=block$read[lou] title="显示/隐藏 宠物资料">[<font color=blue>显示宠物资料</font>]</span>

</div><br>

<div id=none$read[lou] style=display:none>

<div align="center">$read[petpic]</div>

宠物: $read[petdead] $read[shit] $read[pk]<br>

级别: $read[mypetjob] 转/ $read[mypetlevel] 级<br>

HP: $read[mypethp] / $read[mypetmaxhp]<br>

<table width='98%' border='0' cellspacing='0' cellpadding='0' bordercolor='#000000'>

<tr>

<TD width=3 height=13><IMG height=13 src='wxpet/images/rpg/img_left.gif' width=3></TD>

<TD background= "wxpet/images/rpg/img_backing.gif" height=13><img src='wxpet/images/rpg/orange.gif' width=' $read[hpf]%' height='9'><img src=' wxpet/images/rpg/hp.gif' height='9'></td>

<TD width=3 height=13><IMG height=13 src='wxpet/images/rpg/img_right.gif' width=3></TD>

</tr>

</table>

MP: $read[mypetmp] / $read[mypetmaxmp]<br>

<table width='98%' border='0' cellspacing='0' cellpadding='0' bordercolor='#000000'>

<tr>

<TD width=3 height=13><IMG height=13 src='wxpet/images/rpg/img_left.gif' width=3></TD>

<TD background="wxpet/images/rpg/img_backing.gif" height=13><img src='wxpet/images/rpg/blue.gif' width=' $read[mpf]%' height='9'><img src='wxpet/images/rpg/exp.gif' height='9'></td>

<TD width=3 height=13><IMG height=13 src='wxpet/images/rpg/img_right.gif' width=3></TD>

</tr>

</table>

SP: $read[mypetsp] / 5000<br>

<table width='98%' border='0' cellspacing='0' cellpadding='0' bordercolor='#000000'>

<tr>

<TD width=3 height=13><IMG height=13 src='wxpet/images/rpg/img_left.gif' width=3></TD>

<TD background="wxpet/images/rpg/img_backing.gif" height=13><img src=' wxpet/images/rpg/green.gif' width='$read[spf]%' height='9'><img src='wxpet/images/rpg/mp.gif' height='9'></td>

<TD width=3 height=13><IMG height=13 src=' wxpet/images/rpg/img_right.gif' width=3></TD>

</tr>

</table>

EXP: $read[epf]% [ $read[mypetexp] ]<br>

<table width='98%' border='0' cellspacing='0' cellpadding='0' bordercolor='#000000'>

<tr>

<TD width=3 height=13><IMG height=13 src='wxpet/images/rpg/img_left.gif' alt= $read[mypetexp] width=3></TD>

<TD background="wxpet/images/rpg/img_backing.gif" height=13><img src='wxpet/images/rpg/blue.gif' width='$read[epf]%' alt= $read[mypetexp] height='9'><img src=' wxpet/images/rpg/exp.gif' alt= $read[mypetexp] height='9'></td>

<TD width=3 height=13><IMG height=13 src='wxpet/images/rpg/img_right.gif' alt= $read[mypetexp] width=3></TD>

</tr>

</table>

</div>

</fieldset>

</td></tr>

</table>

</div> <!--

EOT;

}print <<<EOT

-->

</th>

今天,你打工了吗?打工可以赚钱,你还不知道?

--结束END--

本文标题: 无心宠物帖子内显示(玫瑰花 版)for pw6.0

本文链接: https://lsjlt.com/news/32611.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作