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

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

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