Pictures Table Details

Discussions about Diving Log 6.0 - questions and hints
Post Reply
lloyd_borrett
Posts: 228
Joined: Sun Jun 11, 2006 09:24
Location: Frankston South, Victoria, Australia
Contact:

Pictures Table Details

Post by lloyd_borrett »

G'day Sven,

I'm looking at adding support for dive pictures into phpDivingLog.

As far as I can tell, the details of pictures associated with dives end up in the Pictures table. My interpretation of the fields in the table is:

ID - row id of the picture
LogID - row id of the associated dive in the Logbook table.
Path - the pathname to the picture file

Description - Not used. I'm guessing this is a field to hold a picture description, in a future update. I can't find where descriptions are added currently

Graphic - Not used. Not sure what it's for.

Am I close?

It would seem I'm going to have to get the Countries, City / Island and Places that pictures are associated with via the Logbook table. (In a future version, you might like to add dive Number and PlaceID, maybe even CountryID and CityID, to the Pictures table.)

If I always import the pictures into Diving Log from the same directory, then I can either edit the MySQL dump file before uploading it to the web database, or build a suitable path change process into phpDivingLog, to be able to handle the Pictures Path.

Best Regards, Lloyd Borrett.
divinglog
Site Admin
Posts: 5784
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

Hello Lloyd

The Graphic field is a binary (or blob) field for a future feature to store images directly in the database (optionally).

I think a path change in the export routine will also be possible.

Best regards,
Sven
lloyd_borrett
Posts: 228
Joined: Sun Jun 11, 2006 09:24
Location: Frankston South, Victoria, Australia
Contact:

Post by lloyd_borrett »

G'day Sven,

I was going to support the path change in phpDivingLog.

That is have a configuration value for the path to pictures on the PC (e.g. "E:\divelog\images\pictures\"), and then one for the path to pictures on the web site (e.g. "images/pictures/").

But when a path name like "E:\divelog\images\pictures\27_1.jpg" is used, it makes it into the MySQL Dump file okay, but when imported into MySQL it becomes ""E:divelogimagespictures27_1.jpg".

So I have to do a search and replace on the MySQL Dump file before I import it.

Best Regards, Lloyd Borrett.
lloyd_borrett
Posts: 228
Joined: Sun Jun 11, 2006 09:24
Location: Frankston South, Victoria, Australia
Contact:

Post by lloyd_borrett »

G'day Sven,

Am I right in thinking that the Description field is not currently used?

I can't see where I get to add a description to a picture in Diving Log.

Best Regards, Lloyd Borrett.
divinglog
Site Admin
Posts: 5784
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Post by divinglog »

Yes, the Description field is at the moment not available in Diving Log.
Post Reply