filename variable

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:

<script language="JavaScript" src="http://www.oypo.nl/pixxer/api/orderbutton.asp?
foto=$_zp_current_image&
thumb=http://www.kurt-fotografie.nl/albums/oypo-test/$_zp_current_image&amp;
profielid=E2035C109DFEF7C6&
buttonadd=http://www.kijk.us/selectionadd.gif&amp;
buttondel=http://www.kijk.us/selectiondel.gif
"></script>

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!

Comments

  • acrylian Administrator, Developer
    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.
  • 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 <?php echo $_zp_current_image->filename ?> 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.
  • acrylian Administrator, Developer
    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.
  • Ok, thanks for your time! I'll dive into it deeper.
  • Did you ever got Oypo working with Zen?
  • No one, it seems.
Sign In or Register to comment.