Member
Member
Dewie   2016-03-13, 12:01
#1

Hey all,

I would like to be able to have a link to the original photo for viewing/downloading (high resolution photos) but I've been beating my head against the wall for a while now.

In looking at the available functions it would appear that getUnprotectedImageURL should return this however it is returning the same thing as getFullImageURL. Is this maybe a limitation of the theme I am using? I have seen mention of enabling a download link and drop-down plugins however neither of these seem to be implemented in the them itself.

References:
getUnprotectedImageURL
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetUnprotectedImageURL
getFullImageURL
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetFullImageURL

http://www.zenphoto.org/support/topic.php?id=1409359

Administrator
Administrator
acrylian   2016-03-13, 13:49
#2

getFullImageURL() returns either protected, unprotected or a so call download link (technically a call to avoid open the image in the browser directly). This is dependend on what option you have set on Options > Image > Full image protection on the backend.

Member
Member
Dewie   2016-03-13, 14:34
#3

Full image protection:

  • Disable hotlinking - UNCHECKED
  • cache the full image - UNCHECKED

password SPECIFIED AS I WAS MESSING AROUND TRYING TO MAKE THIS WORK

In my images.php template file I have the following (which prints the link and the URL changes depending on the function I call):

Full Size Image

Using getFullImageURL() I see the following with the various drop-down options:

Download:
http://192.168.1.130/index.php?album=Projects%20and%20Equipment/Mini-Forge&image=IMG00818-20110612-1323.jpg

No Access:
http://192.168.1.130/index.php?album=Projects%20and%20Equipment/Mini-Forge&image=IMG00818-20110612-1323.jpg

Protected:
http://192.168.1.130/index.php?album=Projects%20and%20Equipment/Mini-Forge&image=IMG00818-20110612-1323.jpg

Unprotected:
http://192.168.1.130/index.php?album=Projects%20and%20Equipment/Mini-Forge&image=IMG00818-20110612-1323.jpg

As you can see - the various options don't seem to do anything for some reason...

Administrator
Administrator
acrylian   2016-03-13, 15:40
#4

Yes, because on `you are missing anecho. As the doc mentions the function only returns the url as a value but does not print it. On Zenphoto you most always have a pair of functions withgetvsprintin the name therefore. This one has noprintequivalent though so you have to add theechoyourself. Therefore you now have an empty linkhref` that resolves to the current page itself.

So it must be . Even better is.

Member
Member
Dewie   2016-03-13, 15:50
#5

Thank-you! Somehow in all the threads I looked at related to the matter I either missed this being explained or it simply wasn't done.

Also thank-you for the heads-up about the html_encoded URL. With this I have easily been able to make the re-sized image into a link to the full sized original; more than adequate for my purposes.

Hopefully this thread will help others in the future as well.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.