开发者

show view count on rss feed in drupal

开发者 https://www.devze.com 2023-04-07 11:15 出处:网络
开发者_开发百科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

开发者_开发百科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

精彩评论

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