I just downloaded Gallery2 last night and set up a test site using migrated data from my gallery 1.x instance.  Looks awesome.  
As we know by now that the album ordering is not preserved as part of the migration.  I was actually wondering if there will be an option to keep the album list in a sorted order, like there is for the album itself.  I want to be able to sort by directory name (not title), because I prefix all of my directories with a date (i.e. 2004-05-30_-_My_Album).  
Also, it would be nice to choose ascending or descending since I want to be able to show the latest albums first.
Thanks...and keep up the great work!
Anil
Posts: 8601
On any G2 album choose "edit album" and pick the "Album Basics" tab.. sort order is at the top. It does have ascending/descending, but it doesn't have sort by (path) name.
Posts: 974
It's on my task list, though.
:D
Posts: 6
Hmm...the wording around that ("Edit Album", "Album basics") is not that intuitive...but I'm sure that'll get fixed at some point. Is it possible to add a sort by name (path name/file name)?
Posts: 7994
Right now you can't sort by path or file name, but we will eventually add many more sort types (it's relatively easy to do).
Posts: 6
Cool...thanks...
Posts: 6
Hi,
here is a patch that allows me to sort by name. I am using an similar scheme as aarora to archive my pictures.
It's seemed enough, but maybe someone could have a look at it if something else needs to be done to make it complete.
Index: modules/core/AdminCore.inc =================================================================== RCS file: /cvsroot/gallery/gallery2/modules/core/AdminCore.inc,v retrieving revision 1.52 diff -u -r1.52 AdminCore.inc --- modules/core/AdminCore.inc 8 Oct 2004 01:35:36 -0000 1.52 +++ modules/core/AdminCore.inc 23 Oct 2004 14:02:53 -0000 @@ -233,6 +233,7 @@ 'modificationTimestamp' => $module->translate('Last Changed Date'), 'description' => $module->translate('Description'), 'keywords' => $module->translate('Keywords'), + 'pathComponent' => $module->translate('Name'), 'viewCount' => $module->translate('View Count')); /* Set up our sort direction selection list */ Index: modules/core/ItemEditAlbum.inc =================================================================== RCS file: /cvsroot/gallery/gallery2/modules/core/ItemEditAlbum.inc,v retrieving revision 1.47 diff -u -r1.47 ItemEditAlbum.inc --- modules/core/ItemEditAlbum.inc 19 Oct 2004 22:59:33 -0000 1.47 +++ modules/core/ItemEditAlbum.inc 23 Oct 2004 14:02:54 -0000 @@ -423,6 +423,7 @@ 'modificationTimestamp' => $module->translate('Last Changed Date'), 'description' => $module->translate('Description'), 'keywords' => $module->translate('Keywords'), + 'pathComponent' => $module->translate('Name'), 'viewCount' => $module->translate('View Count')); /* Set up our sort direction selection list */ Index: modules/core/classes/helpers/GalleryChildEntityHelper_simple.class =================================================================== RCS file: /cvsroot/gallery/gallery2/modules/core/classes/helpers/GalleryChildEntityHelper_simple.class,v retrieving revision 1.12 diff -u -r1.12 GalleryChildEntityHelper_simple.class --- modules/core/classes/helpers/GalleryChildEntityHelper_simple.class 8 Oct 2004 01:35:37 -0000 1.12 +++ modules/core/classes/helpers/GalleryChildEntityHelper_simple.class 23 Oct 2004 14:02:56 -0000 @@ -471,6 +471,11 @@ $condition = '[GalleryItem::id] = [GalleryChildEntity::id]'; break; + case 'pathComponent': + $orderColumn = '[GalleryFileSystemEntity::pathComponent]'; + $condition = '[GalleryFileSystemEntity::id] = [GalleryChildEntity::id]'; + break; + case 'viewCount': $orderColumn = '[GalleryItemAttributesMap::viewCount]'; $condition = '[GalleryItemAttributesMap::itemId] = [GalleryChildEntity::id]';Posts: 6
I updated the patch for the current cvs head. It would be nice if this could be integrated.
Thanks!
Posts: 7994
I applied this patch to the core code. Good work, kcl .. thanks!