I'm using cpg 1.5.12 Revision: 8154.
As suggested by others I've added a field pdate to the database, holding the shooting date and time of the photo. This field is filed from exif data during upload. Inorder to sort on this filed, I have modified functions.inc.php line 1296 and 1297 as follows:
$sort_array = array(
'na' => "filename $ASC, pid $ASC",
'nd' => "filename $DESC, pid $DESC",
'ta' => "title $ASC, pid $ASC",
'td' => "title $DESC, pid $DESC",
'da' => "ptime $ASC, pid $ASC",
'dd' => "ptime $DESC, pid $DESC",
'pa' => "position $ASC, pid $ASC",
'pd' => "position $DESC, pid $DESC",
);
Selecting sort by date I get the expected result, thumbnails are correctly sorted by the ptime, however when I click on a thumbnail a totally different photo is selected. When using any other sort the correct picture is selected. Does anyone know what I have done wrong?
I include my modified functions.inc.php file.
Thomas Christfort