Hi,

Is there a way to position the Download counter and Download link somewhere?

I want to assign the download link to a image.

In the other hand, is possible to see the download stats in the administration side?

Thanks,
Leandro

CommentFileSizeAuthor
#3 disknode_attach.jpg195 KBKeeling

Comments

Ectar’s picture

There is nice module contemplate, where you can completely customize node teaser, as well as node body.

I think positioning shouldn't be a task of module, you can do it using something like contemplate or just edit your theme.

Admin stat - there is no way to see stats at administration interface, will will think about it.

Keeling’s picture

Title: Position download count and admin side stats » +1 for admin view of download stats
Category: support » feature

Thank you for this module. It's very useful.

I would also appreciate an administrative view of file downloads: a table with file name and number of downloads.

Keeling’s picture

StatusFileSize
new195 KB

Here is a snippet that provides admin with a table view of total downloads for each disknode file.

<?php
  $header = array('Filename', 'Downloads');
  $rows = array();

  $sql = 'SELECT files.filename, downloads.counter FROM files, downloads WHERE files.fid = downloads.fid';
  $res = db_query($sql);
  while ($row = db_fetch_array($res)) {
    $rows[] = $row;
  }

  print theme('table', $header, $rows);
?>

Instructions:
1. Enter the code in a block.
2. Select PHP Code for input format.
3. Select visibility settings, e.g. Show on only the listed pages: admin/logs

The block will return a table that lists each file and its number of downloads. A screen shot is attached.

www.keelingdesign.com

Ectar’s picture

Thank you Keeling, it is very useful!!