![]() |
|
$_firstPageImages contains wrong values? - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: $_firstPageImages contains wrong values? (/thread-9620.html) Pages:
1
2
|
$_firstPageImages contains wrong values? - Wete - 11-02-2012 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 contains wrong values? - Wete - 11-02-2012 :-( $_firstPageImages contains wrong values? - sbillard - 11-02-2012 $_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: Note: both functions may return $_firstPageImages contains wrong values? - Wete - 11-02-2012 Thanks! Wete $_firstPageImages contains wrong values? - Wete - 11-02-2012 It works. ` ` $_firstPageImages contains wrong values? - Wete - 11-02-2012 BTW: Wete $_firstPageImages contains wrong values? - sbillard - 12-02-2012 Doesn't do that for me. Where are you making the test? $_firstPageImages contains wrong values? - Wete - 12-02-2012 I just added `` in search.php and searched for 'konzert' - as in the link above: On every page I got a '1'. You may check it now, it's visibily implemented. Wete $_firstPageImages contains wrong values? - Wete - 12-02-2012 I have to correct myself: The computation of $offset is: $_firstPageImages contains wrong values? - sbillard - 12-02-2012 I see it, but cannot reproduce it. Can you echo the values for: $_firstPageImages contains wrong values? - Wete - 12-02-2012 Done.
$_firstPageImages contains wrong values? - sbillard - 13-02-2012 Wellyour value for I wonder what you get for these calculations in a standard theme? That is of course where I am testing things. $_firstPageImages contains wrong values? - Wete - 13-02-2012 The documentation says: ` Returns the number of pages for the current object But I'll additional check it in default theme. Wete $_firstPageImages contains wrong values? - Wete - 13-02-2012 OK, here are the results from Germany: If I ask for the value of getTotalPages(), it says 17. That is correct (Theme: MVZ). Values: Then I took the default theme and added the echo... Page 1 (no images!): Page 2 (albums + 5 images): 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 $_firstPageImages contains wrong values? - sbillard - 13-02-2012 I have more album pages than that. Maybe there is a problem with the specific case that you are seeing. I will see if I can discover something. [edit] Indeed there is a bug here. Fixed in the nightly build. $_firstPageImages contains wrong values? - Wete - 13-02-2012 Thumbs up! $_firstPageImages contains wrong values? - Wete - 13-02-2012 One last question: '2' and '3' were (in my case) correct for getTotalPages(true), right? Wete $_firstPageImages contains wrong values? - sbillard - 13-02-2012 That number should always be one greater than the number of pages for albums. I really did not verify your values. The fix involved not using $_firstPageImages contains wrong values? - Wete - 13-02-2012 Then it was correct. Wete $_firstPageImages contains wrong values? - sbillard - 14-02-2012 The Trunk build contains only fixes to the released Zenphoto version, so by and large it should be fine to use anywhere. Of course, you should test first because sometimes things happen. |