| 7 statistics.module | statistics_node_view($node, $view_mode) |
| 8 statistics.module | statistics_node_view(Node $node, $view_mode) |
Implements hook_node_view().
File
- modules/
statistics/ statistics.module, line 117 - Logs access statistics for your site.
Code
function statistics_node_view($node, $view_mode) {
if ($view_mode != 'rss') {
if (user_access('view post access counter')) {
$statistics = statistics_get($node->nid);
if ($statistics) {
$links['statistics_counter']['title'] = format_plural($statistics['totalcount'], '1 read', '@count reads');
$node->content['links']['statistics'] = array(
'#theme' => 'links__node__statistics',
'#links' => $links,
'#attributes' => array('class' => array('links', 'inline')),
);
}
}
}
}
Login or register to post comments
Comments
Adding a class to the span output?
I have found how to override the function in theme but I do not know how to add a class to the function. This function renders the simple class in ul li but I neew a class to add a background image in css.
Would appreciate help or tu set a class by default in next D7.
greets...