Updating album "creation times" based on images "taken times"

jimbodude21

Joined: 2007-04-25
Posts: 2
Posted: Wed, 2007-04-25 03:17

It would be great to be able to update the album creation time with the time of the oldest picture/entity contained in that album. For instance, if an album was created March 23rd, but I put pictures in it from January 11th, I would want the album "created date" to be January 11th.

This would be especially useful for me, as I just moved over from coppermine photo gallery - the upgrade script used the time each photo was taken for the image entities, but set the album creation times as if I had just created them - so I have albums created in 2007 with pictures from 2004. This is causing problems when I ask Gallery to sort albums, putting the newest one first - just because it's the newest album doesn't mean it has the newest pictures. In one instance, Gallery is putting an album with photos shot in 2004 before an album shot in 2006 - way off.

This will also be useful as I start doing more shoots - I would be able to upload shoots in a different order than they were shot in, but still have Gallery sort them in the order they were shot in.

If there's already a way to do this, please fill me in, otherwise, this might be a good feature to add in the "Maintanance" section of the Site Admin.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2007-04-25 12:19

> If there's already a way to do this, please fill me in,

No there's no option for that. You'd need to write some php code to accomplish this.

Please consider filing a feature request such that you and other users can vote for it at http://gallery.menalto.com/sfvote/all .
http://gallery.menalto.com/sfvote_help

(I didn't see a related feature request, but I remember discussing a very similar request in the forums before.)

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
jimbodude21

Joined: 2007-04-25
Posts: 2
Posted: Wed, 2007-04-25 14:37

I figured there wasn't currently a way. I'll look into writing something up myself, maybe in a few weeks, or I'll add a feature request.

 
TuXator

Joined: 2009-05-13
Posts: 11
Posted: Sun, 2009-07-12 08:58

Meanwhile I have written such a module, see
http://codex.gallery2.org/Gallery2:Modules:albumtimestamp and http://gallery.menalto.com/node/88995 for details...