phpDivinglog 2.2 development

3rd party extensions (phpDivingLog, dive computer downloader,...)
Post Reply
Inferno
Posts: 252
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Re: phpDivinglog 2.2 development

Post by Inferno »

These messages are no errors but notices from PHP when ERROR reporting is set to ALL. You can either lower your PHP error reporting. But don't know if that is allowed by your hoster.

Other fix is to edit classes.inc.php and goto line 2890 and add this code:

Code: Select all

 else {
                    /**
                     * Declare the variables otherwise an error is displayed
                     */
                     $userpath_web = "";
                     $title = "";
                     $Scan1Path = "";
                     $cert_scan_front = "";
                     $Scan2Path = "";
                     $cert_scan_back = "";
                }
How it should look like:

Code: Select all

                if (($divecert[$i]['Scan1Path'] != "") || ($divecert[$i]['Scan2Path'] != "")) {
                    $title = $divecert[$i]['Org'] . " " .$divecert[$i]['Brevet'];
                    $userpath_web = $_config['userpath_web'] ;
                    $Scan1Path = array();
                    $Scan2Path = array();
                    $cert_scan_front = "";
                    $cert_scan_back ="";
                    if (!empty($divecert[$i]['Scan1Path'])) {
                        $Scan1Path =  $divecert[$i]['Scan1Path'];
                        $cert_scan_front =  $_lang['cert_scan_front'];
                    }
                    if (!empty($divecert[$i]['Scan2Path'])) {
                        $Scan2Path =  $divecert[$i]['Scan2Path'] ;
                        $cert_scan_back = $_lang['cert_scan_back'];
                    }
                } else {
                    /**
                     * Declare the variables otherwise an error is displayed
                     */
                     $userpath_web = "";
                     $title = "";
                     $Scan1Path = "";
                     $cert_scan_front = "";
                     $Scan2Path = "";
                     $cert_scan_back = "";
                }

So I added an extra else loop

ianr
Posts: 47
Joined: Thu Sep 17, 2009 11:44

Re: phpDivinglog 2.2 development

Post by ianr »

Fantastic, It all seems to be working now so I will have a play around with the fonts and other settings to get it looking how I want it.

I do notice that the columns of data don't appear to align with the headings very well, is this configurable?

Also, how easy would it be to put links to flickr against each dive rather than have a photo section? That's way down the list but maybe you could add it to your feature requests if you have a list.

Thanks again for all of the help.

Inferno
Posts: 252
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Re: phpDivinglog 2.2 development

Post by Inferno »

ianr wrote:Fantastic, It all seems to be working now so I will have a play around with the fonts and other settings to get it looking how I want it.
See the css files
I do notice that the columns of data don't appear to align with the headings very well, is this configurable?
I see what you mean it's not configurable. Will have a look at it
Also, how easy would it be to put links to flickr against each dive rather than have a photo section? That's way down the list but maybe you could add it to your feature requests if you have a list.
Shouldn't be a big problem will have a quick look at it

ianr
Posts: 47
Joined: Thu Sep 17, 2009 11:44

Re: phpDivinglog 2.2 development

Post by ianr »

Inferno wrote:
ianr wrote:Fantastic, It all seems to be working now so I will have a play around with the fonts and other settings to get it looking how I want it.
See the css files
I do notice that the columns of data don't appear to align with the headings very well, is this configurable?
I see what you mean it's not configurable. Will have a look at it
Also, how easy would it be to put links to flickr against each dive rather than have a photo section? That's way down the list but maybe you could add it to your feature requests if you have a list.
Shouldn't be a big problem will have a quick look at it
Any news on the above issues?

I have noticed a different issue now. The statistics don't appear to match the diving log database for dive types. It show me having done 5 cave dives which isn't true and doesn't show training dives which I added to the dive types. A lot of the other totals are inaccurate too.

Any ideas?

Apart from that I am loving it and it has spurred me on to design my own website just so I can use this as a feature :D

Inferno
Posts: 252
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Re: phpDivinglog 2.2 development

Post by Inferno »

ianr wrote:
Inferno wrote:
ianr wrote:Fantastic, It all seems to be working now so I will have a play around with the fonts and other settings to get it looking how I want it.
See the css files
I do notice that the columns of data don't appear to align with the headings very well, is this configurable?
I see what you mean it's not configurable. Will have a look at it
Also, how easy would it be to put links to flickr against each dive rather than have a photo section? That's way down the list but maybe you could add it to your feature requests if you have a list.
Shouldn't be a big problem will have a quick look at it
Any news on the above issues?

I have noticed a different issue now. The statistics don't appear to match the diving log database for dive types. It show me having done 5 cave dives which isn't true and doesn't show training dives which I added to the dive types. A lot of the other totals are inaccurate too.

Any ideas?

Apart from that I am loving it and it has spurred me on to design my own website just so I can use this as a feature :D
Didn't look on this, since I'm quite busy with work related stuff. Do you use DL5 already since a didn't really test phpDivinglog with DL5

ianr
Posts: 47
Joined: Thu Sep 17, 2009 11:44

Re: phpDivinglog 2.2 development

Post by ianr »

Yes, using DL5.0.

Sorry If I sounded like I was rushing you. I'm aware that this probably isn't your highest priority and I do appreciate all of your efforts so far.

terrylowe
Posts: 40
Joined: Sun Aug 12, 2007 03:33
Location: Hattiesburg, MS USA
Contact:

Re: phpDivinglog 2.2 development

Post by terrylowe »

Hi Inferno,

I really liked the online dive log at your test site at http://rob.lensen.nu/divelog_new3/.

Since I take a good number of pictures, I was especially excited about the gallery.

