Member
Member
ragnarork   13-09-2011, 15:37
#1

I am trying to set up a selling script. Therefore I need to get to the filename of the current image. The script I have to use is as follows:

I think $_zp_current_image is in this case the filename of the thumb generated by Zenphoto (ZPGallerifix theme). The filename of the image as shown in the gallery must be exact to the filename in the "hidden" folder of the fullress image. Therefore I need the filename of the actual image instead of the filename of the generated thumb.

Is this possible by a single variable (preferably already defined in Zenphoto)?

Thanks!

Administrator
Administrator
acrylian   13-09-2011, 16:00
#2

If set $_zp_current_image contains the object of the current image. $_zp_current_image->filename gets the filename.

I strongly recommend to read the Zenphoto object model tutorial before you proceed with anything.

Member
Member
ragnarork   13-09-2011, 17:10
#3

Hi acrylian,

Thanks for your reply! I'm not a coder, so probably that's why I posted in the first place;-) I've gone through the object model and even tried the theming tutorial, but I must say it goes way over my head. I can read some of the code an see what it is doing, but that's it. Even when I try it gives me no results (but no errors either). I am using it in album.php from the zpGallerific theme.

Hope you can help a newbie too...

Thanks again.

Administrator
Administrator
acrylian   13-09-2011, 17:15
#4

That object is only set in the right context if there is a "current" image. That is the case on image.php or within the next_image loop normally used on a theme's album.php.

If that is not the case you need to setup the object of the image in question. How to do that is explained on the tutorial. If that is over your head, I am sorry. Then you have to learn the PHP basics first (and elsewhere).

Also, I am not familiar with the zpGalleriffic theme for obvious reasons.

Member
Member
ragnarork   13-09-2011, 17:25
#5

Ok, thanks for your time! I'll dive into it deeper.

Member
Member
edwink   20-08-2013, 20:45
#6

Did you ever got Oypo working with Zen?

Member
Member
edwink   28-09-2013, 21:43
#7

No one, it seems.

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