You are here

function statistics_link in Drupal 4

Same name and namespace in other branches
  1. 5 modules/statistics/statistics.module \statistics_link()
  2. 6 modules/statistics/statistics.module \statistics_link()

Implementation of hook_link().

File

modules/statistics.module, line 94
Logs access statistics for your site.

Code

function statistics_link($type, $node = 0, $main = 0) {
  global $id;
  $links = array();
  if ($type != 'comment' && user_access('view post access counter')) {
    $statistics = statistics_get($node->nid);
    if ($statistics) {
      $links[] = format_plural($statistics['totalcount'], '1 read', '%count reads');
    }
  }
  return $links;
}