I started working on my online site yesterday and am using phpDivinglog version 2.2 with a date of October 31, 2008. I assume that this is the most recent version that I can download?

My site is working at http://dive.terrylowe.com. It is hosted at GoDaddy.

I discovered that the program does not like creating a thumbnail from an image over 8 megapixels in size. It works well by reducing the size of the original picture. Also I had to make sure my write permissions were enabled for my pictures folder.

I just wanted to point out a couple of minor issues. When I click to view a dive, the header on my new page gets messed up.

My thumbnails all display a Dive Location of 0. (Don't know why). If I click on this zero, I get the following error..

Parse error: syntax error, unexpected $end in D:\Hosting\5436403\html\dive\includes\misc.inc.php(146) : eval()'d code on line 10
MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[table_prefix]Place.ID AS ID, $_config[table_prefix]Logbook.Country AS ' at line 1 :
Query: SELECT $_config[table_prefix]Place.ID AS ID, $_config[table_prefix]Logbook.Country AS Country, $_config[table_prefix]Place.Place AS Place, $_config[table_prefix]Logbook.City AS City, ROUND($_config[table_prefix]Place.MaxDepth*3.2808,1) as MaxDepth FROM $_config[table_prefix]Place INNER JOIN $_config[table_prefix]Logbook ON $_config[table_prefix]Place.ID = $_config[table_prefix]Logbook.PlaceID GROUP BY ID"; ORDER BY Place ASC



I don't know what this all means, so thought you might like to have a look.
Thanks for all of your hard work!

Terry
Attachments
thumbnail.JPG
thumbnail.JPG (17.27 KiB) Viewed 7750 times
header.jpg
header.jpg (18.07 KiB) Viewed 7750 times

Inferno
Posts: 252
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Re: phpDivinglog 2.2 development

Post by Inferno »

This is the latest version:

http://rob.lensen.nu/devdoc/phpDivinglog-2.2beta4.zip

The problem with dive location is that you have entered the divesite manually, so probably there is no ID for the site, just a name. You can see the difference if the Divelocation is blue (if I'm right)

divinglog
Site Admin
Posts: 5174
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: phpDivinglog 2.2 development

Post by divinglog »

In version 5.0 it's a chain icon (linked) or a pencil icon (manually entered).

Inferno
Posts: 252
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Re: phpDivinglog 2.2 development

Post by Inferno »

divinglog wrote:In version 5.0 it's a chain icon (linked) or a pencil icon (manually entered).
I should really start to using 5.0.... Bit maybe have to dive first..

divinglog
Site Admin
Posts: 5174
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: phpDivinglog 2.2 development

Post by divinglog »

Inferno wrote:I should really start to using 5.0.... Bit maybe have to dive first..
Perfect timing, I just released the final version :)

terrylowe
Posts: 40
Joined: Sun Aug 12, 2007 03:33
Location: Hattiesburg, MS USA
Contact:

Re: phpDivinglog 2.2 development

Post by terrylowe »

It worked...changing the dive locations to a link made it work! Now I have to figure out how to erase all those manually entered dive sites!!

Inferno,
I wanted to show you two more issues.

1. If I click on a dive, it will show me my max depth as one value and my dive profile will give me a max depth of another value.
The dive profile is correct. Instead of the top of the page showing the MAX depth it is actually showing the AVERAGE depth. This will mess up the calculation for average depth further down the page as well.

2. If I click on "Dive Sites" on my log, I get the following error.
Parse error: syntax error, unexpected $end in D:\Hosting\5436403\html\dive\includes\misc.inc.php(146) : eval()'d code on line 10
MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[table_prefix]Place.ID AS ID, $_config[table_prefix]Logbook.Country AS ' at line 1 :
Query: SELECT $_config[table_prefix]Place.ID AS ID, $_config[table_prefix]Logbook.Country AS Country, $_config[table_prefix]Place.Place AS Place, $_config[table_prefix]Logbook.City AS City, ROUND($_config[table_prefix]Place.MaxDepth*3.2808,1) as MaxDepth FROM $_config[table_prefix]Place INNER JOIN $_config[table_prefix]Logbook ON $_config[table_prefix]Place.ID = $_config[table_prefix]Logbook.PlaceID GROUP BY ID"; ORDER BY Place ASC


Again, I don't know what all of that means :?

3. OK ...I lied...I added another thing. The size of the tank is coming over as a zero.

Have a great day!
Attachments
max dive.JPG
max dive.JPG (68.54 KiB) Viewed 7777 times
Last edited by terrylowe on Mon Mar 29, 2010 21:58, edited 1 time in total.

divinglog
Site Admin
Posts: 5174
Joined: Sat Feb 08, 2003 21:02
Location: Coburg
Contact:

Re: phpDivinglog 2.2 development

Post by divinglog »

Hi Terry

Please email me your logbook file, I have a function to convert automatically unlinked items to linked items, but it is not yet built in. Do you want all (Country, City, Site) linked?

Sven

terrylowe
Posts: 40
Joined: Sun Aug 12, 2007 03:33
Location: Hattiesburg, MS USA
Contact:

Re: phpDivinglog 2.2 development

Post by terrylowe »

No problem Sven, I did it manually. After I took out all of the manually entered items, they fell off of the select lists. Perfect!

Inferno
Posts: 252
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Re: phpDivinglog 2.2 development

Post by Inferno »

Updated phpdivinglog:

http://rob.lensen.nu/devdoc/phpDivinglog-2.2beta6.zip
or
http://rob.lensen.nu/devdoc/phpDivinglo ... ta6.tar.gz

Fixed the problems above except the tank size which I cannot reproduce at the moment

Post Reply