ZenphotoCMS Forum
getImageStatistic array - Printable Version

+- ZenphotoCMS Forum (https://forum.zenphoto.org)
+-- Forum: Support (https://forum.zenphoto.org/forum-1.html)
+--- Forum: Themes (https://forum.zenphoto.org/forum-5.html)
+--- Thread: getImageStatistic array (/thread-10571.html)



getImageStatistic array - walterbz - 06-11-2012

Hi, I want to change the album view of my photoblog. The last image must be greater than the thumbnails.
I solved this using printImageStatistic(1,"latest","photoblog",true,true,true,250,'',790,600,false). It works fine.

Now I want to obtain the url of the image in order to have a permalink for "social" uses.

I tried to use getImageStatistic(1,"latest","photoblog") that returns me an array with a lot of variables but without an url link.

How can I build the complete url of the image? I want to have this in a variable.

Examples:
the url of my photoblog: www.walter.bz/foto/photoblog
as you see the latest image is displayed bigger than thumbs.
I want to add social stuff but I need the link of the image...that changes whenever I add an image.

Thank you for some helt/hints! :-)
Walter




getImageStatistic array - acrylian - 06-11-2012

You have to use the object model:
http://www.zenphoto.org/news/zenphotos-object-model-framework




getImageStatistic array - walterbz - 06-11-2012

worked! thank you acrylian! :-)

$last_phlog=getImageStatistic (1,"latest","photoblog",false);
printImageStatistic(1,"latest","photoblog",true,true,true,250,'',790,600,false);}
$last_ds_image=getImageStatistic(1,"latest","photoblog");
$albumName = 'photoblog';
$imageName = $last_ds_image[0]->filename;
$image = newImage(NULL, array('folder'=>$albumName,'filename'=>$imageName));
makeImageCurrent($image);
$social_url="http://www.walter.bz".html_encode(getImageLinkURL());