Advanced search  

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

Pages: [1]   Go Down

Author Topic: sort album order by name  (Read 3432 times)

0 Members and 1 Guest are viewing this topic.

zom

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 83
sort album order by name
« on: December 10, 2006, 07:23:33 pm »

I know there was a topic about sorting albums but I can't find it anymore.

I would like the albums to be order by name. what mod to apply ?

thanks

« Last Edit: December 13, 2006, 03:00:15 am by GauGau »
Logged
Thanks to everyone

Gizmo

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1015
    • BullsEye Photos
Re: sort album order by name
« Reply #1 on: December 10, 2006, 07:28:07 pm »

http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#admin_album_list

[EDIT] The above is for sorting categories which is not what you meant (I think). At this time, the only way I know to sort albums is manually in the album config - http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#albmgr_order.
« Last Edit: December 10, 2006, 07:45:57 pm by Gizmo »
Logged
Did you read the manual first???? Taking 2 minutes to backup your files can save you hours of wondering what you screwed up.
Billy Bullock - BullsEyePhotos Blog of Indecision

zom

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 83
Re: sort album order by name
« Reply #2 on: December 11, 2006, 08:59:39 pm »

in older version of copermine ther was a little mod to insert in the index file, something like "sort order by name", (I did apply this mod stored on one of my hard drive but thisone has crashed and now I can't find this php line to modify).

Thanks for help.
Logged
Thanks to everyone

Nibbler

  • Guest
Re: sort album order by name
« Reply #3 on: December 11, 2006, 09:16:27 pm »

Logged

zom

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 83
I FOUND IT: sort album order by name
« Reply #4 on: December 12, 2006, 09:57:24 pm »

 ;D OK thanks

I have found it in v1.4 for the ones interested to order your albums by alphabetical order (by name) you must replace in the index file:

'WHERE category=' . $cat . $album_filter . ' ORDER BY a.pos ' . $limit;

by


'WHERE category=' . $cat . $album_filter . ' ORDER BY TITLE ' . $limit;

 ;)
Logged
Thanks to everyone

hasemann

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 44
Re: sort album order by name
« Reply #5 on: December 28, 2006, 09:46:34 pm »

I have no knowledge about php, but isn't it possible to define a certain category to be sorted in a different way?
e.g.
Code: [Select]
if ( ... 'WHERE category='MY_CATEGORY_NUMBER' . $album_filter . ' ORDER BY a.pos ' . $limit; )
else
('WHERE category=' . $cat . $album_filter . ' ORDER BY TITLE ' . $limit;)

???
Logged
Pages: [1]   Go Up
 

Page created in 0.04 seconds with 19 queries.