Hi there!
Is it possible, that $_firstPageImages contains wrong values if the sub-albums go over more than the first page?
I recognized this behaviour when checking out the search function and got 15 albums (12 are shown on each page) - so image thumbnails started on page 2.
As you know from http://www.zenphoto.org/support/topic.php?id=10327 I use fancybox for displaying the images, therefore I generate invisible links to all images of an album (or of a search result!).
You may see it here: http://www.musikverein-zunsweier.de/galerie/page/search/konzert/2
Klick the first image thumb and navigate to the image before (left) -> should be 181/181 not 9/181.
echo $_firstPageImages; returns 9 - which is the value of the images on the second page. Value should be -3.
Wete
$_firstPageImages returns the number of images that are on the first image page (Which is not necessarily page 1 of the album.)
There are two functions to help you know where you are:
isAlbumPage() and isImagePage()
There are no images on a page where isImagePage() returns false
Note: both functions may return true, as on the transition page.
I just added `` in search.php and searched for 'konzert' - as in the link above:
http://www.musikverein-zunsweier.de/galerie/page/search/konzert
On every page I got a '1'.
You may check it now, it's visibily implemented.
Wete
Done.
echo ''.sprintf(gettext('Total matches for [i]%1$s[/i]: %2$u'), $searchwords, $total).' isImagePage: '.isImagePage().', isAlbumPage: '.isAlbumPage().', getTotalPages(true): '.getTotalPages(true).', $_firstPageImages: '.$_firstPageImages.', $_zp_page: '.$_zp_page.' ';
The documentation says:
`
getTotalPages [line 512]
Returns the number of pages for the current object
Parameters:
bool $oneImagePage: set to true if your theme collapses all image thumbs or their equivalent to one page. This is typical with flash viewer themes
`
If I understood this correctly, '2' should be correct value when (true) is added: The first page only contains sub-album thumbs, image thumbs start on page 2, and if the theme would collapse all image thumbs to on page, they would be shown here.
But I'll additional check it in default theme.
Wete
OK, here are the results from Germany:
If I ask for the value of getTotalPages(), it says 17. That is correct (Theme: MVZ). Values:
isImagePage: 1, isAlbumPage: 1, getTotalPages(): 17, $_firstPageImages: 9, $_zp_page: 1
Then I took the default theme and added the echo...
Results:
Page 1 (no images!):
isImagePage: 1, isAlbumPage: 1, getTotalPages(true): 2, $_firstPageImages: 5, $_zp_page: 1
Page 2 (albums + 5 images):
isImagePage: 1, isAlbumPage: 1, getTotalPages(true): 2, $_firstPageImages: 5, $_zp_page: 2
I suppose that '2' should be correct for getTotalPages(true). Without 'true' the correct value of total pages is shown.
As you can see: isImagePage always returns '1'.
Wete