===== Download Counter ===== Author: [[https://www.igorkromin.net/|Igor Kromin]], revised by [[https://frank-web.dedyn.io|Fraenkiman]] ==== Description ==== This is a plugin for FlatPress that adds a BBCode tag "Download" with a link to the file to download and a counter for how many times the file has been downloaded. {{:res:plugins:ikromin:downloadctr.png?300|}} Example: Download link with with file name [download=downloadctr.zip] Example: Download link with filename and size [download=downloadctr.zip size=k] Example: Download link with own name and size [download=downloadctr.zip name="my test-file" size=k] It is also possible to display the file size by providing a "size" attribute in the BBcode. The following are valid values for the size attribute (lowercase letters work too): Bytes: ''[download=file.ext size=B]'' Kilobyte: ''[download=file.ext size=K]'' Megabyte: ''[download=file.ext size=M]'' Gigabyte: ''[download=file.ext size=G]'' Terabyte: ''[download=file.ext size=T]'' ==== Important ==== To use the plug-in, extract it to the fp-plugins directory, activate the plug-in, and make sure that the fp-content/attachs directory is created and writable by the web server user. The plugin assumes that the file to be downloaded is located in the fp-content/attachs directory. The link is generated using the blog base URL. ==== Download ==== {{ res:plugins:ikromin:downloadctr1_3_2en.zip |}} for English language {{ res:plugins:ikromin:downloadctr1_3_2de.zip |}} for German language === Development === https://github.com/flatpressblog/flatpress-extras/tree/master/fp-plugins/downloadctr === Demo ==== [[https://frank-web.dedyn.io/category/downloads-fp/|Plugins für FlatPress << Fr@nk-Web]] **Support** Please ask for help on the [[https://forum.flatpress.org/viewtopic.php?t=488|FlatPress Forum]] === Changelog: === == 2022-12-14 (V1.3.2) == * Fixed: The plugin crashes when the BBCode plugin is not enabled. Thanks to Arvid for the hint == 2022-11-28 (V1.3.1) == * Error-Pages in HTML5 * Added Instructions