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: A lot of albums automatically alphabet sort  (Read 2428 times)

0 Members and 1 Guest are viewing this topic.

antisa33

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 181
    • Free french kids coloring
A lot of albums automatically alphabet sort
« on: June 09, 2005, 03:58:48 pm »

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
Logged

havoc615

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 24
    • Cheat Commandos Clan Site
Re: A lot of albums automatically alphabet sort
« Reply #1 on: June 10, 2005, 03:44:28 am »

I think you'd replace:
Code: [Select]
$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:
Code: [Select]
$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.
« Last Edit: June 10, 2005, 03:50:35 am by havoc615 »
Logged

antisa33

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 181
    • Free french kids coloring
Re: A lot of albums automatically alphabet sort
« Reply #2 on: June 10, 2005, 08:42:45 am »

Thank you havoc615 It's exactly that !!
Thanks !!  :)
Logged
Pages: [1]   Go Up
 

Page created in 0.013 seconds with 15 queries.