![]() |
|
Linking directly to images - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Linking directly to images (/thread-11196.html) |
Linking directly to images - pwilkinson - 2013-07-16 Hi, I used to be able to link to images in this format (and I still can for older albums): Since an upgrade though this doesn't seem to work on albums that have been created since the upgrade and I get an access denied message e.g. I have checked various permissions on the ftp images as well as the album settings but I can't seem to find the right thing to fix it and everything I do find is already set the same for each album. Any ideas? Linking directly to images - acrylian - 2013-07-16 It is not and was never possible to set the image size via the url that way. If you set something via the url it would hae to go through the /zp-core/i.php script. Which all image request to uncached images do. A link like http://zenphoto.pwilkinson.net/newyork16012013/image/674/IMG_7189.jpg Or if it is a full imge link it translates to an image "IMG_7189.jpg" within the sub album "674" of the top level album "image" within the "albums" folder that has been renamed to the custom name "newyork16012013". Linking directly to images - pwilkinson - 2013-07-16 Well, that's how I've always done it! No sub-albums etc as you've suggested, so it must have been possible at some point. Have you actually clicked on the new york photo link above? It takes you (by re-directing to the cache) to a copy of the picture that is 674 pixels on the long edge, which can't be a coincidence (most of my uploaded images are 1500px on the long edge). This link here: What would the link structure through the /zp-core/i.php look like please? Linking directly to images - acrylian - 2013-07-17 Sorry, I am with Zenphoto since 2007 and I really don't remember that type of link ever being used or worked. If it did work it might been an unofficial way. My colleague may correct me. Use the image template functions available instead of i.php directly: Update: I stand corrected. You are indeed right, those links did once work and got lost with the mod_rewrite restructuring in 1.4.5. It is not done via hatchess directly anymore to better support servers without htaccess like nginx (which our own server uses). Linking directly to images - acrylian - 2013-07-17 So here is why: It is not allowed anymore to use these urls because of security. All image processor calls now require a special security token to avoid that someone from the outside can overload a server using loads of those calls. Linking directly to images - pwilkinson - 2013-07-17 Thanks acrylian, that makes sense, I will try and figure out a way around it! Linking directly to images - acrylian - 2013-07-17 In which context did you use these urls? Maybe we can help. Generally as said you should use the image functions avaiable (or more advanced the object model). |