Have a theme plan - I just need to make it work.

I have an existing site that I'm trying to integrate with Zenphoto.

I have a plan for the way I think it will work. See it here: http://thecanarystudio.info/zen-plan.jpg

Here's what I'm trying to do:

1. Show albums as text links on all pages
2. Show all sub-albums for the active album as thumbnails
3. Show navigation for the active sub-album as numbered links
4. Show the sized image on the same page as the above items

I've sorted out item 1, by using the print_album_menu plugin, all good there.
I've figured out how to show navigation as numbered text links.

Its item 2 that has me scratching my head, I really don't even know where to start on that one.

Any help/pointers would be greatly appreciated - I would also be more than happy to pay someone for their expertise (but above all, I would like to learn how this would be approached).

Comments

  • acrylian Administrator, Developer
    You can do 2. with this:
    `
    <?php
    $subalbums = $_zp_current_album->getSubalbums();
    foreach ($subalbums as $subalbum) {
    $subalbumobj = new Album($_zp_gallery,$subalbum);
    echo "imagegetAlbumThumb()."' />
    ";
    }
    ?>
    `
    Take a look at our functions guide and the album class to find out more about more methods to use on album objects.
  • Thanks so much. So this script displays all sub-albums as thumbnails for the album (rather than a sub-album) I'm viewing?

    Is there a way to show all sibling sub-albums that belong to the album I'm within? But as per my plan, while I am also viewing the list of top-level albums and seeing the sized images from the current sub-album. http://thecanarystudio.info/zen-plan.jpg

    For example - on the site I'm working with: http://foodstylist.com.au/adspacks/a2_1.html
    The grid of thumbnails = sub-albums that are the children of the 'ads+packs' album.
    One of the sub-albums is active (name 'cottees' and represented by the second thumbnail, top row).
  • I think that the print_album_menu.php in the plugins folder can shed a lot of light on how to proceed.

    Basically, you should call the top level album based on the $_zp_gallery and go from there.
  • acrylian Administrator, Developer
    The album menu has an option for showing only the toplevel albums. Then use the code above, that shows all direct subalbums of the album you are currently in.
  • thanks for your replies. The point I am struggling with is that I need all of this to happen on a single page: http://thecanarystudio.info/zen-plan.jpg

    So I can show all subalbums of the album I am in, but what if I'm viewing a subalbum - how do I show the only the other subalbums which belong the same album (and also, how to represent each subalbum with a thumbnail).

    thanks again for your help.
  • I am pretty sure that the print_album_menu plugin does pretty much what you are looking to do (it prints out the toplevel albums and subalbums of the topalbum as well as sister subalbums).. you just need to take that code and modify it to fit your needs.
  • acrylian Administrator, Developer
    @bobearth: I already posted the solution to show the subalbums of the current album. Take a look at our functions guide and the album class. There you will find all the methods (function) it provides that you can use as in my example above like `$subalbumobj->`.
    There is also a method `getParent()` to get the object of the parent album of the current albums. The object that is returned can be used as the one in the example. Sorry, but you need to learn a few things about object orientated php. I hope you understand that we can't teach that here.

    @albeezie: Adapting the album menu would probably work but that function is rather complicated because of the context sensitive display. The example above is basically what the the album menu uses.
  • Ah, that's a much easier way to go about it... go with acrylian!
  • Ah damn, this has quickly gone over my head - I'd be willing to pay for someone to create this theme for me. Any takers? Please contact me - tim [at] the canary studio [.] com

    Cheers for all of your help.
  • Hey Ya'll...

    I'm also looking to list sub-albums on the index page, and I've gotten far enough to show their thumbnails with the code here. But now I'm a bit stuck...

    $subalbumobj->getAlbumThumb() WORKS GREAT
    $subalbumobj->getAlbumTitle() DOES NOT WORK
    echo $subalbumobj["name"]; ALSO NO GO

    echo $subalbum will give me the filepath, so I have that and the thumbnail. All I need is the subalbum title.

    Any ideas? I feel it should be pretty straight forward, but nothing seems to work.

    Thanks...
  • acrylian Administrator, Developer
    You need to use the album class methods not the normal template-functions.
    http://www.zenphoto.org/documentation/classes/Album.html
    `$subalbumobj->getTitle()` will get the album title.
Sign In or Register to comment.