phpDivinglog 2.0

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

Post by Inferno »

talbers wrote:Inferno
sorry have not changed the whole config back.
I will edit your fresh one and come back.
We will need to add the var
DIRECTORY_SEPARATOR

instead of using / or \
Inferno
Posts: 264
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Post by Inferno »

Patch

Code: Select all

$ svn diff
Index: config.inc.php
===================================================================
--- config.inc.php      (revision 183)
+++ config.inc.php      (working copy)
@@ -157,7 +157,7 @@
  * application name and revision number
  */
 $_config['app_name'] = "phpDivingLog";
-$_config['app_version'] = "2.0rc2";
+$_config['app_version'] = "2.0";


 /**
@@ -173,7 +173,7 @@
 /**
  * ABS path to your pear installation
  */
-$_config['pear_path']       = $_config['app_root'] . '/pear/';
+$_config['pear_path']       = $_config['app_root'] . DIRECTORY_SEPARATOR . 'pear'. DIRECTORY_SEPARATOR ;
 /**
  * logbook pics
  */
@@ -221,7 +221,7 @@
       define( "PATH_SEPARATOR", ";" );
   else define( "PATH_SEPARATOR", ":" );
 }
-ini_set('include_path', get_include_path() . PATH_SEPARATOR . $_config['pear_path'] . PATH_SEPARATOR . $_config['app_root']."/include". PATH_SEPARATOR . $_config['app_root']);
+ini_set('include_path', get_include_path() . PATH_SEPARATOR . $_config['pear_path'] . PATH_SEPARATOR . $_config['app_root'].DIRECTORY_SEPARATOR."include". PATH_SEPARATOR . $_config['app_root']);


 require_once (ABSPATH_DIVELOG . '/includes/misc.inc.php');
@@ -243,7 +243,7 @@
 $t = new smarty;
 $t->template_dir = TEMPLATE_DIR;

-$t->compile_dir = $_config['app_root'] . '/compile';
+$t->compile_dir = $_config['app_root'] .DIRECTORY_SEPARATOR . 'compile';
 /**
  * Before smarty we gonna check the rights in the compile dir
  */
@@ -252,7 +252,7 @@
 chmod -R 777 " .$t->compile_dir ;
 }

DocProc
Posts: 9
Joined: Mon Mar 17, 2008 12:35

Post by DocProc »

Hi there!

1st of all I'd like to thank for the great possibility of displaying my dives online via phpdivinglog2.0...
but what im trying to do is implementing phpdivinglog2.0 into my joomla-installation as a contentpage (see here or here)

its no problem to display the phpdivinglog index page, but all other links arent obviously displayed correct...
any suggestions /solutions? maybe is there a mambot / component?

looking forward for your answers...

thanks in advance!!

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

Post by Inferno »

I'm not very familiar with joomla, however I will setup a joomla install soon and try to integrate it.

Maybe you can start with this link:
http://roster.thumann.dk/joomla_guide/ the wrapping part

Otherwise a mambo component has to be made. This will take some time..
DocProc
Posts: 9
Joined: Mon Mar 17, 2008 12:35

Post by DocProc »

thx for the fast answer, i'll look over it... but now i got another problem at the moment: ver 1.9 did ´create a "correct output" (ok, the .css has to be adjusted http://www.medicdiver.de/external/logbook-wrapped.html), i removed it and installed 2.0... now im getting the following output when opening the index.php:

Code: Select all

Fehlermeldung: Table 'db189367769.Logbook' doesn't exist
(at the moment its black letters on a black background, strg-A to mark all: http://www.medicdiver.de/external/divinglog2.0.html)

i configured the correct prefix: divelog_ , but it seems, its looking for the data in a database without prefix?

thx

edit: yes, wrapping works perfectly ;) thanks!
Inferno
Posts: 264
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Post by Inferno »

DocProc wrote:thx for the fast answer, i'll look over it... but now i got another problem at the moment: ver 1.9 did ´create a "correct output", i removed it and installed 2.0... now im getting the following output when opening the index.php:

Code: Select all

Fehlermeldung: Table 'db189367769.Logbook' doesn't exist
i configured the correct prefix: divelog_ , but it seems, its looking for the data in a database without prefix?

thx
Please test the new one
http://rob.lensen.nu/devdoc/phpdivinglog-2.0.1.tar.gz
DocProc
Posts: 9
Joined: Mon Mar 17, 2008 12:35

Post by DocProc »

great, now it works perfectly ;)

THX for the fast support of a "free" product! great job!
DocProc
Posts: 9
Joined: Mon Mar 17, 2008 12:35

Post by DocProc »

Hi Inferno, "its me again" ;)

just discovered something else:

the output of the german language file displays the html code instead of the special characters (i.e. "ü" instead of "ü", even "°" instead of "°"). if I adjust the german language file and replace them to the special characters there will be a "?" displayed or the whole word will be cut after the "?".

(example: http://www.medicdiver.de/divelog2.0//index.php/list)

i got no other ideas, maybe you or anotherone got some ideas...
Inferno
Posts: 264
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Post by Inferno »

Will look into the problem
Inferno
Posts: 264
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Post by Inferno »

Just change includes/misc.inc.php

Line 66:

Code: Select all

// Convert applicable characters in the language file to entities
//$_lang = htmlentities_array($_lang);
So comment out the the line (works ok here)
DocProc
Posts: 9
Joined: Mon Mar 17, 2008 12:35

Post by DocProc »

works ok for me too ;)

thanks!!
@rno
Posts: 29
Joined: Wed Nov 15, 2006 10:58
Location: Wanroij, Holland

Possible bug in calculating SAC

Post by @rno »

I see a possible bug in the calculation of the SAC, however I think the formula used is the right one.

You first calculate the divetime using $divetime = $profileint * $length;
And this I think is wrong in some cases (i'll describe it below).

You'd better use the divetime stored in mysql (table Logbook, field Divetime).

When does it go wrong?
When for example one stops the dive (ascent to surface) and has to swim some minutes back to shore or wait in the water to be able to re-enter the boat. During this time the computer keeps on measuring because the water contacts still stay wet. In the profile drawn you can see this because the last few minutes are a kind of a flat line at almost no depth.
The divetime stored in de database is the divetime up to the ascent, but the divetime used in calculating the SAC is the divetime up to leaving the water. You'll especially get wrong numbers if you don't breath through the regulator while at the surface.
Inferno
Posts: 264
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

Post by Inferno »

I think you are right and I will change this in the next release.

For @rno I'm currently fixing the problem which people have on hosting environments where mod_rewrite isn't working. Like godaddy and mijndomein.nl. This version is ready for testing probably thursday. Then you have the option to choose between index.php/<user_id>/<dive_nr> and index.php?user_id=<user_id>&id=<dive_nr> styled links
Inferno
Posts: 264
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands
Contact:

New test version 2.1rc2

Post by Inferno »

Hello all,

The new version is ready for testing:
http://rob.lensen.nu/devdoc/phpDivinglog-2.1rc2.tar.gz

CHANGELOG:
* Added the option the use query strings for hosts that don't support mod_rewrite (like Godaddy and mijndomein.nl)
* Changed SAC calculation to read the divetime from the Divelog table
* Several UTF-8 fixes
* Jpgraph upgrade to 1.22
* Pear pager upgrade

Details about the changes can be found in WebSVN
http://rob.lensen.nu/WebSVN/log.php?rep ... =0&isdir=1
@rno
Posts: 29
Joined: Wed Nov 15, 2006 10:58
Location: Wanroij, Holland

Post by @rno »

Thanks Inferno!
This one looks good.
Post Reply