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: Album View Sorting  (Read 2733 times)

0 Members and 1 Guest are viewing this topic.

Neosporin

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Album View Sorting
« on: June 17, 2009, 11:27:12 am »

I've search around but can't seem to find a thread stating if its possible to sort the Album selection pages alphabetically (http://mmofaces.net/index.php?cat=4).

As you'll see, about 80% of the way down it starts at "A" again because those were added at a later date, but I want to keep the same alphabetical structure I had going.

Thanks for the help!
Logged

Neosporin

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 24
Re: Album View Sorting
« Reply #1 on: June 17, 2009, 04:30:38 pm »

Okay, I've fixed it. It requires a bit of modding, but what I've done to have it sort is the following:

Find in index.php

Code: [Select]
$sql = 'SELECT a.aid, a.title, a.description, category, 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;
replace with

Code: [Select]
$sql = 'SELECT a.aid, a.title, a.description, category, 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;
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.