sort albums by date sort albums by date
 

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

sort albums by date

Started by zieloo, October 06, 2007, 03:00:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zieloo

Hi

How do I sort albums inside a category by date (asc or desc, whatever) ?

Thanks

just_some_guy

use the "DATE + -" buttons on the top right.
Tambien, Hablo EspaƱol      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

zieloo

Quote from: just_some_guy on October 06, 2007, 03:02:06 PM
use the "DATE + -" buttons on the top right.

I want to sort the albums NOT the pictures within them...

zieloo


Nibbler

You can make a small mod to index.php to adjust the sort order. Search the board - the answer is already posted.

zieloo

#5
Done. :D
Change:
'    $sql = 'SELECT a.aid, a.title, a.description, 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;'

to:
'    $sql = 'SELECT a.aid, a.title, a.description, 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 DESC ' . $limit;'

line: aprox 605, file: index.php

Thanks, Nibbler :)