phpDivingLog

3rd party extensions (phpDivingLog, dive computer downloader,...)
Post Reply
mhedstrom
Posts: 46
Joined: Wed Jun 06, 2007 23:21

Post by mhedstrom »

Now nothing is working, like if I go to http://cosmo.ogre.com/divelog, it's just showing a blank page. I am completely removing all the files everytime, including my config.inc file (I'm manually changing all my values everytime).

[Wed Oct 3 14:12:14 2007] [error] PHP Stack trace:
[Wed Oct 3 14:12:14 2007] [error] PHP 1. {main}() /server/html/divelog/index.php:0
[Wed Oct 3 14:12:14 2007] [error] PHP 2. require_once() /server/html/divelog/index.php:33
[Wed Oct 3 14:12:14 2007] [error] PHP 3. require_once() /server/html/divelog/config.inc.php:189
[Wed Oct 3 14:12:14 2007] [error] PHP 4. require_once() /server/html/divelog/includes/jpgraph/src/jpgraph.php:180
[Wed Oct 3 14:12:14 2007] [error] PHP Fatal error: Cannot redeclare class gradient in /server/html/divelog/includes/jpgraph/src/jpgraph_gradient.php on line 32

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

Post by Inferno »

mhedstrom wrote:Now nothing is working, like if I go to http://cosmo.ogre.com/divelog, it's just showing a blank page. I am completely removing all the files everytime, including my config.inc file (I'm manually changing all my values everytime).

[Wed Oct 3 14:12:14 2007] [error] PHP Stack trace:
[Wed Oct 3 14:12:14 2007] [error] PHP 1. {main}() /server/html/divelog/index.php:0
[Wed Oct 3 14:12:14 2007] [error] PHP 2. require_once() /server/html/divelog/index.php:33
[Wed Oct 3 14:12:14 2007] [error] PHP 3. require_once() /server/html/divelog/config.inc.php:189
[Wed Oct 3 14:12:14 2007] [error] PHP 4. require_once() /server/html/divelog/includes/jpgraph/src/jpgraph.php:180
[Wed Oct 3 14:12:14 2007] [error] PHP Fatal error: Cannot redeclare class gradient in /server/html/divelog/includes/jpgraph/src/jpgraph_gradient.php on line 32
It has something to do with the order of includes
jpgraph is conflicting

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

Post by Inferno »

Won't fix...it
Try to remove the following line in

file: includes/jpgraph/src/jpgraph.php

line: 180
require_once 'jpgraph_gradient.php';

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

Post by Inferno »

I upgraded the jpgraph lib, to try and fix this include issue

http://rob.lensen.nu/dev/phpDivinglog-2.0a7.tar.gz

mhedstrom
Posts: 46
Joined: Wed Jun 06, 2007 23:21

Post by mhedstrom »

3rd time is a charm. :)

I had to do this in includes/jpgraph/src:

cp jpgraph_plotmark.inc jpgraph_plotmark.inc.php

but it worked after that, and the profile graphs work too.

Thanks!

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

Post by Inferno »

mhedstrom wrote:3rd time is a charm. :)

I had to do this in includes/jpgraph/src:

cp jpgraph_plotmark.inc jpgraph_plotmark.inc.php

but it worked after that, and the profile graphs work too.
I fixed this in svn

Thx for the debugging!

http://rob.lensen.nu/dev/phpDivinglog-2.0a8.tar.gz

mhedstrom
Posts: 46
Joined: Wed Jun 06, 2007 23:21

Post by mhedstrom »

Thanks.

Now that that's taken care of, I can complain...err debug something else (btw, if you'd rather I email you, let me know. :)

In the old version, I seem to recall that on each individual dive, under the "Equipment" section, your used equipment would be listed. I'm not getting that now. I looked at the MySQL tables, and the equipment table has 3 pieces of gear in it, in my logbook for some of the dives, in the "UsedEquip" field I do have ID's in there pointing to the equipment table, but if I go to the actual dive, they're not listed.

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

Post by Inferno »

