|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
|
Guest |