![]() |
|
random pict of a dynamic album - 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: random pict of a dynamic album (/thread-8220.html) |
random pict of a dynamic album - vincent3569 - 2011-02-07 hi I want to make a dynamic album called "portfolio". the getRandomImagesAlbum() function needs the folder name from which to get the image, but there is no folder created for a dynamic album. so, how can I displayed a random image taken in a dynamic album ? thanks for your help random pict of a dynamic album - sbillard - 2011-02-08 Actually, if you look at that function you will see that the "album" parameter is defined as "mixed" and can be an object or folder. (http://www.zenphoto.org/documentation/functions/_template-functions.php.html#functiongetRandomImagesAlbum) so you pass it the album object. random pict of a dynamic album - vincent3569 - 2011-02-19 hi could you help me to write the correct syntax to obtain the object of my dynamic album called "portfolio" ? I'm stuck on this thing since one week :-( thanks in advance. random pict of a dynamic album - acrylian - 2011-02-19 http://www.zenphoto.org/2010/02/zenphotos-object-model-framework/#creating-an-object random pict of a dynamic album - vincent3569 - 2011-02-20 Thanks acrylian how should i do to create an object from a dynamic album ? random pict of a dynamic album - acrylian - 2011-02-20 The same way. Since a dynamic album is not a folder you have to use its name. In your case probably "portfolio.alb". random pict of a dynamic album - vincent3569 - 2011-02-21 hi there is the code I try to implement : `
` but it doesn't work : the random pic is taken from the whole gallery and not in my dynamic album. what's going wrong ? random pict of a dynamic album - sbillard - 2011-02-22 Since that is a dynamic album presumably the images could come from anywhere in the gallery. random pict of a dynamic album - flu - 2011-02-22 Hi, `` random pict of a dynamic album - vincent3569 - 2011-02-22 @flu : printRandomImages() have a call of getRandomImagesAlbum() if option = album @sbillard : I don't understand what you would say. where is the problem ? random pict of a dynamic album - flu - 2011-02-22 It works very fine for me that way : Cheers. random pict of a dynamic album - vincent3569 - 2011-02-22 @flu `` works well and `` works well too but if I want daily picture it doesn't work : the random pic is taken from the whole gallery and not in my dynamic album. => the daily option seems to cause an issue. random pict of a dynamic album - vincent3569 - 2011-02-24 I have created a ticket http://www.zenphoto.org/trac/ticket/1834 random pict of a dynamic album - js0624 - 2011-05-10 Can we list the photo from dynamic album rather than random, cause I followed the codes given by @vincent3569 it is working yet I don't know how can I list all the photos of dynamic album. What I mean is? Is there any functions that says getImagesAlbum, to list down all the contents of the dynamic album, instead of random. Thanks. random pict of a dynamic album - acrylian - 2011-05-10 js0624, why do you post the same question of your topic on another thread? Did you even bother to look at the documentation? How about Of course dynamic albums are special as the images still belong to their real albums. random pict of a dynamic album - js0624 - 2011-05-10 Hi acrylian, my apology, I thought it is much clearer if I will post it here... I tried your code and it works, that's what I am looking for... I have another problem, if you don't mind. I have noticed that only filename and folder is available, how can I get the permalink of the photos? Thanks in advance. random pict of a dynamic album - acrylian - 2011-05-10 It comes all down to this: http://www.zenphoto.org/news/zenphotos-object-model-framework |