Advanced search  

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]

Pages: [1]   Go Down

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

0 Members and 1 Guest are viewing this topic.

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 244
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: 15764
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: 15764
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: 244
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: 244
Re: Sort order of Categories and Albums
« Reply #4 on: January 10, 2013, 07: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

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Sort order of Categories and Albums
« Reply #5 on: January 10, 2013, 08: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: 15764
Re: Re: Sort order of Categories and Albums
« Reply #6 on: January 11, 2013, 09: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: 244
Re: Sort order of Categories and Albums
« Reply #7 on: January 11, 2013, 04:05:36 pm »

Okay sounds good!

 :)
Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Sort order of Categories and Albums
« Reply #8 on: January 11, 2013, 04: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: 244
Re: Sort order of Categories and Albums
« Reply #9 on: January 11, 2013, 04:39:57 pm »

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

pols1337

  • Coppermine frequent poster
  • ***
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 244
Re: Sort order of Categories and Albums
« Reply #10 on: January 11, 2013, 04: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: 15764
Re: Sort order of Categories and Albums
« Reply #11 on: January 11, 2013, 05: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: 244
Re: Sort order of Categories and Albums
« Reply #12 on: January 11, 2013, 06: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: 244
Re: Sort order of Categories and Albums
« Reply #13 on: January 20, 2013, 11:16:24 pm »

/bump  :)
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Sort order of Categories and Albums
« Reply #14 on: January 21, 2013, 03: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.039 seconds with 19 queries.