How to show images and textobjects separately on a page

Hey

Please see http://londonlight.org/zp/Real-Estate/House-of-Karin/

I use textobjects to show the panoramas. The album contains the screenshots you see as thumbnails, they are JPEGs, then I have empty TXT files which are needed to use the textobject, and some XML files needed to show each pano when you click on a thumb. All files share the same name, just the extensions differ.

Now I would also like to add some normal photos from that house and show it on that page. I want the virtual panorama thumbnails to be in box titled "Virtual panoramas", and under that another box titled "Photos". The problem is that zenphoto makes no distinction between those textobject panoramas, which it treats as photos in the ZP admin panel, and ordinary photos. When I drop the ordinary photos (without accompanying TXT and XML files) into that album, they are treated the same as those which do have TXT and XML counterparts, and obviously don't work when clicked on.

Questions:
How do I distinguish between the two? The main difference is that one group of JPEGs has TXT and XML files of the same name, while the other group does not.

I would like to end up with something like this:
`
<?php while (next_textobject()) { ?>
bla<?php printCustomSizedImage(); ?>bla

<?php } ?>
<?php while (next_image()) { ?>
bla<?php printCustomSizedImage(); ?>bla

<?php } ?>
`
or

`
<?php while (next_image()) {
if (is_textobject($_zp_current_image)) { ?>
bla<?php printCustomSizedImage(); ?>bla

<?php } else { ?>
bla<?php printCustomSizedImage(); ?>bla

<?php } } ?>
`
Alternatively I could make two arrays, one with textobject image names, and one with normal image names. Point is, how to tell them apart, how to separate them?

Comments

  • acrylian Administrator, Developer
    Technically text_objects are a "images", just another file type like videos or audio.

    But you can check using `isImagePhoto()` both in normal theme context or using an object:
    http://www.zenphoto.org/documentation/core/_functions.php.html#functionisImagePhoto
    You can also check for the class name of an image object if you are using that.

    That of cousre only works for real images not images attached to text-objects as a thumb as those are not recognized itself once attached to a "non image" image.

    Another way would be to use subalbums that match the panorama names for example and call the images of those albums.
  • Sounds like that is exactly what I needed, thank you!
Sign In or Register to comment.