无心宠物帖子内显示(玫瑰花 版)for pw6.0
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
查找:
复制内容到剪贴板
代码:
<b>$read[author]</b>
下面添加:
复制内容到剪贴板
代码:
<!--
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]}"><b>$read[nums]</b> 朵</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>
今天,你打工了吗?打工可以赚钱,你还不知道?
相关文章
- 关于pw的重写,phpwind用到了一般人不会太关注的一个技术点,输出缓冲(output buffer - ob_),下面我们就分析一下phpwind的rewrite重写原理2014-01-24
- 伪静态在phpWind的应用,解释相关说明。2013-10-29
- 近日phpwind内部做了一次关于产品视觉方面的主题分享。会上phpwind主视觉设计师王杰同学分享了他在视觉设计中的心得和观念。小编也有幸被邀请旁听分享,在分享会过后本小版2012-08-23
phpwind 的编码错误导致cookie失效的解决,表象是无法注册登录
一个phpwind 8.0 utf8 系统错误表现为无法注册登录,费老劲调试,发现 data/sql_config.php 文件由于在windows 记事本编辑后导致被自动增加了bom2011-12-23- 应用中心:基础、第三方在线应用、各种特殊功能帖的设置。它包括:2010-01-24
- 运营工具:站点运营必须工具集合。它包括:2010-01-24
- 一个好的社区积分体系,能很好的带动论坛会员的积极性和粘合度,对活跃论坛气氛,促进会员发帖兴趣,公平公正奖励等都有非常好的效果,PHPWind一直追求这个功能的协调2010-01-24
- 不同的地方,民俗、经济、生活习惯都有所不同,不同的行业也有不同的规则,这就导致了不同社区有不同的资源,不同的用户,从而在社区运营和业务上有不同的侧重。作2010-01-24
- 关键字描述:在线 关闭 论坛   < EOT > " /a> index.php 使打开在线列表功能无效 打开index.php 将:if($windid==$manager || $usertotal<2000)2009-06-06
- 关键字描述:巧用 Discuz!7.0 后台 灌水功能 BBS 论坛 康盛创想 建站产品 Discuz!7.0是康盛创想(Comsenz)公司于2008年12月份发布的一款论坛BBS建站产品。Discuz!72009-06-06
最新评论