coppermine-gallery.com/forum

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: Pasci on October 04, 2004, 12:29:04 PM

Title: change date uploaded
Post by: Pasci on October 04, 2004, 12:29:04 PM
Hello there:

Is it possible to manually changed the date where it says "Uploaded on xx.xx.xxxx"?
I want to add the date when the fotos were actually taken and not when I uploaded the photos.
Thank you for your help in advance.
Title: Re: change date uploaded
Post by: Joachim Müller on October 04, 2004, 10:44:17 PM
has been asked before, please search the board.

Joachim
Title: Re: change date uploaded
Post by: Pasci on October 05, 2004, 04:43:22 AM
Hello GauGau:

I went to the phpmyadmin and tried to edit the 'cpgalbums' table. However, when I go to the "last_addition" column, it shows '0000-00-00 00:00:00' for each album, eventhough it says 'October 4th 2004' in the photo gallery. In other words, I am not sure which table or column/row i should change. I tried to change '0000-00-00 00:00:00' to '2004-09-30 00:00:00' for the album that I want to change, but no change took effect in the gallery.
Title: Re: change date uploaded
Post by: Pasci on October 07, 2004, 04:04:57 AM
Any ideas from anybody? I searched the forum multiple times for related threads but I could only find this one, which didn't help much.
http://forum.coppermine-gallery.net/index.php?topic=4731.0
you said
Quoteto edit you would have to edit the database albums table, afaik.
what is afaik???
Title: Re: change date uploaded
Post by: kegobeer on October 07, 2004, 04:14:55 AM
http://www.acronymfinder.com/af-query.asp?Acronym=afaik
Title: Re: change date uploaded
Post by: kegobeer on October 07, 2004, 04:17:08 AM
Try looking in the pictures table instead of the albums table, for mtime.
Title: Re: change date uploaded
Post by: Pasci on October 07, 2004, 10:23:27 AM
Thanks for the reply.
Does it mean I have to change every picture's date in that album??? I changed the mtime of the photo that was selected to be displayed as thumnail in the album overview site, but no change took effect. I'm still stuck on this.
Title: Re: change date uploaded
Post by: Nibbler on October 07, 2004, 05:37:30 PM
Upload date would be ctime, mtime is last viewed date.
Title: Re: change date uploaded
Post by: kegobeer on October 07, 2004, 06:30:16 PM
My bad, sorry.
Title: Re: change date uploaded
Post by: Pasci on October 08, 2004, 09:02:01 AM
Thanks again :)

I went to the ctime, and it says '1096884451', what do the numbers stand for? Maybe MMDDYYYYHH??? By the way, the photos were uploaded on October 4th, 2004.
Also, I have like 40 photos in the album. Do I have to change every single one's ctime, just so that it changes the upload time on the gallery site???? I tried to changed the ctime of the photo whose thumbnail is displayed on the album site, but that had no effect. It still shows the original upload time date.
Title: Re: change date uploaded
Post by: Joachim Müller on October 08, 2004, 09:08:17 AM
the value you see for ctime is a timestamp, representing a date. You can change several/all ctime values at once by running a mySQL query (if you're familiar with phpMyAdmin or similar).

Joachim
Title: Re: change date uploaded
Post by: Pasci on October 08, 2004, 09:22:33 AM
Thanks Joachim,

so, what does '1096884451' stand for, given that it was uploaded October 4th, 2004?
Title: Re: change date uploaded
Post by: Joachim Müller on October 08, 2004, 09:59:09 AM
see http://www.php.net/date and the other php time functions refered to on the php manual page.

Joachim
Title: Re: change date uploaded
Post by: Nibbler on October 08, 2004, 02:09:15 PM
The number is the number of seconds which have passed since January 1st 1970.
Title: Re: change date uploaded
Post by: jul on October 08, 2004, 02:29:59 PM
Hi

Just a few tips:

http://www.4webhelp.net/us/timestamp.php will convert dates for you...

And if you don't want to change all the dates, just change one in the album and  and tweak the index.php file to display the date of the first picture uploaded instead of the last one:

find the following line
$sql = "SELECT aid, count(pid) as pic_count, max(pid) as last_pid, max(ctime) as last_upload ".

and replace it by

$sql = "SELECT aid, count(pid) as pic_count, max(pid) as last_pid, min(ctime) as last_upload ".

It won't give you the wanted dates for the other files but saves time ;-)
Title: Re: change date uploaded
Post by: Pasci on October 10, 2004, 10:13:31 AM
@ Jul:

Thank you very muchf or your detailed reply. The timestamp tool from 4webhelp.net was extremely useful. :)