mhedstrom wrote:Now that that's taken care of, I can complain...err debug something else (btw, if you'd rather I email you, let me know. :)
If nobody else have problem discussing the errors here. I think this is the best place
In the old version, I seem to recall that on each individual dive, under the "Equipment" section, your used equipment would be listed. I'm not getting that now.
I think you are right, equipment is not displayed. Will fix that

Things I fixed already:
- Next and previous not working in multi user mode

Some funny things I work on is a pie chart for the depth range in dive statistics:
See example http://rob.lensen.nu/divelog_dev/drawpiechart.php

dervish00
Posts: 39
Joined: Fri Aug 24, 2007 16:21
Location: Russia

Post by dervish00 »

Hi!
A few days I use phpDivingLog. Many thanks for this good job. Now I try translate it to Russian. And I saw, that in "phpmydatagrid.class.php" is translating to some languages. Need use function datagrid->language($language). As a result I add this code to file "classes.inc.php":

Code: Select all

        $objGrid = new datagrid;

[oleg]	  switch ($_config['language']){
			case 'nederlands': case 'dutch' :
				$objGrid->language("ne");
				break;
			case 'deutch': case 'german' :
				$objGrid->language("de");
				break; 
			case 'russian': case 'russian' :
				$objGrid->language("ru");
				break; 
			case 'espaсol': case 'es' :
				$objGrid->language("es");
				break;
			case 'francais': case 'fr' :
				$objGrid->language("fr");
				break;
			case 'italian' : case 'it' : 
				$objGrid->language("it");
				break;
			case 'иeљtina': case 'cs' :
				$objGrid->language("cs");
				break; 
			case 'portuguese' : case 'portugese' : 
				$objGrid->language("pt");
			 	break;
	  }[/oleg]

        $objGrid->friendlyHTML(); 
in function get_dive_overview_grid() (my code marked [oleg] and [/oleg]).
It really work.

