Slideshow for whole album, including images in subalbums?

A client I'm working on a ZenPhoto gallery for has asked if there's any way have the "View Slideshow" link show up on all album pages - not just on subalbums. Currently, the link shows on subalbums, but not on parent albums that only contain subalbums rather than containing images directly.

From what I've been able to figure out, it looks like the function printSlideShowLink() checks to see if there are any images in the album before printing the link. But I'm not sure if there might be some way to modify that bit to have it look for images contained within subalbums and count those...?

Ideally it would be great if even the main page of the gallery had a slideshow link, that would show all images in the entire gallery, and each album had one for all images contained within that album, whether they were in subalbums or not. But I'd settle for even just the top-level albums having it. Either way, though, I'm not sure if it's possible, or what I'd need to modify to make it happen.

Any advice, anyone?

Comments

  • acrylian Administrator, Developer
    It is not possible with the current slideshow. The option to call the slideshow for the whole gallery is on our list but we can't say when we are doing this (probably not for 1.2.7 scheduled for December 1st).

    But there is a workaround without hacking:
    The slideshow has the option to call an album directly using an album object on any theme page (see the plugin description on the documentation).
    So this should work:
    - Create a dynamic album that contains all images (for example attach the tag "gallery" to all images and search for this)
    - Then call this dynamic album with the slideshow directly on the index.php page for example.

    If you need that slideshow you could also make a custom page for this slideshow where you set up this.
  • Can you help me with the code for this workaround? Suppose I tag all pictures with "gallery," then what does the slideshow call look like?

    printSlideShow(false,false,' ??? ');

    Thanks
  • First, you need to create a dynamic album from the pictures you've tagged. You can learn how to do that here: http://www.zenphoto.org/2008/09/how-to-use-the-dynamic-albums-feature/

    Second, you need to pass the dynamic album to the slideshow. The docs and some instructions for this function can be found here: http://www.zenphoto.org/documentation/plugins/_plugins---slideshow.php.html#functionprintSlideShow
  • Yes, but what replaces the ??? below?

    printSlideShow(false,false,' ??? ');

    From the documentation:
    obj $albumobj: The object of the album to show the slideshow of. If set this overrides the POST data of the printSlideShowLink()

    But this doesn't give an example. Admittedly, my knowledge of object-based programming is limited. I tried using 'Featured.alb' and 'Featured' but neither of those worked.
  • Never mind. See this thread for an explanation.
Sign In or Register to comment.