ZenphotoCMS Forum
Display thumb outside zenphoto. - 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: Display thumb outside zenphoto. (/thread-8874.html)



Display thumb outside zenphoto. - ClicClac - 2011-07-18

Hello,

I was using

`

echo '[img]../zenphoto/zp-core/i.php?a='.$album.'&i='.$filename.'&s=thumb[/img]';

`
to display thumbs (180 pixels) on my website, but outside the zenphoto install.

Now, I've made some changes (add an iphone theme with the hack in functions.php) and I have multiples thumbs files in the cache folder: 1_2010_85_thumb.jpg, 1_2010_160_thumb.jpg, 1_2010_180_thumb.jpg, 1_2010_475_cw475_ch475_thumb.jpg

Now the php code above return the xxxx_85_thumb.jpg thumb files, but I still want the xxx_180_thumb.jpg file

Any idea ( maybe a size parameter, like "&s=thumb&size=180" ?




Display thumb outside zenphoto. - sbillard - 2011-07-18

The parameters to i.php are pretty well documented at the head of the script.

Since you are outside of the Zenphoto context the "thumbnail" size that will be fetched from the options list is determined by what ever was the last theme to "execute" so you can't count on it when there si more than one theme.

You will have to code the i.php parameters specifically to get the size you want.




Display thumb outside zenphoto. - ClicClac - 2011-07-19

I replaced '&s=thumb' by '&s=180' and it's ok.

Thanks !