Dynamic list + "download all" button?

Any tips and tricks that has to with the ADDT that doesn't fit into one of the other categories
piripacchio
Posts: 37
Joined: 2010-04-28 08:34

Dynamic list + "download all" button?

Post by piripacchio » 2016-02-24 10:35

Hi all,
I'm creating a new project where the user can download files from a dynamic list.
This is easy with ADDT.
But I need to add another button: "Download all" that should download all files at once by creating a zip file.
I already looked for something similar and it seems quite easy to do with php on simple pages. But I need to integrate the "download all" function on the dynamic list page.
Is there someone that has already done something similar with ADDT?

TIA

tony

User avatar
Fred
Site Admin
Posts: 491
Joined: 2010-02-15 12:10
Location: Armagh, Northern Ireland
Contact:

Re: Dynamic list + "download all" button?

Post by Fred » 2016-02-27 12:55

Tony haven't done something like this myself but the way I would approach it is as follows.
1. You have the dynamic list,
2. Pass the files into an array of sorts
3. Pass the whole thing to a separate php page that can take care of the zipping and downloading.

I don't think it would be necessary to use the actual download behaviour as you will destroy the zip file after the download.
if you need to "count" the downloads, simply update the database while you looping over your array to get the file names to add to the zip file.

Post Reply