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: Sorting files when editing them (editpics.php)  (Read 2573 times)

0 Members and 1 Guest are viewing this topic.

ashleyXcore

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 49
    • Magazine Junkie
Sorting files when editing them (editpics.php)
« on: November 16, 2006, 09:17:01 am »

I would like the files to be shown newest-oldest when I am editing them, and I found this thread which tells how to do it, but it is older and the code isn't in my version of editpics.php - can someone tell me what to change to show the newest files on top?

Thanks :)
« Last Edit: November 18, 2006, 06:23:46 am by Sami »
Logged
"There are many kinds of eyes. Even the sphinx has eyes and consequently there are many kinds of 'truths', and consequently there is no truth."

ashleyXcore

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 49
    • Magazine Junkie
Re: Sorting files when editing them (editpics.php)
« Reply #1 on: November 16, 2006, 09:58:57 am »

Also, the FAQ must be outdated because when I search for that line it tells me to change, it doesn't exist...
http://coppermine-gallery.net/demo/cpg14x/docs/faq.htm#changeOrderEdit
Logged
"There are many kinds of eyes. Even the sphinx has eyes and consequently there are many kinds of 'truths', and consequently there is no truth."

ashleyXcore

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 49
    • Magazine Junkie
Re: Sorting files when editing them (editpics.php)
« Reply #2 on: November 17, 2006, 09:45:46 pm »

Anyone? Your help would be greatly appreciated  :)
Logged
"There are many kinds of eyes. Even the sphinx has eyes and consequently there are many kinds of 'truths', and consequently there is no truth."

Nibbler

  • Guest
Re: Sorting files when editing them (editpics.php)
« Reply #3 on: November 17, 2006, 09:49:32 pm »

The code is now

Code: [Select]
                $sql = "SELECT p.*,a.category FROM {$CONFIG['TABLE_PICTURES']} as p ".
                           "INNER JOIN {$CONFIG['TABLE_ALBUMS']} as a ".
                           "ON a.aid=p.aid ".
                           "WHERE p.aid = '$album_id' ".
                           "ORDER BY p.filename LIMIT $start, $count";
                $result = cpg_db_query($sql);

and should be changed to

Code: [Select]
                $sql = "SELECT p.*,a.category FROM {$CONFIG['TABLE_PICTURES']} as p ".
                           "INNER JOIN {$CONFIG['TABLE_ALBUMS']} as a ".
                           "ON a.aid=p.aid ".
                           "WHERE p.aid = '$album_id' ".
                           "ORDER BY pid LIMIT $start, $count";
                $result = cpg_db_query($sql);

to apply the mod.
Logged

ashleyXcore

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Female
  • Posts: 49
    • Magazine Junkie
Re: Sorting files when editing them (editpics.php)
« Reply #4 on: November 18, 2006, 06:15:01 am »

Thanks so much for the help =P
Logged
"There are many kinds of eyes. Even the sphinx has eyes and consequently there are many kinds of 'truths', and consequently there is no truth."
Pages: [1]   Go Up
 

Page created in 0.016 seconds with 19 queries.