1.在Plus下新建fedcount.php文件 内容如下
document.write(“共有<?php
require_once(dirname(__FILE__).”/../include/common.inc.php”);
$row = $db->GetOne(“select count(*) as fc from dede_feedback where aid=’{$aid}’”);
if(!is_array($row)){
echo “0“;
}else {
echo $row['fc'];
}
?>个评论”);
2.在内容页模板中插入如下代码
<script type=”text/javascript” src=http://www.dede58.com/”/plus/fedcount.php?aid={dede:field name=’id’/}”></script>
<script type=”text/javascript” src=http://www.dede58.com/”/plus/feedcount.php?aid=[field:id/]“></script>