Advanced search  

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

Pages: [1]   Go Down

Author Topic: Album View Sorting  (Read 2695 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.016 seconds with 20 queries.