Member
Member
LondonLight.org   2015-01-27, 17:34
#1

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:
`

blabla

blabla

`
or

`

blabla

blabla

`
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?

Administrator
Administrator
acrylian   2015-01-27, 18:00
#2

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.

Member
Member
LondonLight.org   2015-01-27, 22:04
#3

Sounds like that is exactly what I needed, thank you!

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