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
Comment #1
solipsist commentedActually, it would be even better to let the download count and filesize change places.
Comment #2
solipsist commentedHere's the code for that:
Looks like:
file104.zip (234.13 KB) (8 downloads) | file219-patch.txt (20.98 KB) (19 downloads) | read more
Comment #3
elmuerte commentedSubmitted 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