Welcome Guest Search | Active Topics | Members | Log In | Register
Need help for sort workaround Options
cgiesen
Posted: Tuesday, December 01, 2009 3:02:08 PM
Rank: Member

Joined: 10/10/2009
Posts: 6
Location: Bochum, Germany
Hello,

yes, I know sorting comes later ;)
But until this, I want to change the ordering for ALL picture by date desc.
Normaly I have only to change th SQL command for collecting pictures.
Right?
And I yes, where can I find the right place?

cu

Carsten
Roger Martin
Posted: Tuesday, December 01, 2009 4:53:08 PM
Rank: Administration

Joined: 8/3/2007
Posts: 1,996
Location: Fort Atkinson, WI
All metadata that is extracted from images is stored in the table gs_MediaObjectMetadata. You can construct a SQL statement that updates the Seq column in gs_MediaObject based on the desired metadata item. It will be a little tricky since the date is extracted as a string and stored as a string, so you'll have to convert it to a date in your SQL statement to get true date sorting.


Roger Martin
Creator and Lead Developer of Gallery Server Pro
cgiesen
Posted: Wednesday, December 02, 2009 2:06:29 AM
Rank: Member

Joined: 10/10/2009
Posts: 6
Location: Bochum, Germany
Hello Martin,

thanks for the quick replay

The SEQ column, did it start for every album at 1 again?

cu

Carsten
Roger Martin
Posted: Wednesday, December 02, 2009 7:45:06 AM
Rank: Administration

Joined: 8/3/2007
Posts: 1,996
Location: Fort Atkinson, WI
Yes, although that is not a requirement. You can give it any number, and the sorting will work because sorting is done by relative comparison of Seq values.


Roger Martin
Creator and Lead Developer of Gallery Server Pro
cgiesen
Posted: Friday, December 18, 2009 4:57:47 PM
Rank: Member

Joined: 10/10/2009
Posts: 6
Location: Bochum, Germany
Hi,

I'm not good in reading c# code :(
But I try ;)
I search for the please where you collect the pictures in the righ order.
Can you please give me a tipp?

Thanks

Carsten
Roger Martin
Posted: Friday, December 18, 2009 8:04:05 PM
Rank: Administration

Joined: 8/3/2007
Posts: 1,996
Location: Fort Atkinson, WI
Gallery objects (which include media objects and albums) are sorted by the Sequence property of the GalleryObject class. That is, the implementation of the IComparable interface in GalleryObject uses the Sequence property to compare itself to other instances of the same type. This implementation is used by the .NET Framework when the Sort method of the GalleryObjectCollection class is invoked. The sort method is called within Album.GetChildGalleryObjects().

Hope this helps,


Roger Martin
Creator and Lead Developer of Gallery Server Pro
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Main Forum RSS : RSS

YAFVision Theme Created by Jaben Cargman (Tiny Gecko)
Powered by Yet Another Forum.net version 1.9.1.2 (NET v2.0) - 9/27/2007
Copyright © 2003-2006 Yet Another Forum.net. All rights reserved.