开发者

show view count on rss feed in drupal

开发者_开发百科i have a drupal site and i want to add to the RSS feed a view count

what that i found that should do this is this code but so far i get a null value

<?php print $node->links['statistics_counter']['title']; ?>

and i can't run any SQL query because i can't match the nodes for it.

i also tried to do:

print_r($node->links['statistics_counter']);

and also i get an empty array

any help is appreciated


This should work: <?php print $node->links['statistics_counter']['title']; ?>. Be sure that you print it in teaser mode, not in full view ($page == 1).
If not, visit http://YOURSITE/admin/reports/settings and enable access log.
p.s. Also Views module provide more powerfull feed page with any data and filters.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