Member
Member
southdreamz   2009-05-14, 13:37
#1

Dear support,

I want list(sort) all albums by its sub albums or images updated date, how to do that?

currently I'm listing albums by date, but it is sorting only newly created albums, but not updated albums.

Administrator
Administrator
acrylian   2009-05-14, 14:29
#2

HAve you tried setting the option to "filemtime"? Besides that you can list the latest updated albums using the image_album_statistics plugin.

Member
Member
sbillard   2009-05-14, 17:20
#3

There is an option which will transfer the date of a newly uploaded image to the album date of its parent album. Is that what you are looking for?

Member
Member
southdreamz   2009-05-14, 17:33
#4

@acrylian:
I have updated the album options with your solution, with the following query:

UPDATE ``zp_albums SET sort_type ='mtime', subalbum_sort_type='mtime' WHERE 1

it is working exactly, but it is descending order, but i want latest first!

@sbillard: Yes, is there another sort way, we can do it.

Member
Member
sbillard   2009-05-14, 19:05
#5
  1. You need to set the direction to ascending. If you wish to do this with SQL, the filed is album_sortdirection and needs to be set to 1.

You can also set all these things via the admin edit facility.

Member
Member
southdreamz   2009-05-15, 03:20
#6

Hello sbillard,

i have changed album_sortdirection=0, but stills the list didn't get change.

How to change this in admin in single page/click?

Member
Member
sbillard   2009-05-15, 17:05
#7

Well, of course if you sedt it to 0, not 1 as I said above, it will not give you what you want!

As for how to set it in the admin section--take a close look at the gallery options page.

Member
Member
southdreamz   2009-05-16, 03:42
#8

Thanks sbillard, i will try it.

Member
Member
southdreamz   2009-05-17, 08:18
#9

sbillard: latest image date was updated album date, but it is not updating it's parent album( which is don't have images, only sub albums).

Member
Member
sbillard   2009-05-17, 14:21
#10

Sorry, there is no option to update anything but the containing album.

Member
Member
southdreamz   2009-05-18, 07:28
#11

Is there any possible we can get it future? or please give me idea, how to update the album date with it's latest sub album date.

Administrator
Administrator
acrylian   2009-05-18, 08:28
#12

You probably could write a function to check the subalbums' dates of an album and then change the parent album's date with the newest found. You will have to use the class methods for that.

Member
Member
sbillard   2009-05-18, 15:42
#13

You can build a filter that does this. Register to the the new_image filter. You can use the filter-new_objects plugin as a starting point. The new_image filter will be called each time a new image is instantiated. Your code should walk back the parent chain setting the date fields as you see fit.

Member
Member
omatzyo   2009-09-14, 19:46
#14

Has anyone done this? I would like to do the same thing, but not reinvent the wheel.

  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.