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.
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.
Comments
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.
You can also set all these things via the admin edit facility.
i have changed album_sortdirection=0, but stills the list didn't get change.
How to change this in admin in single page/click?
As for how to set it in the admin section--take a close look at the gallery options page.