Cant wait for the update. Is it possible to get the albums to show up as a list? Side a sidebar navigation so they can select from the list as well as the thumbnails.
You will need to set the context in your theme in the albums.php and image.php and style the reulting output. Dont be daunted its fairly straightforward. If you need some more help, ask.
In your theme you will find three .php files and a CSS file that syles it all.
index.php albums.php image.pgp zen.css
the following is the code from each page that outputs the albums as links sans images. The middle row of code is the one you need to be paying attention to. Essentially if you put some list style around the middle line it will output a list item for each album, so something like the following should get you close to what you are after:
I tried this. While it works fine on image.php it does not work correctly on index.php and album.php. If pagination is enabled on index.php the album list is paginated, too. Of course it is clear why but how to work around this? And if pagination is enabled on album.php the album list is shown on page 1 but all following pages do not appear. If the while-loop for sub albums is deleted, the following pages appear but the album list does only appear on page 1.
Sorry, next_album(true) does not work either. The album list is paginated on all theme pages...(by the way: strangely the above mentioned problem of not appearing pages dissapeared...)
Thanks for the above, but how do I get it to work - I'm a bit of a novice although can follow instructions! I have put the show_album_menu.php file in the main zen directory and changed the show all galleries link in the index file to point to this file - it appears to find it and load but I just get a blank screen?
1. Put the downloaded file into your theme's folder. 2. Write this in into the `` section of your three theme files: `<?php require_once("show_menu_album.php"); ?>` 3. Write this in your theme files where you want the menu list to appear: `<?php show_album_menu(); ?>`
Thanks the fast response Acrylin - got it working and looks great!
I copied and pasted the code which didn't work first of all but then I noticed that `"show_menu_album"` should be `"show_album_menu"`!
One problem though - it doesn't appear to like apostrophes or & characters in the album names? Nearly all of my albums are named "so and so's album". I can get round it by just leaving them out but the links work OK from the main index page with these characters in and I'm a stickler for correct grammar! I have got mod re-write off as that doesn't appear to work when you have spaces in the names of the photos or albums.
Now I'm interested in your update....... what's coming next? Or is it under wraps?!
I suppose you uploaded your albums via ftp? Special characters like "&" and apostrophes are not allowed characters in file names on servers (yes they may work on Windows or Mac, but that's another thing). If you need these in your album names you have to edit the names via the administration backend manually. You need to set zenphoto to UTF-8 (it's default) in the config.php and your database too (if I am not wrong). And of course your theme files need to be set to a character set, too. You can do this with any html editor. I hope that helps.
No it's not really under wraps, but I will post it within the next few days, so I do not want have to write it all over again...:-) (And since there is now a "unofficial" solution for subalbum sorting, I need to update the update).
Thanks again - you were right, I do upload by ftp. Have now changed the database setting to utf8_unicode_ci and amended the names using the admin section and all is now working.
Appreciate the help and look forward to the update!
acrylian, thanks for your share, works like an absolute charm.
Just one thing...how hard would it be to only show subfolders when you click on its parent folder? so by default, all subfolders will be collapsed, but when you click on a category, if that category has sub categories, they will display under that category.
Brinked: Currently no. (by the way a newser version is included in zenphoto in zp-core/plugins. Usage is the same as above). It is planned for the next version, because it supports only one subalbum level and at least a few more sublevels would be nice. But that is a little more complicated that one level.
I would only need it to work for one level deep anyway so that would be perfect!
I checked out the function you have in that thread and its spitting out errors:
Warning: Missing argument 3 for printSubAlbumMenu(), called in /home/brinked/public_html/zenphoto/themes/default/index.php on line 13 and defined in /home/brinked/public_html/zenphoto/themes/default/show_album_menu.php on line 13
oh ok..thanks got it now...hmm...not very useful as all it seems to do is display the subcategories in list format once you are in a category.
much better to use the other feature that listed all albums/sub albums in list format. I'll probably just pay my programmer to custom code this for me. This script is awesome though, has everything I was looking for, this was the only minor set back.
You're welcome! I am sure that it will be possible to combine the print album menu with the other subalbum menu function, I just haven't tried yet. But as I said it's planned...
Okay tell me if this is correct though. When I added that function call it spits out a UL block of albums in random order, and does not list sub-albums. That's all it does?
The print album menu has been reworked in the nightly, it now takes the correct order from the gallery class. And yes, the the menu is context sensitive by default. This was done on request to save space and it makes sense. But the nightly version also has an option to disable that. The menu then shows the topleven plus up to 4 sublevels (zenphoto can have more sublevels of course, but it does not make sense to have more regarding usability and seo..)
Comments
You will need to set the context in your theme in the albums.php and image.php and style the reulting output. Dont be daunted its fairly straightforward. If you need some more help, ask.
index.php
albums.php
image.pgp
zen.css
the following is the code from each page that outputs the albums as links sans images. The middle row of code is the one you need to be paying attention to. Essentially if you put some list style around the middle line it will output a list item for each album, so something like the following should get you close to what you are after:
`"> <?php printAlbumTitle(); ?> `
FOR INDEX.PHP:
`<?php while (next_album()): ?>
<?=getAlbumLinkURL();?> <?php printAlbumTitle(); ?>
<?php endwhile; ?>`
FOR ALBUMS.PHP:
` <?php set_context(ZP_INDEX); while (next_album()): ?>
<?=getAlbumLinkURL();?> <?php printAlbumTitle(); ?>
<?php endwhile; set_context(ZP_ALBUM);?>`
FOR IMAGE.PHP
` <?php set_context(ZP_INDEX); while (next_album()): ?>
<?=getAlbumLinkURL();?> <?php printAlbumTitle(); ?>
<?php endwhile; set_context(ZP_IMAGE); ?> `
And if pagination is enabled on album.php the album list is shown on page 1 but all following pages do not appear. If the while-loop for sub albums is deleted, the following pages appear but the album list does only appear on page 1.
- album
- subalbum
- album
Sadly the forum mangles the code completly I tried to post so your can download it here:show_album_menu.zip
Thanks for the above, but how do I get it to work - I'm a bit of a novice although can follow instructions! I have put the show_album_menu.php file in the main zen directory and changed the show all galleries link in the index file to point to this file - it appears to find it and load but I just get a blank screen?
Thanks
Mike
2. Write this in into the `` section of your three theme files:
`<?php require_once("show_menu_album.php"); ?>`
3. Write this in your theme files where you want the menu list to appear:
`<?php show_album_menu(); ?>`
By the way, there is a little update coming soon.
I copied and pasted the code which didn't work first of all but then I noticed that `"show_menu_album"` should be `"show_album_menu"`!
One problem though - it doesn't appear to like apostrophes or & characters in the album names? Nearly all of my albums are named "so and so's album". I can get round it by just leaving them out but the links work OK from the main index page with these characters in and I'm a stickler for correct grammar! I have got mod re-write off as that doesn't appear to work when you have spaces in the names of the photos or albums.
Now I'm interested in your update....... what's coming next? Or is it under wraps?!
I hope that helps.
No it's not really under wraps, but I will post it within the next few days, so I do not want have to write it all over again...:-) (And since there is now a "unofficial" solution for subalbum sorting, I need to update the update).
Appreciate the help and look forward to the update!
Mike
Just one thing...how hard would it be to only show subfolders when you click on its parent folder? so by default, all subfolders will be collapsed, but when you click on a category, if that category has sub categories, they will display under that category.
Many thanks!
Please take a look at the function that I posted here:
http://www.zenphoto.org/support/topic.php?id=1108&replies=24
Maybe that fits your needs for now.
I would only need it to work for one level deep anyway so that would be perfect!
I checked out the function you have in that thread and its spitting out errors:
Warning: Missing argument 3 for printSubAlbumMenu(), called in /home/brinked/public_html/zenphoto/themes/default/index.php on line 13 and defined in /home/brinked/public_html/zenphoto/themes/default/show_album_menu.php on line 13
The functions printSubAlbumMenu() contains one error (mentioned in one of the following posts) in this line:
`// subalbum and image view: list subalbums in this album
for ($nr = 1;$nr <= $subnumber; $nr++)<br />
{
if(getIDForAlbum() === $subidnr[$nr]) // get parentid of current subalbum and so the id of the parent album `
`getIdForAlbum()` must be replaced with `getAlbumID()`
Hope that helps for now.
much better to use the other feature that listed all albums/sub albums in list format. I'll probably just pay my programmer to custom code this for me. This script is awesome though, has everything I was looking for, this was the only minor set back.
Thanks for all your help acrylian!
The nightly's version even has the feature to be not context sensitive.
The print album menu has been reworked in the nightly, it now takes the correct order from the gallery class.
And yes, the the menu is context sensitive by default. This was done on request to save space and it makes sense. But the nightly version also has an option to disable that. The menu then shows the topleven plus up to 4 sublevels (zenphoto can have more sublevels of course, but it does not make sense to have more regarding usability and seo..)