Advanced search  

News:

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

Pages: [1]   Go Down

Author Topic: Sort order of Categories and Albums  (Read 12045 times)

0 Members and 1 Guest are viewing this topic.

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 239
Sort order of Categories and Albums
« 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
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15244
Re: Sort order of Categories and Albums
« Reply #1 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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15244
Re: Sort order of Categories and Albums
« Reply #2 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.
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 239
Re: Sort order of Categories and Albums
« Reply #3 on: June 29, 2012, 03:24:58 PM »

Nice.  Good job  :)
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 239
Re: Sort order of Categories and Albums
« Reply #4 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
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4281
    • Windsurf.me
Re: Sort order of Categories and Albums
« Reply #5 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.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15244
Re: Re: Sort order of Categories and Albums
« Reply #6 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).
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 239
Re: Sort order of Categories and Albums
« Reply #7 on: January 11, 2013, 05:05:36 PM »

Okay sounds good!

 :)
Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4281
    • Windsurf.me
Re: Sort order of Categories and Albums
« Reply #8 on: January 11, 2013, 05:26:59 PM »

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

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 239
Re: Sort order of Categories and Albums
« Reply #9 on: January 11, 2013, 05:39:57 PM »

Yup.  I'm already uploading to my server!
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 239
Re: Sort order of Categories and Albums
« Reply #10 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? 
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15244
Re: Sort order of Categories and Albums
« Reply #11 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.
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 239
Re: Sort order of Categories and Albums
« Reply #12 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?
Logged

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 239
Re: Sort order of Categories and Albums
« Reply #13 on: January 21, 2013, 12:16:24 AM »

/bump  :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15244
Re: Sort order of Categories and Albums
« Reply #14 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.089 seconds with 19 queries.