Tata wrote:I have a dir structue:
userfiles
-- downloads
-- protected
---- documents-a
---- documents-b
---- documents-c
-- public
This doesn't work. The "protected" folder must be a subfolder of downloads or downloads itself (which would be not so practical)
It is supposed to be this way:
userfiles
-- downloads (is public, no separate public folder necessary)
---- protected
------ documents-a
------ documents-b
------ documents-c
Tata wrote:There are documents which I want to know only how many times they were downloaded and by the protected documents I want to know who has them downloaded.
Downloadcontrol counts how often and who is downloading. It records the IP-adress, and if you use register_XH/Memberpages it records the name of the downloader.
Tata wrote: In frontend then a warning "You must register to download this file." would be returned.
Downloadcontrol also does this. Alternatively there is the setting in which the downloader is asked to give his/her name first before downloading. This name will be recorded.
cmb wrote:Downloadcontrol would have to be extended to offer a directory listing (instead of single download buttons only)
Downloadcontrol already offers directory listings. Just give a folder name in the plugin call. E.g. without argument {{{downloadcontrol}}} the whole protected folder is listed.
cmb wrote:maintaining a public API is often somewhat painful and restricting. svasti, what do you think?
I have never done this... one could try. However I think in this particular case Downloadcontrol offers already everything that Tata is asking for. I concede that Wdir_XH looks nicer and additionally gives the date of last change, but otherwise Downloadcontrol also gives file sizes in folder listings and there are even two styles of folder listings (links or buttons) to choose from.