Sorting files when editing them (editpics.php) Sorting files when editing them (editpics.php)
 

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

Main Menu

Sorting files when editing them (editpics.php)

Started by ashleyXcore, November 16, 2006, 09:17:01 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ashleyXcore

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 :)
"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

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
"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

Anyone? Your help would be greatly appreciated  :)
"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

The code is now


                $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


                $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.

ashleyXcore

"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."