Hi
there is something I don't understand on Zenphoto version 1.4.2.2 [9450].
I have an album A which contains only subalbums (K, X, Y, Z).
Due to my configuration, I have pagination and I see K, X on the 1st page, and I see Y, Z on 2nd page.
For personnal needs, I need to evaluate isAlbumPage() on album pages.
In my case, on 1st page, isAlbumPage() = Null, and on the 2nd one, isAlbumPage() = 1.
Of course, I am sure that there is no picture under A, only subalbums.
This is an issue ?
Comments
For personnal needs, I need to evaluate isImagePage() on album pages.
In my case, on 1st page, isImagePage() = Null, and on the 2nd one, isImagePage() = 1.
other information : If there is no pagination, isImagePage() = Null.
So it seems to be an issue on isImagePage when there is album pagination.
at least, isImagePage() should return a boolean, but that is not the case, and if there is no picture, isImagePage returns Null
but indeed, the issue is that in a paginated albums wich contains only subalbum, in the second page page isImagePage() returns `true`.
the issue is that in a paginated albums wich contains only subalbum, in the second page page, isImagePage() returns true.
in that case isImagePage() should return false, 0, NULL, or empty, but not true.
that is exactly what I want (and not have true if album page might contain images).
I need that for displaying contextual help if there is image thumbs on album page (if isImagePage returns true).
@Wete : thanks for you help
I hoped you are true, but the tip doesn't work well.
The contextual help is evaluated in my footer, wich is the same on each page of my site (gallery, album, image, news, and page).
so getNumImages returns `Fatal error: Call to a member function getNumImages() on a non-object` if I am not on album page.
I will have a look to have a workaround, but the simplest way is to solve the issue on the function isImagePage done for that, don't you think ?
Wete
But the function is not intended for use except on album pages. It could add a check for that, but then everyone will have to pay the price for your desire. I think it better that you make the check before calling the function that it is on an album page.
I'm still surprised by some of your remarks.
I try, as best I can, to contribute to project zenphoto.
I reported bugs, made suggestions for improvements, themes, plugins ...
Of course, it gives no privilege, but I will hope to find more listening.
I do not report bugs to bother you but to contribute to make a better product.
For your information, isImagePage() is only used on official themes stopdesign and effervescence_plus (used on albums and search page).
So there was something going wrong with the issue that I have reported
So, as usual : do like you want...
However I have found a workaround for my own business :
in my footer, I wrote that :
`<?php if (($_zp_gallery_page == 'album.php') && (getNumImages() > 0)) {...} ?>`
@vincent: I think you misunderstood smy collegue. We really do appreciate your active reports and contributions. I don't know how you might think we weren't! Even if we don't agree always. But sometimes the doc comment can be wrong or the function is just not intended for what someone wants to use it (as originally in this case). So right on with your reports.
Also we hesitate to change some things too fast for backward compatibility. That only standard themes use it says nothing about custom themes out there (there are surely sites that neither use official nor 3rd party themes but own custom ones). We are really concerned about backward compatibility as far as possible for our convenience.
Your check above is exactly what I meant above.
After reading the last posting of vincet I see, that my posting could be misunderstood.
Wete
Much of Zenphoto is context sensitive. Theme writers need to be cognoscenteof the context or there will be errors.