Download Counter
Description
This plugin allows download counting of your files. It stores information about downloads in separate files in %doku_dir%/database/ directory (%doku_dir% is the directory where your doku is installed in) each file dl-count in appropriate file with full path. For example, if you make a link to the file plugins:dlcounter.zip the counting will be stored in %doku_dir%/database/plugins/dlcounter.zip (this path will be created if not exists).
Usage
To use this plugin place your links according to the following format:
{{dlc>plugins:dlcounter.zip|Download this plugin}}
The link will be shown as Download this plugin (704). The download count is bracketed. This plugin is in very alpha so there may be problems with security and so on though I made some checks of input data.
Installing
This plugin must not be installed via plugin manager because of it's structure. Although you can do it, things won't work properly. Currently the plugin doesn't support non-human readable URLs (which is default), so you must change the setting «userewrite» to ».htaccess» or «DokuWiki».
Download the archive (704), unzip it and then upload the folder 'dlcounter' in your %doku_dir%/lib/plugins directory. Put the file 'dl.php' into your %doku_dir%. Now it may work :)
Note: if you doesn't have PHP 5 installed you have to create '%doku_dir%/database' directory and the directory tree accordingly to your files tree because PHP 4 can't do mkdir recursively. May be I'll fix this in future releases by doing this manually
You can reach me via contacts or just post your comments and suggestions here (sorry for russian labels - it's primary language of my website and I can't change it for a particular page).
Bugfixes
10/03/08 Fixed a bug when the plugin didn't work because of the way DokuWiki generates links to media files. I use .htaccess method so didn't tested other methods. Thanks Filippo Spiga for reporting.
Дискуссия
Deleted comments because of errors in DB =( Sorry.
I obtain the message «Hacking attempt!» when I try to use the following item:
{{dlc>informatica:progetti:pollicino_20080616_65.zip}}I cause is in the regular expression in the files dl.php and syntax.php
if (preg_match('#(\.\.|[\x00-\x1F<>:\\!\*\?])#', $fname)) die('Hacking attempt!' . $fname);I removed the caracter ':' and now it works.
Sorry for my bad english. Regards, Marco.
Hey,
I have the error: (File is not accessible!) instead of download-counter. Can you help me??? I use PHP5.
Thank you! Thilo
how can I specify external links?