I am having trouble finding out how the downloadList.php plugin works.
On my image.php template I used:
`echo printDownloadLink(getUnprotectedImageUrl(), "download image");`
This gives me the link:
http://localhost/zenphoto/albums/surfing/_DSC7438.jpg.php?download=876When I click on the link the I am just sending the ?download parameter, nothing downloads.
My PHP log reads:
`[31-Jan-2012 13:23:10] PHP Warning: filesize() [
function.filesize]: stat failed for /zenphoto/albumshighres/albums/surfing/_DSC7438.jpg in /Applications/MAMP/htdocs/zenphoto/zp-core/zp-extensions/downloadList.php on line 283`
`[31-Jan-2012 13:23:10] PHP Warning: number_format() expects parameter 1 to be double, string given in /Applications/MAMP/htdocs/zenphoto/zp-core/zp-extensions/downloadList/downloadList-functions.php on line 155`
As you can see I have my images in the folder "albumshighres" (set in zenphoto.cfg) and with an "albums" album that acts like a wrapper.
Comments
Regarding the filesize() I am not sure but you can disable the option on the plugin options to workaround.
`<?php printDownloadLink('albums/'.$_zp_current_album->name.'/'.$_zp_current_image->filename, "download image"); ?>`
Yeah it looks like it only works with links to physical images, not once created from a script.
Bummer as I was hoping to quickly implement a file dimensions option where the user could select the size to download or even with some javascript to detect screen resolution for a screensaver download.
Any tip on how this could be done? Again I was hoping routing it with the Zenphoto image processor i.php although I am not sure if I can prevent people understanding the URL to download images without my watermark.
To combine it with the downloadList plugin these images naturally need to be cached already though.
So the download button needs to trigger a script to write the image in the cache, than download that image.
Would love to take on this challenge later on.
Cheers.