News:

CPG Release 1.6.31
Minor maintenance release
Clean up remaining remnants of the .net CPG website
Improved installer_stub compatibility with various server configurations

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