Sort order of Categories and Albums Sort order of Categories and Albums
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Sort order of Categories and Albums

Started by pols1337, June 27, 2012, 11:34:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

pols1337

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

Αndré

Quote from: pols1337 on June 27, 2012, 11:34:43 PM
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.

Αndré

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.

pols1337


pols1337

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

phill104

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.
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

Quote from: Αndré on June 29, 2012, 02:12:20 PM
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).

pols1337


phill104

It is a mistake to think you can solve any major problems just with potatoes.

pols1337

Yup.  I'm already uploading to my server!

pols1337

Okay.  Whoa, let's take a step back.  Apparently the option is hidden ... so how can I toggle it? 

Αndré

You have to edit the config value directly in your MySQL database with a tool like PHPMyAdmin.

pols1337

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?

pols1337


Αndré

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.