I'm new to Zenphoto and playing with the default theme. Now I've set the album display to 8 albums per page, but I get the album navigation everywhere, even when only using 2 albums. The page navigation turns to normal when I the album itself with the pictures.
Anyone who recognizes this? It's not a fault in my theming, because I switched to a default theme for testing, but got the same problem.
Comments
Hope this helps...
I followed the upload instructions, deleted all the files (except for /themes etc.) and ran upgrade.php.
Yesterday it was present so I thought it would be a cache problem. But now it's still there...
I'm using this function: printPageListWithNav.
I discovered a few things:
1. When I'm viewing a page with only albums, and I set the album display under 'theme options' in both 'gallery' and my main album 'fotografie' to 500, the page navigation will still be present, even if that album page only contains/shows 6 subalbums. However, when that page has 4 or less albums, the page navigation is gone.
2. When I set the 'image display' in both 'gallery' and 'fotografie' to 500 IMAGES per page, then also the page navigation is gone. But I'm viewing a page with albums(!) and not with images, so I don't understand what's wrong here ...
To be able to check out the 'wrong' navigation, I've set the display back to 12 albums per page and 12 images per page...
http://www.spoenk.nl/albums/fotografie/
Any new ideas why this is happening?
The only thing I could try is to purge the cache again, but I don't thinks that will help...
Removing
`$firstPageImages = normalizeColumns('2', '6');`
from
`<?php if (!defined('WEBPATH')) die(); $themeResult = getTheme($zenCSS, $themeColor, 'light'); $firstPageImages = normalizeColumns('2', '6');?>`
in the head of the album.php (no matter what theme) and the album page navigation is working again as it should. So I wonder if this is a bug or not, because it happened in each and every theme I tested and caused my album navigation to go wrong, sometimes displaying navigation for three albumpages where there was only one (so clicking to page two or three resulted in empty pages).
Perhaps someone else can test it. In my case it went wrong with albums that contained more than six subalbums.
The one thing you should look at is the function `normalizeColumns()`. Many times problems with mis-matches of pagination stem from not using this function correctly.
Yes, I just set it to 6 to test the pages after I removed that line, so what you see now is ok. But before that it was set to 20 or 500 and even then the page navigation for the albums was present.
If you want I can put the line back for you to see what happened?
About that function... Because it was present in all the themes I assumed it was a necessary line of code for the gallery to work, to 'switch' to a few albums less or more, just to make it flow nicely on the screen, but I guess I was wrong. Never thought about removing it.
Perhaps it went wrong because I don't use 'transition' pages?
Perhaps (and just thinking from a users perspective) it would be an idea to let the code check IF albums AND images or both present on that page, and only then actually applying/running it. This way that piece of code can stay in the head of all the pages, no matter how someone wants to fill his/her gallery .
Like I said, in my case the problem is solved and I know what to do now, but I'm just thinking of new users...