ZenphotoCMS Forum
Get Image Thumbnail URL only - 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: Get Image Thumbnail URL only (/thread-8885.html)



Get Image Thumbnail URL only - hkdigit - 2011-07-21

Dear All,

On image.php file, I want to get only the URL of current thumbnail image, I tried to use following function:

printImageThumb(getImageTitle())

I return who object... any built in function only return the URL?

Regards,
Chris Lee




Get Image Thumbnail URL only - acrylian - 2011-07-21

printImageThumb prints the image and does not return an object. There is nearly always a get variant:
http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetImageThumb

All documentated on the functions documentation




Get Image Thumbnail URL only - hkdigit - 2011-07-21

Thanks! It's working. ^_^




Get Image Thumbnail URL only - hkdigit - 2011-07-21

Dear acrylian, one more thing:

It is possible for the function return absolute full path, i.e. include the Gallery URL

for example:

/pic/cache/people/theresa-fu-wing/hkgimages-20110705-131104_75_cw75_ch75_thumb.jpg

Full Path

http://www.hkgimages.com/pic/cache/people/theresa-fu-wing/hkgimages-20110705-131104_75_cw75_ch75_thumb.jpg




Get Image Thumbnail URL only - acrylian - 2011-07-21

Use the WEBPATH or FULLWEBPATH constants additionally.




Get Image Thumbnail URL only - hkdigit - 2011-07-21

Both WEBPATH and FULLWEBPATH include the gallery directory folder name, so I concatenate the CONSTANT and function, it will return double gallery folder path:

WEBPATH:
/pic/pic/cache/people/theresa-fu-wing/hkgimages-20110705-131104_75_cw75_ch75_thumb.jpg

WEBFULLPATH:
http://www.hkgimages.com/pic/pic/cache/people/theresa-fu-wing/hkgimages-20110705-131104_75_cw75_ch75_thumb.jpg