Pages (2): 1 2   
Member
Member
vincent3569   2012-01-10, 00:29
#1

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

Member
Member
sbillard   2012-01-10, 01:33
#2

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.

Administrator
Administrator
acrylian   2012-01-10, 10:37
#3

[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).

Administrator
Administrator
fretzl   2012-01-10, 12:31
#4

[i]Sometimes you want to show some images somewhere that should not appear in the normal gallery...[/i]
Indeed. I think it's a very useful parameter.

Member
Member
sbillard   2012-01-10, 21:09
#5

Randomly????

Administrator
Administrator
acrylian   2012-01-11, 10:46
#6

Yes, why not, as you can select a specific (toplevel)album to pick from.

Member
Member
micheall   2012-01-12, 06:59
#7

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.

Member
Member
easynow   2012-08-16, 13:56
#8

Is this fixed yet? Is there a workaround? As the posters above, I used this function to call a randomimage from an unpublished album..

Administrator
Administrator
acrylian   2012-08-16, 14:17
#9

If you noticed there have been some releases in the last seven months..;-)

Member
Member
easynow   2012-08-16, 15:10
#10

sorry! I have just upgraded and I assumed this is why my old function doesnt work..

Administrator
Administrator
acrylian   2012-08-16, 15:24
#11

Well, we of course don't know about your function.

Member
Member
easynow   2012-08-17, 13:31
#12

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..

Member
Member
easynow   2012-08-17, 15:55
#13

It appears this string still doesn't have a showunpublished value..

Administrator
Administrator
acrylian   2012-08-17, 16:06
#14

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.

Member
Member
easynow   2012-08-17, 16:11
#15

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!

Member
Member
easynow   2012-08-17, 16:15
#16

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..

Administrator
Administrator
acrylian   2012-08-17, 16:16
#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.

Member
Member
easynow   2012-08-17, 16:42
#18

Ok. Fair enough. I still don't understand why this feature was removed, though.

Administrator
Administrator
acrylian   2012-08-17, 17:40
#19

I forgot about that ticket but I don't remember any of the circumstances anymore why that was not done.

Member
Member
easynow   2012-08-17, 19:42
#20

Quote:This feature was removed because of the issues of showing not published images to unauthorized viewers..

Pages (2): 1 2   
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.