Advanced search  

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]

Pages: [1]   Go Down

Author Topic: change date uploaded  (Read 6480 times)

0 Members and 1 Guest are viewing this topic.

Pasci

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • bangkokrecorder.com
change date uploaded
« 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.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: change date uploaded
« Reply #1 on: October 04, 2004, 10:44:17 pm »

has been asked before, please search the board.

Joachim
Logged

Pasci

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • bangkokrecorder.com
Re: change date uploaded
« Reply #2 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.
« Last Edit: October 06, 2004, 03:58:15 am by Pasci »
Logged

Pasci

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • bangkokrecorder.com
Re: change date uploaded
« Reply #3 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
Quote
to edit you would have to edit the database albums table, afaik.
what is afaik???
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: change date uploaded
« Reply #5 on: October 07, 2004, 04:17:08 am »

Try looking in the pictures table instead of the albums table, for mtime.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Pasci

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • bangkokrecorder.com
Re: change date uploaded
« Reply #6 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.
Logged

Nibbler

  • Guest
Re: change date uploaded
« Reply #7 on: October 07, 2004, 05:37:30 pm »

Upload date would be ctime, mtime is last viewed date.
Logged

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: change date uploaded
« Reply #8 on: October 07, 2004, 06:30:16 pm »

My bad, sorry.
Logged
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

Pasci

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • bangkokrecorder.com
Re: change date uploaded
« Reply #9 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.
« Last Edit: October 08, 2004, 09:07:20 am by Pasci »
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: change date uploaded
« Reply #10 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
Logged

Pasci

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • bangkokrecorder.com
Re: change date uploaded
« Reply #11 on: October 08, 2004, 09:22:33 am »

Thanks Joachim,

so, what does '1096884451' stand for, given that it was uploaded October 4th, 2004?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: change date uploaded
« Reply #12 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
Logged

Nibbler

  • Guest
Re: change date uploaded
« Reply #13 on: October 08, 2004, 02:09:15 pm »

The number is the number of seconds which have passed since January 1st 1970.
Logged

jul

  • Coppermine newbie
  • Country: 00
  • Offline Offline
  • Posts: 17
Re: change date uploaded
« Reply #14 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
Code: [Select]
$sql = "SELECT aid, count(pid) as pic_count, max(pid) as last_pid, max(ctime) as last_upload ".
and replace it by

Code: [Select]
$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 ;-)
Logged

Pasci

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 29
    • bangkokrecorder.com
Re: change date uploaded
« Reply #15 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. :)
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.