hi
I have question : why did you change the signature of getRandomImagesAlbum() function on 1.4.2?
With 1.4.1.6, the function signature was getRandomImagesAlbum ($rootAlbum = NULL, $daily = false, $showunpublished = false) and allows to display a random image, even if it is unpublished.
With 1.4.2, the function signature is now getRandomImagesAlbum ($rootAlbum = NULL, $daily = false) and I can't display an unpublished image.
this signature was useful: I was doing a random banner with pictures "hidden" in an unpublished album with unpublished images.
for now, publish some picture is not enough : I need to publish the album too, and it is really not practical
I am sure that parameter was the victim of the changes needed to fix the function so that it would not show unpublished items in the "normal" case.
I am not sure I understand the rationality of showing an unpublished image, though. Seems it kind of defeats the reasons for not publishing.
[i]I am not sure I understand the rationality of showing an unpublished image, though. Seems it kind of defeats the reasons for not publishing.[/i]
I do understand. Sometimes you want to show some images somewhere that should not appear in the normal gallery (or in RSS!) like this example with the slideshow. We do similar with the logos under the "about" page which use the storage album that is used only for embedding images in articles. These do not appear in the rss feed therefore which would not make really sense as these images mean little without the article they are used in (of course we don't use the standard structure of a gallery anyway).
Could also be useful for situations like mine. For a time I had my header show a polaroid of random photos from the gallery. After a time I realized I only wanted to use certain highlight ones. To accomplish this I tagged them all with a "featured" tag then created a dynamic album.
Is helpful to have something like that which pulls photos from all your gallery, but doesn't necessarily need to have itself published and double-up or mixup a certain structure or style of organization.
There IS a ticket, but it was disregarded:
http://www.zenphoto.org/trac/ticket/2082
Quote:This feature was removed because of the issues of showing not published images to unauthorized viewers. You can get it to show unpublished images if there is a logged on user with appropriated rights to view the album and image, so the workaround would be to temporarily set $_zp_loggedin so that the user has manageall rights when you call the function.
The image is the main header of my site, so I doubt the workaround is of any use to me..