allow multiple files to attach to disknode
idcm - February 27, 2006 - 00:48
| Project: | Disk Node |
| Version: | 4.6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | elmuerte |
| Status: | closed |
Jump to:
Description
I like disknode because it counts downloads and allows you to reuse files already on the server. Attachment does neither. However, attachment allows multiple files to be attached to one node.
I need the best of disknode and the best of attachment combined. I need to two versions of the resource attached to the node: 1. original file format (e.g., Word doc) and 2. pdf version. I hate to create two disknodes for each resource version.
Are you able to take this on? If I were a coder, I would try it myself but am not.
please tell me you can help.
idcm

#1
A future release will get support for multiple files. The maximum number of files will be configurable. I currentl have this feature implemented on my test site, I will do some further testing before releasing it.
#2
great!! do you have a timeframe?
#3
Yes, but I'm keeping it secret ;)
Actually, I hope to round of some changes and do some final testing tonight. So I might commit the changes within 6 hours and a updated download should then be available within 24 hours.
#4
Ok, changes have been submitted. The 4.6 version now has support for multiple files. Let the bug reports come.
PS, I strongly advise to implement the theming function `theme_disknode_links` to make better download links. Check the readme for more information.
#5
Perfect timing. My client who wants this has just called. I will test it out. Thanks!!
#6
silly question here but ... I just looked in the "old versions" of disknode but the 4.6 version shows January. Shouldn't it be March? Please advise as to where I can find this updated version.
thanks
idcm
#7
It's this website, it's partially broken, the packages are updated within 24 hours after I made changes, the date just never changes. But this should get fixed somewhere in the future, I guess.
#8
thanks, I installed - looks good so far. Am very excited
Question: In case my users are not web savvy and don't think to hover the link to determine which file is where, I think they would benefit from having the filename as the link versus 'download' How do I change the theme to have it show the filename versus 'download'?
I am not a coder but sometimes I can read enough to change things. After several tries, I am defeated. Please advise.
$links[] = l(t('download', array('%title' => $node->title)), "disknode/get/".$file->fid."/".rawurlencode($file->filename), array("title" => "Download ".$file->filename , "rel" => "nofollow" ), "download")." (".format_size($file->filesize).")"; return $links;
sorry to be a bother, but your help is appreciated.
thanks
idcmi
#9
Add the following code to the theme you are using on your site (e.g. the .theme file)
function mytheme_disknode_links($file){
$links = array();
$links[] = l(t('%title', array('%title' => $file->filename)), "disknode/get/".$file->fid."/".rawurlencode($file->filename), array("title" => "Download ".$file->filename , "rel" => "nofollow" ), "download")." (".format_size($file->filesize).")";
return $links;
}
This will show the filename instead of 'download'
Note: in the function name change mytheme to the name of the theme
#10
now I understand part of the problem. I don't have a .theme file. I have an xtemplate.xtmpl file. Any other options for those of us in this situation?
thanks
idcmi
#11
I replaced:
$links[] = l(t('download', array('%title' => $node->title)), "disknode/get/".$file->fid."/".rawurlencode($file->filename), array("title" => "Download ".$file->filename , "rel" => "nofollow" ), "download")." (".format_size($file->filesize).")"; return $links;
with the line in your previous message.
Seems to have worked. Thanks
idcm
#12
#13
Hi friend,
This is Ankit working as a Seniour software engineer in drupal.I got stuck with a task ,i hope if u can get me out of it.
1)I need a drupal module which can combine multiple pdf files into a single pdf file.
2)I need a drupal module which can convert any file of extension like doc,jpg into a pdf file.
I will be happy if you can help me in this task.For the last few dayz was busy in finding a drupal module but didnt suceeded.
You can send me the details at myself.ankit@gmail.com
Thanx,
Ankit
#14
I am sorry but your request is beyond my abilities.
C