![]() |
|
signature of getRandomImagesAlbum() - 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: signature of getRandomImagesAlbum() (/thread-9464.html) Pages:
1
2
|
signature of getRandomImagesAlbum() - vincent3569 - 2012-01-10 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 signature of getRandomImagesAlbum() - sbillard - 2012-01-10 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. signature of getRandomImagesAlbum() - acrylian - 2012-01-10 [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] signature of getRandomImagesAlbum() - fretzl - 2012-01-10 [i]Sometimes you want to show some images somewhere that should not appear in the normal gallery...[/i] signature of getRandomImagesAlbum() - sbillard - 2012-01-10 Randomly???? signature of getRandomImagesAlbum() - acrylian - 2012-01-11 Yes, why not, as you can select a specific (toplevel)album to pick from. signature of getRandomImagesAlbum() - micheall - 2012-01-12 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. signature of getRandomImagesAlbum() - easynow - 2012-08-16 Is this fixed yet? Is there a workaround? As the posters above, I used this function to call a randomimage from an unpublished album.. signature of getRandomImagesAlbum() - acrylian - 2012-08-16 If you noticed there have been some releases in the last seven months..;-) signature of getRandomImagesAlbum() - easynow - 2012-08-16 sorry! I have just upgraded and I assumed this is why my old function doesnt work.. signature of getRandomImagesAlbum() - acrylian - 2012-08-16 Well, we of course don't know about your function. signature of getRandomImagesAlbum() - easynow - 2012-08-17 Of course. So to be clear: ` getRandomImagesAlbum ($rootAlbum = NULL, $daily = false, $showunpublished = false) ` Is what I should be looking at? Or has this changed? I've rrecently upgraded by like 20 versions.. signature of getRandomImagesAlbum() - easynow - 2012-08-17 It appears this string still doesn't have a showunpublished value.. signature of getRandomImagesAlbum() - acrylian - 2012-08-17 Sorry, confused this as there was a ticket about the issue that this function showed unpublished stuff by itself which it should not do. That is fixed. Since there was never a ticket about this it probably got lost. signature of getRandomImagesAlbum() - easynow - 2012-08-17 So what do you recommend I do? Currently I use this: `` But as you can see, I can only suggest the album and the 'daily' values. As the OP says, the option for 'showunpublished' is still omitted. This is the final tweak to my site! signature of getRandomImagesAlbum() - easynow - 2012-08-17 There IS a ticket, but it was disregarded: 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. signature of getRandomImagesAlbum() - acrylian - 2012-08-17 Well, if you need it now your only chance is to make your own custom function. If anything should be changed in that regard you should open a ticket but in any case it will not get in before 1.4.4 and that will be in quite a while. signature of getRandomImagesAlbum() - easynow - 2012-08-17 Ok. Fair enough. I still don't understand why this feature was removed, though. signature of getRandomImagesAlbum() - acrylian - 2012-08-17 I forgot about that ticket but I don't remember any of the circumstances anymore why that was not done. signature of getRandomImagesAlbum() - easynow - 2012-08-17 Quote:This feature was removed because of the issues of showing not published images to unauthorized viewers.. |