Setting the sort order of thumbnails on the seach results page Setting the sort order of thumbnails on the seach results page
 

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

Setting the sort order of thumbnails on the seach results page

Started by ejgladwin, August 23, 2005, 05:37:11 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ejgladwin

Hello,

I installed Coppermine 1.3.2 and I have modified it quite a bit to make it work the way I want.  The only thing I'd like to do which I haven't been able to do, is change the sort order of the thumbnails for the search results page.

I'd like the thumbnails for search results to be ordered so that the most recently uploaded files are shown first.  At the moment it seems at though it is showing the earliest thumbnails first, and the most recent thumbnails last (or it could also be name ascending).

I tried changing the default sort order in the Coppermine config screen but this doesn't seem to affect how the search results are ordered.

Thanks in advance for any help,

Edward ~

http://photos.edgladwin.com/

Nibbler

You'll need to hardcode it, look in include/search.inc.php, find:

$sql = "SELECT $select_columns " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE ($pic_set) " . "AND approved = 'YES' " . "$ALBUM_SET $limit";

and change to

$sql = "SELECT $select_columns " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE ($pic_set) " . "AND approved = 'YES' " . "$ALBUM_SET ORDER BY pid DESC $limit";

ejgladwin