forum.coppermine-gallery.net

No Support => Feature requests => Topic started by: pols1337 on June 27, 2012, 11:34:43 PM

Title: Sort order of Categories and Albums
Post by: pols1337 on June 27, 2012, 11:34:43 PM
Hi Andre,

I have a brilliant, brilliant idea for you!  In future versions of Coppermine, you can ask if the user wants his categories and albums alphabetically sorted (alphabetical-ascending, alphabetical-descending).  I spend so much time manually sorting my albums, when all I want is for them to be alphabetically sorted  :o

Currently in Coppermine, you ask in Config > Albums if Categories should be alphabetically sorted.  (See attached)  But you should also ask for albums, since those are another list that many users may want to be auto-sorted. 

Additionally, perhaps you should move the option for alphabetical sorting from the Config menu to "Files" > "Categories" or "Files" > "Album" menus, since those would be the more 'logical' places to ask about ordering.

Just a thought. 

Joel

Gallery link: http://adonismale.com/tg/index.php (http://adonismale.com/tg/index.php)
Title: Re: Sort order of Categories and Albums
Post by: Αndré on June 28, 2012, 08:20:15 AM
albums alphabetically sorted
It's already on my TODO list for cpg1.6.x and maybe also as a hidden config option for cpg1.5.x.
Title: Re: Sort order of Categories and Albums
Post by: Αndré on June 29, 2012, 02:12:20 PM
Added config option for cpg1.6.x and hidden feature for cpg1.5.x in SVN revision 8453.

Additionally, I plan to add some user defined sort order like it's done for thumbnails and each a config option to toggle that feature.
Title: Re: Sort order of Categories and Albums
Post by: pols1337 on June 29, 2012, 03:24:58 PM
Nice.  Good job  :)
Title: Re: Sort order of Categories and Albums
Post by: pols1337 on January 10, 2013, 08:12:51 PM
Oh dear god, I hope you're planning to release cpg1.6.x soon ... if only so I can use this option.  So much time wasted on reordering albums manually.   :o
Title: Re: Sort order of Categories and Albums
Post by: Phill Luckhurst on January 10, 2013, 09:19:24 PM
1.6 is a long way off at the moment. Please look at the code changes Andre has made as they allow you to do just what you are after.
Title: Re: Re: Sort order of Categories and Albums
Post by: Αndré on January 11, 2013, 10:13:06 AM
Added [..] hidden feature for cpg1.5.x in SVN revision 8453.

If you don't need this feature urgently, just wait for the release of cpg1.5.22 (which will be released soon).
Title: Re: Sort order of Categories and Albums
Post by: pols1337 on January 11, 2013, 05:05:36 PM
Okay sounds good!

 :)
Title: Re: Sort order of Categories and Albums
Post by: Phill Luckhurst on January 11, 2013, 05:26:59 PM
Andre release 1.5.22 today - http://forum.coppermine-gallery.net/index.php/topic,75858.0.html
Title: Re: Sort order of Categories and Albums
Post by: pols1337 on January 11, 2013, 05:39:57 PM
Yup.  I'm already uploading to my server!
Title: Re: Sort order of Categories and Albums
Post by: pols1337 on January 11, 2013, 05:46:23 PM
Okay.  Whoa, let's take a step back.  Apparently the option is hidden ... so how can I toggle it? 
Title: Re: Sort order of Categories and Albums
Post by: Αndré on January 11, 2013, 06:02:51 PM
You have to edit the config value directly in your MySQL database with a tool like PHPMyAdmin.
Title: Re: Sort order of Categories and Albums
Post by: pols1337 on January 11, 2013, 07:37:53 PM
Okay, so I think I got to the config value via PHPMyAdmin ... album_sort_order = pa.  What should it be set to, or what are the other choices?
Title: Re: Sort order of Categories and Albums
Post by: pols1337 on January 21, 2013, 12:16:24 AM
/bump  :)
Title: Re: Sort order of Categories and Albums
Post by: Αndré on January 21, 2013, 04:15:18 PM
Possibilities:
Code: (trunk/cpg1.6.x/include/admin.inc.php) [Select]
    'album_sort_order' => array(
      'type'          => 'select',
      'default_value' => 'pa',
      'help_link'     => 'f=configuration.htm&as=admin_album_sort_order_start&ae=admin_album_sort_order_end',
      'options'       => array('ta' => $lang_admin_php['title_a'],
                           'td' => $lang_admin_php['title_d'],
                           'da' => $lang_admin_php['date_a'],
                           'dd' => $lang_admin_php['date_d'],
                           'pa' => $lang_admin_php['pos_a'],
                           'pd' => $lang_admin_php['pos_d'],
                         ),
    ),

So you can sort by title, date and position each ascending and descending.