Date sort order Date sort order
 

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

Date sort order

Started by jmbox, October 24, 2003, 12:09:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jmbox

I notice that currently, when using the date sort order for the thumbnails, it sorts by the PID column rather than the CTIME column.

PID is not really a date and only matches CTIME order if you don't change your CTIMEs :D

However, what I would like to see is cpg picking up the date/time from the jpg file and storing that in the database and then being able to use that to sort by. The date on my jpgs are the date when I took the picture.

Somebody else asked about changing the filenames whilst in the system. This could be done in the "Edit Pics" section. You would just need to modify the filename on the disk and then update the table for the new filename. This same section could also be used to change your picture date/time if you needed to.

I'm new to cpg, but if I get some time, I can look into doing these changes.

DJMaze

When you upload a picture the present date/time of the upload is stored with image, not when you took the picture.

Although saveing upload time is not very hard to add.
//Get actual Greenwich meantime
$servergmt = date("Z");
$gmtime = time()-$servergmt;

// Set time and day number for example
$time = date("H:i:s",$gmtime);
$day = date("w",$gmtime);
There are 2 kinds of users in this world: satisfied and complainers.
Why do we never hear something from the satisfied users?
http://coppermine-gallery.net/forum/index.php?topic=24315.0

jmbox

Yes, I know. I don't care about when I ftp'd them or uploaded them.

Current date doesn't interest me (I have a backlog of photos to process :) )

I'd like to use the date I took the photo, which is stored as the current modification time of the jpg file.

jmbox

Looking through the code, I discovered the wonders of Exif data. This would be a much more reliable source to extract the photo date and insert into the database.

I don't yet have PHP 4.2 installed so I can't use the Exif data.  :(

I used filemtime($image) to set the image time at upload by inserting it into a new column called itime.

Then changed the sort array to this: 'da' => 'itime ASC', 'dd' => 'itime DESC'

Tarique Sani

Quote from: "jmbox"Looking through the code, I discovered the wonders of Exif data.
FYI the next version will have EXIF and IPTC support without requiring any special PHP extensions....

This is already there in the devel branch of the CVS
SANIsoft PHP applications for E Biz

jmbox

Quote from: "tarique"FYI the next version will have EXIF and IPTC support without requiring any special PHP extensions....

This is already there in the devel branch of the CVS
Thanks. Look forward to it.