Album View Sorting Album View Sorting
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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;