Hi Guys,
I would like to modify this function in a way so that I can pass in the gallery name to start.
the function printAlbumMenuListCustom sits in custom-functions.php
in line 325:
$albums = $_zp_gallery->getAlbums(); is set and
is then passed into 'printAlbumMenuListAlbumCustom' function.
How do I set $albums to my album 'Rooms' explicitly to make it root.
so that only rooms subalbums are shown ?
please see here:
http://www.dev.bregler.net/
Comments
Just to note: Nice site and usage of Zenphoto in general, that is the type of usage I/we actually had in mind when making the Zenpage plugin. Be sure to submit that to the showcase when it is ready..;-)
Btw, you might want to consider to update to the stable 1.2.8 release as you are using the RC1.
I personally find the dynamic galleries the most striking feature of ZP !
I am more in the design side, hence my noob coding question !
in said custom function I am sure many can give me a quick hint :
this line: $albums = $_zp_gallery->getAlbums();
produces :
Array
(
[0] => bigpicture
[1] => video
[2] => rooms !!!! <- where I want to set the start
[3] => gallery
[4] => london.alb
[5] => 2009.alb
)
what I want is not to take the top-level gallery as root, but the rooms album instead.
http://www.bregler.net/backup/rooms.png
I tried stuff like this but its wrong !
$albums = $Album[2]->getAlbums();
Please help !
You could always get the top level to each album using this:
Yohttp://www.zenphoto.org/documentation/functions/_functions.php.html#functiongetUrAlbum
do you see that under 'ROOMS' you find All albums ?
I want it to start just from Rooms and hide the rest
I updated the screenshot even more : http://www.bregler.net/backup/rooms.png
Do I need a new class ? like $topalbum = new Album($_zp_gallery,.....);
?
$topalbum = new Album($_zp_gallery,$albums[2],false);
$albums = $topalbum->getSubalbums();
`
$album = new Album($_zp_gallery, "rooms");
$subalbums = $roomsobj->getSubAlbums();
`
http://www.coolmyspacebackgrounds.org/wp-content/uploads/2007/12/mrburns_excellent1.JPG !!!
Thanks for taking the time acrylian !
Coming back to my breadcrumb problem :
click on any sub-album under http://www.dev.bregler.net/rooms/China.alb
and you will see the breadcrumbs disappear.. Thats the bit I think is a bug
What do you think of using HTTP_REFERRER ?
http://www.dev.bregler.net/rooms/China.alb
but
http://www.dev.bregler.net/rooms/2006/060101_Urumqi_Peofowl-Mansion_301_7.6/
That album could also be the subalbum of another dynamic album, so this is not unique for the breadcrumb,
Zenphoto is foremost filesystem based, so this would be complicated. I fear using the HTTP_REFERRER might be an option or you add the album name via url (GET).
I then at least give the physical breadcrumb (through folder structure) ignoring
the logical path ?
i.e from "rooms | china " it would then jumb to "rooms | 2006 | Urumqi..."
hasDynamicAlbumSuffix($_SERVER['HTTP_REFERER'])
ZP is awesome !
So whenever one ends up in a physical folder one can retrace the logical breadcrumbs too
with :
$breadcrumb = str_replace (".alb","",$_SERVER['HTTP_REFERER']);
$parts = explode("/", $breadcrumb);