The following code can display the number of comments and favorites on the list page or article page according to your needs.
Number of article page call comments
{dede:field.id runphp=’yes’}$dsql = new dedesql(false);$ dsql -> SetQuery(“Select count(id) as c from dede_feedback where aid=”.@ me);$ row = $dsql -> getone();@ me=$row[‘c’]; {/dede: field. id} comments
Number of article page call favorites
Collected: {dede: field. id runphp='yes'} $dsql=new dedesql()$ dsql -> SetQuery(“select count(*) as c from dede_member_stow where aid=”.@ me);$ row = $dsql -> getone();@ me=$row[‘c’]; {/dede: field. id} times
List page call comments
[field:ID runphp=’yes’]$dsql = new dedesql(false);$ dsql -> SetQuery(“Select count(id) as c from dede_feedback where aid=”.@ me);$ row = $dsql -> getone();@ me=$row[‘c’]; [/field: ID] comments
Number of list page call favorites
Favorite: [field: ID runphp='yes'] $dsql=new dedesql()$ dsql -> SetQuery(“select count(*) as c from dede_member_stow where aid=”.@ me);$ row = $dsql -> getone();@ me=$row[‘c’]; [/field: ID] times
Statement: All articles on this site, unless otherwise specified or marked, are originally published on this site. No individual or organization is allowed to copy, embezzle, collect and publish the content of this website to any website, book and other media platforms without the consent of this website. If the content of this website infringes upon the legitimate rights and interests of the original author, please contact us for handling.