Member
Member
hkdigit   2011-07-21, 07:15
#1

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

Administrator
Administrator
acrylian   2011-07-21, 08:36
#2

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

Member
Member
hkdigit   2011-07-21, 09:37
#3

Thanks! It's working. ^_^

Member
Member
hkdigit   2011-07-21, 10:11
#4

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

Administrator
Administrator
acrylian   2011-07-21, 11:30
#5

Use the WEBPATH or FULLWEBPATH constants additionally.

Member
Member
hkdigit   2011-07-21, 13:01
#6

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

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