forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 themes/skins/templates => Topic started by: Neosporin on June 17, 2009, 11:27:12 am

Title: Album View Sorting
Post by: Neosporin 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!
Title: Re: Album View Sorting
Post by: Neosporin 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;