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

Post reply

Can't comment until