Also I found some troubles:
1. Don't display my russian text right (work only in "phpmydatagrid.class.php"). I hope, I can find solve of this problem.
2. Don't display image of close button on lightbox when I seeing foto of equipment. (I think not right path for this image). But for me it's too hard find solve of problem (I don't know PHP good).
3. Today I setup phpDivinglog-2.0a8. After I can't to see profile of dives.
4. It's problem with link to GoogleMap.
For the present it's all.


http://silkin.net/divinglog/index.php - it's link to my divelog.

dervish00
Posts: 39
Joined: Fri Aug 24, 2007 16:21
Location: Russia

Post by dervish00 »

Now I change phpDivinglog-2.0a8 to phpDivinglog-2.0a4 and my profile of dive draw correct.

mhedstrom
Posts: 46
Joined: Wed Jun 06, 2007 23:21

Post by mhedstrom »

Another bug I found, not sure if this is just in multiuser mode or not.

I added some photos to my dives, and if I go to the individual dive, and look at the link that says "click here to see 1 picture from this dive", the link goes to:

http://cosmo.ogre.com/divelog/index.php/1/RedHind.jpg

instead of looking for it in the images/pictures folder. I looked at my config, and I do have the picpath_web set to images/pictures.

dervish00
Posts: 39
Joined: Fri Aug 24, 2007 16:21
Location: Russia

Post by dervish00 »

Some changes:

1. In "equipment_details.tpl" change string

Code: Select all

<td><a href="{$app_path}/{$PhotoPathurl}" rel="lightbox[others]" title="{$equip_photo_linktitle}{$Object}">{$equip_photo_link}</a></td>
to string

Code: Select all

	  <td><a href="{$app_path}/{$PhotoPathurl}" rel="lightbox[others]" title="{$equip_photo_linktitle}">{$equip_photo_link}</a></td>
another name of equipment write twice.
2. For google map I add two variables in file "classes.inc.php":
'LatDec' and 'LonDec' and add next code:

Code: Select all

$t->assign('LatDec',$result[0]['Lat']);
after string

Code: Select all

$t->assign('Lat', $Lat);
and code:

Code: Select all

$t->assign('LonDec',$result[0]['Lon']);
after string

Code: Select all

$t->assign('Lon',$Lon);
accordingly change code in file 'divesite_details.tpl' to

Code: Select all

        {if isset($site_google_link)}
		<td><a href="http://maps.google.com/maps?f=q&hl=en&q={$LatDec},{$LonDec}+({strip}{$Place}{/strip})&ie=UTF8&t=k&om=1" target="_blank" title="{$site_google_link}">Google Map</a></td>
        {else}
        <td>&nbsp;</td>
        {/if}
now it work ok.
3. In file 'lightbox.js' change variables

Code: Select all

var fileLoadingImage = "../includes/lightbox/images/lightbox_loading.gif";		
var fileBottomNavCloseImage = "../includes/lightbox/images/lightbox_closelabel.gif";
by adding two dots and slash before path for images. Now it drawing correct.
4. For correct drawing maps of divesites change code in a similar of equipment:
in file 'classes.inc.php' add code

Code: Select all

        if ($result[0]['MapPath'] != "") {
            $t->assign('MapPath', $result[0]['MapPath'] );
            $t->assign('place_map', $MapPath);
            $t->assign('maplink_url', $_config['mappath_web'] . $result[0]['MapPath']);
            $t->assign('map_linktitle', $_lang['mappic_linktitle']. $result[0]['Place']);
            $t->assign('map_link', $_lang['mappic'] );
        }
after

Code: Select all

        //	Show extra site details
        $t->assign('place_lat', $_lang['place_lat']);
        $t->assign('place_lon', $_lang['place_lon']);
and delete next code:

Code: Select all

        if ($result[0]['MapPath'] == "") {
            $MapPath = "&nbsp;";
        } else {
            $MapPath = $_lang['place_map'];
        }
        $t->assign('MapPath', $result[0]['MapPath'] );
        $t->assign('place_map', $MapPath);
and delete also code:

Code: Select all

        if ($result[0]['MapPath'] == "") {
           $t->assign('maplink_url','&nbsp;');
        } else {
            $maplink_url = "<a href=\"". $_config['mappath_web'] . $result[0]['MapPath']."\"  rel=\"lightbox[others]\"\n";
            $maplink_url .=  "   title=\"". $_lang['mappic_linktitle']. $result[0]['Place'];
            $maplink_url .=  "\">". $_lang['mappic'] ."</a></td>\n";
            $t->assign('maplink_url',$maplink_url);
        }/*}}}*/
accordingly change code in file 'divesite_details.tpl' to

Code: Select all

		{if isset($MapPath)}
	  		<td><a href="{$app_path}/{$maplink_url}" rel="lightbox[others]" title="{$map_linktitle}">{$map_link}</a></td>
   		{else}
	    		<td>&nbsp;</td>
		{/if}
That's all.
Russian fonts don't work now, but I hope make it later.

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

Post by Inferno »

I will look at your fixes later, however some things I already fixed in subversion tree.

http://rob.lensen.nu/WebSVN/listing.php ... rsion_html_

mhedstrom
Posts: 46
Joined: Wed Jun 06, 2007 23:21

Post by mhedstrom »

Haven't played with it too much, and I just pulled those 2 changed files from Subversion into my install, but the "no photos showing in the dives" thing is fixed. One minor nitpick about that - if I pull up a photo, there's a question mark in the lower right corner instead of what should be there (either Close text or an icon).

Also assuming you didn't fix the "equipment not showing up issue" since I don't see it in the notes.

Oh yeah, one more thing. If I pull up the dive stats, it says "Rob" all over the place. I see where to fix that in the english.inc.php file, but I don't see a way to get it to work for multiple users.

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

Post by Inferno »

mhedstrom wrote:Haven't played with it too much, and I just pulled those 2 changed files from Subversion into my install, but the "no photos showing in the dives" thing is fixed.
Jeps, should be fixed by now
One minor nitpick about that - if I pull up a photo, there's a question mark in the lower right corner instead of what should be there (either Close text or an icon).
Known problem, the fix that dervish00 posted isnt't working in MU mode. Have to think how I'm gone solve the problem
Also assuming you didn't fix the "equipment not showing up issue" since I don't see it in the notes.
working on
Oh yeah, one more thing. If I pull up the dive stats, it says "Rob" all over the place. I see where to fix that in the english.inc.php file, but I don't see a way to get it to work for multiple users.
That is a bug. I will change the name to the one shown in divers overiew, since the name is already in the Personal table.

Post Reply