A lot of albums automatically alphabet sort A lot of albums automatically alphabet sort
 

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]

Main Menu

A lot of albums automatically alphabet sort

Started by antisa33, June 09, 2005, 03:58:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

antisa33

Hello
I enjoy a lot the coppermine gallery thank you!!
I have a lot of albums (171) and they are not sorted.
I have tried to sort them by hand by it's very long to do that and it's not automatic.
Where can i modify a file to sort alphabetically all the albums on the main page (index)?
Thank you!!
Isa

havoc615

#1
I think you'd replace:
$sql = 'SELECT a.aid, a.title, a.description, visibility, filepath, '.

          'filename, url_prefix, pwidth, pheight '.

          'FROM '.$CONFIG['TABLE_ALBUMS'].' as a '.

          'LEFT JOIN '.$CONFIG['TABLE_PICTURES'].' as p '.

          'ON a.thumb=p.pid '.

          'WHERE category='.$cat.$album_filter.

          ' ORDER BY a.pos '.

          $limit;

In index.php with:
$sql = 'SELECT a.aid, a.title, a.description, visibility, filepath, '.

          'filename, url_prefix, pwidth, pheight '.

          'FROM '.$CONFIG['TABLE_ALBUMS'].' as a '.

          'LEFT JOIN '.$CONFIG['TABLE_PICTURES'].' as p '.

          'ON a.thumb=p.pid '.

          'WHERE category='.$cat.$album_filter.

          ' ORDER BY a.title '.

          $limit;


You probably have to do it twice, in addition, by the way the codes written, it looks like albums with categories might be after albums without. So they'd sort individually? Im sure you motly have all one way or the other though. Lemmie know how it goes.

antisa33

Thank you havoc615 It's exactly that !!
Thanks !!  :)