ZenphotoCMS Forum
Album with the latest photos? - 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: Album with the latest photos? (/thread-3454.html)



Album with the latest photos? - RichT - 2008-08-12

I'm looking to have an album that is just a collection of the last 100 photos (or so) photos that have been added to any album. Is this possible? I've heard about dynamic albums but I've yet to figure out how to create one (not sure if that's the answer or not). Thanks, Rich




Album with the latest photos? - sbillard - 2008-08-12

The simplest way is to tag each image that you want in the album with an identifier. Then do a search on that identifier. This will give you a search page with your 100 or so albums. From the admin toolbox on this page click create dynamic album.

On the page for creating the dynamic album make sure that the search fields include just the tags field.




Album with the latest photos? - tokyoahead - 2008-09-10

What a pity. Specially since the date is in the database. There could be a search function with < > operators and the date...

to keep this permanently up to date in the proposed way makes it impossible to use IMHO.




Album with the latest photos? - code - 2008-09-10

Im sure its possible...




Album with the latest photos? - code - 2008-09-10

Just by looking at the database it looks like you, well im not sure what "mtime" is...
if not you could sort by the date/time of the picture taken...Anyways, there is a table called "images" with all the images, they all have album id's "albumid" which corresponds with the "albums" table, with the field of "id"

Ex:
get the list, sorting by the mdate or date taken, to show most recent, get the last 100 entries, and then for each image you receive, get the albumid for that image, and then you can figure out the album for it and then use that information to create a thumbnail and links...

This is of course my newb suggestion which I dont know a lot about PHP
Not to mention it would probably take some implemention to use zenphotos functions or to create new ones...

Im no zenphoto/php/sql pro... I can just look around




Album with the latest photos? - acrylian - 2008-09-10

Also we have image statistics functions for the latest images: http://www.zenphoto.org/documentation/plugins/_plugins---image_album_statistics.php.html
You could use the getImageStatistic() latests images option to get them. Depending on your PHP knowledge you could make a custom function and use a custom page with that that looks like an album page. Of course it would not intregrate into the "real" albums loop.




Album with the latest photos? - code - 2008-09-10

See I knew there had to of been functions already :p




Album with the latest photos? - Laurent - 2008-09-10

I use this fonction on my site .
You have to make some comestic display with CSS or changing the code in imaga_album_statistic.php

Regards
Laurent