ZenphotoCMS Forum
printDownloadURL Displays but No Data? - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Plugins (https://forum.zenphoto.org/forum-6.html)
+--- Thread: printDownloadURL Displays but No Data? (/thread-13377.html)



printDownloadURL Displays but No Data? - TheMCZombie - 10-03-2020

After reading through multiple posts and reading through all the documentation, I've come to an impasse.

Here's a link to an example on my site : http://new.epsolephotography.com/Nature/2019/Norway/EPS00584.JPG

The current line I am using in my theme's php is as follow

But all that is displayed on the page is Download (0 Bytes) - 0 downloads
Upon clicking the link, a window appears displaying File "(filename)" was not found.

The image protection under Options>Image is set to unprotected. Any help would be appreciated.

PS, wonderful plugin, just not the smartest to understand it.




printDownloadURL Displays but No Data? - acrylian - 10-03-2020

getFullImageURL() does not work because it returns a relative url. But the you need to use a serverpath url you have to build yourself:

On image.php try this instead:
$_zp_current_image->getFullImage(SERVERPATH)

EDIT: The plugin in the support build (1.5.7b) has now an extra function to make this easier called printFullImageDownloadURL('Download') for use in a theme's image.php.




printDownloadURL Displays but No Data? - TheMCZombie - 11-03-2020

Thank you acrylian! Worked like a charm.