Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Setting the sort order of thumbnails on the seach results page  (Read 2435 times)

0 Members and 1 Guest are viewing this topic.

ejgladwin

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 21
    • Edward Gladwin's Photo Gallery

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/
« Last Edit: August 23, 2005, 08:55:07 pm by Nibbler »
Logged

Nibbler

  • Guest
Re: Setting the sort order of thumbnails on the seach results page
« Reply #1 on: August 23, 2005, 08:12:35 pm »

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

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

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

ejgladwin

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 21
    • Edward Gladwin's Photo Gallery
Re: Setting the sort order of thumbnails on the seach results page
« Reply #2 on: August 23, 2005, 08:31:04 pm »

Thanks very much, that worked perfectly  ;D
Logged
Pages: [1]   Go Up
 

Page created in 0.012 seconds with 15 queries.