Posted by palik on May 15, 2007 at 5:52am
Jump to:
| Project: | Download Count |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (won't fix) |
Issue Summary
Hello
i need to show table made by views, and 'download count' column that would show how many times files from node were downloaded...
i started reading views docs how to do this, but my ideas ended up with thiss little function, that shows count for only first file in node:
function download_count_views_tables() {
$tables['files'] = array (
"name" => "files",
"join" => array(
"left" => array(
"table" => "node",
"field" => "nid"
),
"right" => array(
"field" => "nid"
),
),
);
$tables['file_downloads'] = array (
"name" => "file_downloads",
'fields' => array(
'count' => array(
'name' => t('Files: Download Count'),
'sortable' => true,
'help' => t('Times file were downloaded from that node'),
),
),
"join" => array(
"left" => array(
"table" => "files",
"field" => "filename"
),
"right" => array(
"field" => "filename"
),
),
);
return $tables;
}Any hints how to make this count all files?
Comments
#1
Patch at http://drupal.org/node/235844 might be a start for this.
#2
closing due to new maintainer and an unsupported version. A new 6.x-2.x version (that includes views2 integration) is forthcoming, please open new issues against that version when available if necessary.