ZenphotoCMS Forum
Last images and popular as albums - 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: Last images and popular as albums (/thread-3653.html)



Last images and popular as albums - Laurent - 2008-08-31

Hi,

I play with this two functions : printPopularImages(20); and printLatestImages(20); .
The function works fine but i wonder this there are à way to display the pictures as any othet albums.
In fact, I'll like to have a "special gallery" with two albums : The most views pictures and the last pictures upload on the server.

Is there a function to do that ?

Regards
Laurent




Last images and popular as albums - sterk - 2008-08-31

you can make a new php file within your theme folder, for example top.php. you put your code in there and if you go to domain.com/index.php?p=top or domain.com/page/top you'll have a page with only the most viewed or last pictures.




Last images and popular as albums - acrylian - 2008-09-01

Sterk's idea I would have recommended, too. With some css styling it should be possible to have that look like a normal album.

For the lastest images it might be possible to create a dynamic album for all images and then sort that by id/date to show the latest.
Although I did not try that.




Last images and popular as albums - Laurent - 2008-09-01

Thank sterk and acrylian,

I already do that, but with this method you have to play with the css.
I think that if we can put a hack of the printImageStatistic function in this code (in theme/index.php)

`




Last images and popular as albums - acrylian - 2008-09-01

You can do that. getImageStatstic() gets the array you can use to create your own custom printImageStatsitic() function. That's why we always have a get and print variant..:-)




Last images and popular as albums - Laurent - 2008-09-01

Yes i saw that and i'm making some test, but at this time the result is not what i want.
The php is quite difficult for me.

I think i'll have to ask again to you for some help ....

Regards
Laurent