Member
Member
philsblogging   11-05-2008, 11:35
#1

Hello fellow-zenphoto users!

I have a question that has been making me really go nuts because of my blog redesign and thus I changed my theme accordingly!
My question (for design matters): I want to know the width of an image displayed in the image.php file. I haven't been able to figure this out, so maybe you can help me out with this.

I tried but it's not working. Since the width can change, let's assume you entered a 640 px max width in the administration panel and you upload a 400 px file, it still gets displayed width 400px... SO, is there a remedy for this?

Cu philipp

Administrator
Administrator
acrylian   11-05-2008, 13:21
#2

The correct usage for getWidth() would be $_zp_current_image->getWidth() since it's a object/class function.

But we have several other functions
http://www.zenphoto.org/documentation-official/zenphoto/_template-functions.php.html#functiongetDefaultWidth
http://www.zenphoto.org/documentation-official/zenphoto/_template-functions.php.html#functiongetFullWidth
These can be used directly.

Member
Member
philsblogging   11-05-2008, 13:41
#3

Thank you very much. That helped a lot.
CU Philipp

The gallery now looks like I intended it in first place.
http://philsblogging.com/gallery/

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