forum.coppermine-gallery.net
Support => cpg1.3.x Support => Older/other versions => cpg1.3 Miscellaneous => Topic started by: QuaySo on March 16, 2005, 12:30:38 pm
-
Hello,
I'm using Coppermine for a few days now and have 1 question I couldn't find an answer in the documentation. Is there a description of the Coppermine database model?
I'm asking this, because I would like to add some info to the pictures using a script. At this time I have all pictures in my IMatch image database including a lot of information about photgrapher, date/time taken, equipment etc. This info should go to Coppermine. Therefo I should have some insight in the datamodel. Most of the tables and columns are quite easy to understand, but a few I don't know....
For instance: the table cpg132_pictures contains two columns with time information:
- mtime timestamp(14)
- ctime int(11)
What are they used for? And how do I store a time in ctime? This integer value does not mean anything to me yet....
Any help (a link to documentation I have overlooked?) would be appreciated!
-- Arno
-
There isn't such a document unfortunately.
The mtime holds when the pic was last viewed
The ctime holds when the pic was uploaded as a unix timestamp
the unix timestamp is the number of seconds passed since Jan 1st 1970 - google for it and check the php date and time functions.
-
Hi Nibbler,
Thanks for your fast response. Your explanation answers my first questions about mtime and ctime. I will proceed making my scripts and hope not to bother you too often with questions about the meaning of database objects.
-- Arno
-
Maybe when the scripts are done you can return and post them on the board to help others looking to do the same thing. :)
-
probably looking at nibbler's timer script would help you out as well. It's a batch add /auto create cat/album structure hack that probably could be used in some way shape or form for anybody looking to convert from another gallery.
-
Donnoman, thanks for your hint. It might be good not to invent the wheel again!!
One problem. I've been looking for this script, but wasn't able to find it. Can you please point me to the secret place? ;)
-- Arno
-
http://forum.coppermine-gallery.net/index.php?topic=13949.msg73729#msg73729
Enjoy.
-
Thanks again. I hope to find some time to play around with this code next weekend...
-- Arno