How to display "today popular photos" in homepage?
bigu_c
Joined: 2007-10-28
Posts: 421 |
Posted: Fri, 2013-10-25 13:43 |
As my title ask, anyone know how? I tried search in this forum, and modules page but don't find out solution. |
|
Posts: 27300
I guess you need to explain by "today" do you mean in the last 24 hours?
So a query to see the items that have been viewed in the last 24 hours and sort them by views? Only displaying them? What if there is no views of any items in the last 24 hours? Is this a slideshow or a carousel or what? Where is it to be displayed, on a external page or the root album of Gallery?
A better user story is needed.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 421
I guess you need to explain by "today" do you mean in the last 24 hours? --> Yes.
So a query to see the items that have been viewed in the last 24 hours and sort them by views? --> Yes.
Only displaying them? What if there is no views of any items in the last 24 hours? -> If not, will display latest update, or random photos.
Is this a slideshow or a carousel or what? --> This will display in "normal" like" albums, or photos I added on my site
Where is it to be displayed, on a external page or the root album of Gallery? --> I want to display on homepage (root album).
Thanks.
Posts: 27300
Where on the the root album?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
you need to expalin this a bit more as well.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 8339
a couple of different image block options based on RSS feeds. http://galleryproject.org/node/106581
But you'd need to create the feed.
-s
________________________________
All New jQuery Minislideshow for G2/G3
Posts: 421
Where on the the root album? -> Sorry, I understand wrong about "root album". I just want to display on homepage.
you need to expalin this a bit more as well. --> For example: In my homepage: domain.com, I choose "Add" -> "Addd photos" or "Add an album", after adding, my photos or my album will display in my homepage, then I want popular photos last 24 hours will display same like this.
(Sorry for my English).
Posts: 1857
(1) As far as I know, the Gallery database doesn't retain information about the last time an image was viewed. That being the case, I'm not sure that this is doable unless you add a field to the database and edit Gallery to update it each time an image is viewed.
(2) If you just want to find the photos that were viewed in the last 24 hours and sort by lifetime views, you can do it after you solve #1. If you only want to count views that also happened in the last 24 hours, that'll take more effort, more coding, and more tables/fields. (Gallery, by default, doesn't know WHEN the image was viewed; it only knows THAT the image was viewed.)