| .. | ||
| assets | ||
| snippets | ||
| temp | ||
| cron.php | ||
| kirby-zipdownload.php | ||
| LICENSE | ||
| package.json | ||
| readme.md | ||
Kirby ZipDownload
This Kirby CMS plugin provides basic capacity to select & download multiple files as a zip.
Version
0.1 : initial release
Installation
- Copy the plugin folder to
site/plugins. - Make the folder
kirby-zipdownload/tempwritable. - Setup your server's
cronfile to executekirby-zipdownload/cron.phpregularly, so it emptieskirby-zipdownload/temp. - Modify your template files and customize the snippets to your needs.
Usage
There's two way to use the plugin.
The simple way
Use the asset_gallery snippet, it's adapted from Kirby default theme's Projects template.
The custom way
Use the btn_dl snippet where you want it. It's got an ID attribute so it's better if you don't reuse it.
Then, in the loop calling all the images/documents, use the snippet checkbox.
Going further
The checkboxes can be styled and scripted at will, it's the checked/unchecked state that counts when the form is sent (via a POST request). You can hide the checkboxes and check them in JavaScript through other means.
TODO
- i18n of the error message
- Using smaller versions of the images to fill the zip through the thumbnail API
(or ask the content editors to upload smaller images?) - Basic CSS styles
Copyright
© 2016 Joachim Robert
License
MIT License