I changed the display of the files associated to a disknode to be a bit clearer especially in cases when more than one file is listed:

in disknode.inc, replace existing function with:

function theme_disknode_links($file)
{
  $links = array();
  $links[] = l(t($file->filename . ' (' . t('%counter', array('%counter' => $file->downloads)) . ' downloads)'), "disknode/get/".$file->fid."/".rawurlencode($file->filename), array("title" => "Download ".$file->filename , "rel" => "nofollow" ), "download")." (".format_size($file->filesize).")";
  return $links;
}

It will display:
file104.zip (8 downloads) (234.13 KB) | file219-patch.txt (19 downloads) (20.98 KB) | read more

Makes more sense to me. Another idea I had was to append the file list to the nody body instead and use an image for a Download button next to each file name.

Comments

solipsist’s picture

Actually, it would be even better to let the download count and filesize change places.

solipsist’s picture

Here's the code for that:

function theme_disknode_links($file)
{
  $links = array();
  $links[] = l(t($file->filename . " (" . format_size($file->filesize) . ")" ), "disknode/get/".$file->fid."/".rawurlencode($file->filename), array("title" => "Download ".$file->filename , "rel" => "nofollow" ), "download"). ' (' . t('%counter', array('%counter' => $file->downloads)) . ' downloads)';
  return $links;
}

Looks like:
file104.zip (234.13 KB) (8 downloads) | file219-patch.txt (20.98 KB) (19 downloads) | read more

elmuerte’s picture

Status: Active » Closed (fixed)

Submitted code to use an alternate default links routine in case of multiple links. Producing links like:

somefile.zip (1 download | 7.99 KB)

If only a single file per node is allowed it will use the old format