This project is not covered by Drupal’s security advisory policy.

Top Terms is a lightweight module designed to find popular terms on a site. These can be displayed as a simple block or used by other modules.

Popularity is measured by summing page hits for each article tagged with a term. It collects these results on a scheduled basis and caches them for better performance. The block display can easily be overridden by adding the following template files to your theme:

  • topterms-block.tpl.php
  • topterms-block-item.tpl.php

For integrating with other modules:

The following function is suitable for use by other modules: topterms_get(). It has the following signature and defaults:

topterms_get($cacheid = 'topterms', $vids = NULL, $limit = 20, $sorting = 'name')

Usage:

$vids = array(12); // an array of vocabulary ids
$limit = 20;
$sorting = 'name'; // 'name' or 'total'
$cacheid = 'myapp'; // or something like md5(implode('', $vids) . $limit . $sorting) if you are generating dynamic queries
$data = topterms_get($cacheid, $vids, $limit, $sorting);

(N.B. This module is distinct to terms_statistics which measures accesses to taxonomy listings rather than nodes themselves.)

Developed by http://adub.com

Project information

Releases