popnoire/site/OFF_plugins/kirby-zipdownload
2026-02-12 15:22:46 +01:00
..
assets Initial commit 2026-02-12 15:22:46 +01:00
snippets Initial commit 2026-02-12 15:22:46 +01:00
temp Initial commit 2026-02-12 15:22:46 +01:00
cron.php Initial commit 2026-02-12 15:22:46 +01:00
kirby-zipdownload.php Initial commit 2026-02-12 15:22:46 +01:00
LICENSE Initial commit 2026-02-12 15:22:46 +01:00
package.json Initial commit 2026-02-12 15:22:46 +01:00
readme.md Initial commit 2026-02-12 15:22:46 +01:00

Kirby ZipDownload

This Kirby CMS plugin provides basic capacity to select & download multiple files as a zip.

Version

0.1 : initial release

Installation

  1. Copy the plugin folder to site/plugins.
  2. Make the folder kirby-zipdownload/temp writable.
  3. Setup your server's cron file to execute kirby-zipdownload/cron.php regularly, so it empties kirby-zipdownload/temp.
  4. 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

© 2016 Joachim Robert

License

MIT License