![]() |
|
Dynamic album to show most recent photos/videos - 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: Dynamic album to show most recent photos/videos (/thread-13371.html) |
Dynamic album to show most recent photos/videos - seaniedan - 2020-02-25 I have looked but can't find a way to create a dynamic album to show the n latest items, or all items from the last 24 hours, week or year for example. How do I do that? Dynamic album to show most recent photos/videos - acrylian - 2020-02-26
That would be sortorder by some date or ID (= upload order)
This is not possible predefined. Dynamic album to show most recent photos/videos - vincent3569 - 2020-03-05 hi Dynamic album to show most recent photos/videos - davidarnoult - 2020-10-31 Hi, Dynamic album to show most recent photos/videos - acrylian - 2020-10-31 A dynamic album is just a search so you can define search condition on basically any field/column in the database. You cannot limit the results per se because its a search results. If it is just the output on the theme, you can use the album class directly. Just loop through them and filter as needed by date and number. See the album class(es) for available methods to use. Dynamic album to show most recent photos/videos - davidarnoult - 2020-10-31 Thanks @acrylian. Is the code block section of the dynamic album the correct place to put the code? Dynamic album to show most recent photos/videos - acrylian - 2020-10-31 I can't tell where to put the code as I don't exactly know where you want to do this ;-) I for example bascially avoid using code block as you easily forget where you put what and do everything within theme files directly. If you displaying the album via the normal album.php page as any other album, you need to modify the theme's album.php and it's next_album loop for this specific album. Or create a custom album.php layout to for example use the multiple layouts plugin. Depend Dynamic album to show most recent photos/videos - davidarnoult - 2020-11-05 Thanks. I modify the album.php. I have added a test on an empty static album (nouveautes) and I would like to fill it with getImageStatistic to publish the result images array into the album. Do you know how to do that? Dynamic album to show most recent photos/videos - acrylian - 2020-11-05 You need to look at the documentation. Base rule of all functions and methodes is basically everywhere:
Get function exists so you can create your own custom output if needed. You can also use a dynamic album and the album object to limit the output and the pages using the object. That is easier as you don't have to adjust CSS for this and just re-use the album styles. Generally if you modify album.php the cleanest way is to use the multiplelayouts plugin and create a specific album layout page for it and assign that to the album in question. Also if you don't use the "album" functionality itself it might be worth a though to use either a Zenpage page or a static custom page for this. As naturally just chaning the code does not touch other album specific things like pagination etc. Dynamic album to show most recent photos/videos - davidarnoult - 2020-11-06 Thanks @acrylian. At first place I was trying to use dynamic album object within my single theme but I did not succeed to limit the output easily (performance was very slow, it was loading all photos before starting the image loop as search criteria is all the photos but the latest). I will persevere on this path using doc objects nevertheless which sounds the easiest... Question: Does ZP support child theme (to use multiplelayout and change album.php only)? Dynamic album to show most recent photos/videos - acrylian - 2020-11-06
You could try for example set the object properties to limit the items per page to avoid loading all. But the problem is a dynamic album works with dynamic search results so there is is not a static set of data like on physical albums.
No. But you can just add a new Dynamic album to show most recent photos/videos - davidarnoult - 2020-11-25 Thanks @acrylian. I worked it out. |