Album Sort Order Again...Sorry Album Sort Order Again...Sorry
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Album Sort Order Again...Sorry

Started by kaptainkory, August 13, 2005, 01:14:39 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

kaptainkory

Sorry to bring up a topic I'm sure has been covered before...

I've skimmed these threads:
http://forum.coppermine-gallery.net/index.php?topic=13385.0
http://forum.coppermine-gallery.net/index.php?topic=7541.0

Right now, as I understand it, sorting is EITHER "global" or "custom", but nothing in between:

Global
Per Album ??? (nope.)
Custom

In my opinion, an extra database field per album that determines sorting IS needed.  {These could mirror the global settings, PLUS a setting that defaults to global ("gl") and a setting for custom ("cu").}  Let me illustrate why.

Let's say I have a gallery of several albums.  Most of the albums are broken up by category: "cars", "pets", and so forth.  For these, I want the latest pictures to show up first when viewed.  No problem, I just set global sorting to date descending.  I also have a small album for "friends" and the file names are based on the names of the friends.  I would like this album to be sorted by file name.  It would be nice to just set this particular album to sort by file name, but since it's small, I manage with the custom sorting and get it set right.  But then things get difficult because I also have 3-4 albums of "trips" with 100-200 pictures each.  Because of the global sorting, when people pull up an album of a trip, they view it completely in reverse...which makes no sense.  The order should be chronological from the start of the trip to the end.  Again, I *could* use custom sorting, but for 200 pictures (and to get them in exactly the opposite order)???  What a pain!

Thoughts?

Joachim Müller

valid request. Needs looking into in the future. A mod would be welcome.

Brendan

I just started a new topic that partially addresses this. 

http://forum.coppermine-gallery.net/index.php?topic=41160.0

You want to use position as your global order, but to have certain albums sorted the other way by default.  On the sort page, there should be a check box or radio button that changes the order of the pictures listed so you don't have to change every single picture.

In here:
picmgr.php
      $result = cpg_db_query("SELECT aid, pid, filename FROM {$CONFIG['TABLE_PICTURES']} WHERE aid = $aid ORDER BY position ASC, pid DESC");

The radio or check box should just change the order by.

-Brendan

Joachim Müller