Save the following as a feedcount.php file and put it in the plus directory
/**
* *
access to comments C and Favorites F
*
* @version $Id: feedcount.php March 3, 2013 at:237606118
* @package Douhuimai
* @copyright Copyright (c) 2013 Douhuimai.
* @license http://help.dedecms.com/usersguide/license.html
* @link http://www.douhuimai.com
* *
document.write ("<?php require_once" (
dirname (__file__).) /.. /include/common.inc.php ");
if (!empty ($aid)) {
if ($type = = "C") {
$row = $db->getone ("SELECT count (*) as" C from Dede_feedback where aid= ' { $aid} ' ");
if ($row [' C ']<1] {
echo "0";
} else {
echo $row [' C '];
}
} else if ($type = = "F") {
$frow = $db->getone ("SELECT count (*) as F from Dede_member_stow where aid= ' {$aid} '");
if ($frow [' F ']<1] {
echo "0";
} else {
echo $frow [' F '];
}}} Else{echo "0";
> ");
Call comment number on any page, aid for article ID
<script type= "Text/javascript" src= "/plus/feedcount.php?aid=[field:id/]&type=c" ></script>
Call Collection Number
<script type= "Text/javascript" src= "/plus/feedcount.php?aid=[field:id/]&type=f" ></script>