Album View Sorting Album View Sorting
 

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

Album View Sorting

Started by Neosporin, June 17, 2009, 11:27:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Neosporin

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!

Neosporin

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

$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

$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;