Main Page | Modules | File List | File Members

Links statistics


Functions

 links_stats_for_link ($link_spec)
 links_stats_popular ($limit=10, $order="total_clicks", $min_nodes=1, $min_clicks=0)

Function Documentation

links_stats_for_link link_spec  ) 
 

THIS FUNCTION IS EXPERIMENTAL -- USE AT OWN RISK Please send test reports to the maintainer.

Returns an associative array containing the following statistics for the specified link_spec:

lid, url, url_md5, link_title, last_click_time -- same as {links} table node_count -- number of nodes that refer to the specified link total_clicks -- number of visitors sent to this link, via any node

As with other query functions, $link_spec can be a URL, a URL hash, or an integer link ID.

links_stats_popular limit = 10,
order = "total_clicks",
min_nodes = 1,
min_clicks = 0
 

THIS FUNCTION IS EXPERIMENTAL -- USE AT OWN RISK Please send test reports to the maintainer.

Returns the statistics (as links_stats_for_link(), but inside an outer array) for the most-clicked or most-referenced URLs on the site. Records are retrieved in descending order of the specified $order field; if ascending order is desired, the calling application can either use PHP's array reversal function or simply process the elements in reverse order. Links that are not referred to by any node are automatically excluded.

Parameters:
$limit Maximum number of records to return (default 10). Function may return less if there are fewer matches to the other criteria.
$order The field in the output records by which to order (default "total_clicks", recommended alternative "node_count")
$min_nodes If nonzero, excludes links having fewer than this many referring nodes
$min_clicks If nonzero, excludes links having fewer than this many total clicks


Generated on Tue Aug 1 10:19:37 2006 for Drupal Links Package by  doxygen 1.4.4