![]() |
|
printdownloadLink for image download - 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: printdownloadLink for image download (/thread-11262.html) |
printdownloadLink for image download - jeronimo42 - 12-08-2013 Hi. I'm trying to add a download link to the current image, ie. the image being viewed. I tried inserting the following line into my theme's image.php but it appears to download a link and not a jpeg image as I'm expecting. Also, how can I modify this to print the word 'download' instead of the image name? Thank you! What I'd like to do is have a 'Download' button that will download the current image. printdownloadLink for image download - sbillard - 12-08-2013 The second parameter (optional) to the function is the link text. Always a good idea to look at the function documentation for functions you wish to use. The function will output an href. But you can turn that into a button by appropriate CSS. E.g. add a printdownloadLink for image download - jeronimo42 - 12-08-2013 Yes, the documentation says: printDownloadLink(path-to-file);. What parameter can I use for 'path-to-file' that will pass the current image to the function and produce a jpeg image? printdownloadLink for image download - acrylian - 12-08-2013 Quote:Yes, the documentation says: Quote:hat parameter can I use for 'path-to-file' that will pass the current image to the function and produce a jpeg image? printdownloadLink for image download - jeronimo42 - 12-08-2013 Okay, I'll spell it out. The line (from above): is producing: The line: is producing: When I click this link a blank unknown document is downloaded, not a photo. What else can I try? Thank you. printdownloadLink for image download - acrylian - 12-08-2013
As to the 2nd you should also look into your server error log. printdownloadLink for image download - jeronimo42 - 13-08-2013 Still not working. is producing: Fatal error: Call to undefined function getFullImage() in /home/user/public_html/photography/themes/zpmasonry/image.php on line 69 What else? printdownloadLink for image download - acrylian - 13-08-2013 Yes, of course. You really need to read what we tell and look at the documentation printdownloadLink for image download - jeronimo42 - 13-08-2013 Sorry, I'm giving up. None of the code you have given me has produced a jpeg image. I'm getting warning messages and empty files. printdownloadLink for image download - acrylian - 13-08-2013 You need to look at your server access and error log to find anything related and make sure the image is accessible (file permissions) |