phpwind

关注公众号 jb51net

关闭
CMS教程 > phpwind >

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

jb51

关键字描述:显示 宠物 帖子 < > 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");