在网站中文章发布之后,会员肯定会有好评也会有给点意见,这样的评论也是非常重要的,在网站调用出来也可以提升网站用户体验。

下面是调用好评的

{dede:field name='id' runphp='yes'}
global $dsql;
$tid=@me;
$sql="select count(dede_archives.id) as count from dede_archives,dede_feedback where dede_feedback.aid=dede_archives.id and dede_archives.typeid=$tid and dede_feedback.ftype='good'";
$row=$dsql->getOne($sql);
@me=$row["count"];
{/dede:field/}

在调用差评的时候只要在$sql="select count(dede_archives.id) as count from dede_archives,dede_feedback where dede_feedback.aid=dede_archives.id and dede_archives.typeid=$tid and dede_feedback.ftype='good'";这句代码中的“good”换成“bad”就可以了。

免责声明:本站所有文章和图片均来自用户分享和网络收集,文章和图片版权归原作者及原出处所有,仅供学习与参考,请勿用于商业用途,如果损害了您的权利,请联系网站客服处理。

声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。