I've just installed Gallery 2, and am in the process of migrating all of my Gallery 1 data. At some point, my gallery 1 album order went really wacky. Well, gallery 2 has this really fantastic feature of being able to sort the main album by the album date. This has helped a bunch, but of course my album dates are all after the date I would really like for them to be. I wonder if there is an easy way to set the album date based on the information from one of the images in the gallery (say the oldest image, youngest image, or even hightlight image)?
Any ideas?
Thanks,
Rick
Posts: 32509
nope, there isn't. that would be feature request 510 or so.
you could write a maintenance task that does that for you, but still, you'd have to code...
Posts: 92
I'm not afraid of coding something (I know how to do backups) but figuring out the API may be a little tough. I'll dig into the API docs and try to decide if it will be faster to code something or date them all by hand.
Posts: 32509
take a look at the other maintenance tasks.
e.g. modules/core/classes/SetOriginationTimestampTask.class
which sets the origination timestamp of all items (not albums) according to the exif date.
so you could hack this file to also set the timestamp also for albums.
or you create your own module:
your module needs 2 files
modules/modulename/module.inc
and
modules/modulename/classes/SetAlbumOriginationTimestampTask.class
(you want to set the originationTimestamp, so i thought that may be a good name)
in module.inc you need a constructor and a performFactoryRegistrations function.
this code is needed in performFactoryRegistration. i assumed your module name is setalbumdate.
etc.
see the developers link at the top of the this page and take a look at codex.gallery2.org.
Posts: 92
Thanks for the pointers.
Rick
Posts: 2
Hi
I'm also very interested in this kind of functionality for my G2 installation, so just I'm wondering if there has been any progress made?
Andreas
Posts: 92
Not much from my point. I spent a few hours on it, and managed to get a module that won't activate. I'll spend some more time this week.
Rick