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.jpgHere'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
`
<?php
$subalbums = $_zp_current_album->getSubalbums();
foreach ($subalbums as $subalbum) {
$subalbumobj = new Album($_zp_gallery,$subalbum);
echo "
";
}
?>
`
Take a look at our functions guide and the album class to find out more about more methods to use on album objects.
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).
Basically, you should call the top level album based on the $_zp_gallery and go from there.
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.
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.
Cheers for all of your help.
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...
http://www.zenphoto.org/documentation/classes/Album.html
`$subalbumobj->getTitle()` will get the album title.