![]() |
|
s=default and s=thumb the same in 1.3 - 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: s=default and s=thumb the same in 1.3 (/thread-7390.html) |
s=default and s=thumb the same in 1.3 - j916 - 2010-07-25 I just upgraded from 1.2x to 1.3 and before I start digging to see if I have a problem, I thought I'd ask the 's' parameter to i.php has changed. Before I upgraded, I had my thumb size set to 100 and my image size set to 640. If I accessed a picture like: I would get an image with the size of 640. After the upgrade I would get an image the size of the thumb (100). I currently have the thumb size set to 640 so that all my reverences to my pictures remain as before. My question; Does the s=default parameter do the same thing as the s=thumb parameter in 1.3? As a side note, if you access the picture above you get the url Note the 640_thumb.jpg name. s=default and s=thumb the same in 1.3 - acrylian - 2010-07-25 Actually Of course some internal handling might have changed since but if you set up your theme correctly Zenphoto does all automatically. s=default and s=thumb the same in 1.3 - j916 - 2010-07-26 I saved a copy of zenPhoto before the upgrade so I did a little investigation to see what happened. I found that in the 1.2.x version of i.php at line 63 the code looked like: `
` the 1.3 version has changed to: ` $args = array(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); if (isset($_GET['s'])) { //0
} ` with the min function $args[0] would never contain 'default' which is used in the function getImageParameters `
` I did a quick mode to i.php to check for 's' being numeric before calling min ` $args = array(NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); if (isset($_GET['s'])) { //0
` and zenphoto was back to working as before. So, the question I have now is are the values of 'default' and 'thumb' going to be supported in the future for the parameters 's'? Or would I be better just setting 's' to a numeric value (I'll only need to change about 200 references LOL). Is using i.php the the correct way to access photos in zenphoto from an external site assuming I don't want to access the original photo directly? s=default and s=thumb the same in 1.3 - sbillard - 2010-07-26 Your change looks correct. We will add it to the next release. s=default and s=thumb the same in 1.3 - j916 - 2010-07-26 Then I'ld better post the correct code for i.php (removed abs function when checking is_numeric) ` if (isset($_GET['s'])) { //0
} ` s=default and s=thumb the same in 1.3 - sbillard - 2010-07-26 Well, fortunately I did not carefully read the code you posted, so I actually made the correct correction |