ZenphotoCMS Forum
Zenphoto Functions - 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: Zenphoto Functions (/thread-1767.html)



Zenphoto Functions - Cooner750 - 2007-11-06

I added a feature to my Zenphoto gallery that uses javascript to show the 'full' size version of the image without reloading the page. (Note: NOT AJAX). It gets the full image url using "getFullImageURL()" and replacing the data inside the DIV on the Image.php page using .innerHTML.

The problem is that I cannot have my "View Full" button change back into a "View Resized" button that actually works because the zenphoto "printDefaultSizedImage(getImageTitle())" function actually spits out the image using I guess echo, instead of placing the resulting string into a variable (returning it).

If it would return the string (




Zenphoto Functions - Cooner750 - 2007-11-06

Eh, might want to ignore this topic now, or delete it.

Started going through all of the function files (since I know PHP)

And found the function getDefaultSizedImage()

Appears to work.

EDIT: You can see it working on this gallery:
exit12.dyndns.org/zp/




Zenphoto Functions - acrylian - 2007-11-07

Just for your interesst and the next time, there is a (rough) template functions guide on the trac:
http://www.zenphoto.org/trac/wiki/TemplateFunctionsGuide