phpDivingLog 3.0 Development

3rd party extensions (phpDivingLog, dive computer downloader,...)

phpDivingLog 3.0 Development

Postby lloyd_borrett » Tue Jul 19, 2011 08:49

G'day,

Okay, so I've made a start and have already struck an issue.

My first step has been to setup a MoWeS based development environment on my Acer EeePC netbook. (That is, the cheap and very portable diving computer I run Diving Log 5 and my dive planning software on.) Because then I'll be able to work on it wherever I am.

So I now have: Apache 2.2.11, MySQL 5.5.8, PHP 5.2.17 & phpMyAdmin 3.3.9 running.

This is different to my hosting account which has: Apache 2.2.17, MySQL 5.0.92, PHP 5.2.17 & phpMyAdmin 3.3.10.2. running.

So I created a database and proceeded to load an old dataset from an earlier version of Diving Log 5, for use with my current phpDivingLog 1.9 code. (That is, get a known quantity working before I switch to phpDivingLog 2.x and start development on 3.0.)

On trying to load the dataset via phpMyAdmin, I got the error "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 'TYPE=MyISAM'."

It seems in some of the more recent MySQL 5 setups "TYPE=MyISAM" is no longer supported. (This hasn't been a problem on my hosting account.)

I've worked around the problem by editing the MySQL dump file and replacing "TYPE=MyISAM" with "ENGINE=MyISAM DEFAULT CHARSET=utf8".

It seems that in order to easily support more recent installations of MySQL, plus older installations, the MySQL Dump Export process in Diving Log 5 will need an option to use "ENGINE=MyISAM DEFAULT CHARSET=utf8" instead of "TYPE=MyISAM".

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

Re: phpDivingLog 3.0 Development

Postby lloyd_borrett » Wed Jul 20, 2011 08:27

G'day,

Well I've got phpDivingLog 1.9a working fine on my development setup.

I'm now working on getting Rob's phpDivingLog 2.2-beta8 version running. Quite a few things to learn with this one. It's mostly working, but still has a few issues. (Just had to wait for 1600+ images to be resized for the Dive Gallery.)

Once I'm happy I have Rob's 2.2-beta8 working as it's supposed to, I'll start working towards phpDivingLog 3.0.

First I'll add-in features I have in 1.9a that aren't in Rob's version. Then I'll try to fix some issues I've seen with the way Rob's version is displaying some things. Then I'll update all of the various components to their latest versions. Once I have that all as it should be, I'll start looking at how to implement the new features in the latest Diving Log 5.

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

Re: phpDivingLog 3.0 Development

Postby Inferno » Wed Jul 20, 2011 08:34

It's good that phpDivinglog will get some maintaince.

Maybe it's good to make a list of things we want from 2.2beta to 3.0 since I have to admit the code is in a bit messy at the moment.
Inferno
 
Posts: 246
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands

Re: phpDivingLog 3.0 Development

Postby m.wagner » Wed Jul 20, 2011 11:48

Great to see the revival of phpDivingLog. I also would recommend to gather the features first. Let's think of what we want and set some goals. Then let's also define a bit the scope; I think you can't just start off with coding..
m.wagner
 
Posts: 4
Joined: Mon Apr 12, 2010 03:42

Re: phpDivingLog 3.0 Development

Postby lloyd_borrett » Wed Jul 20, 2011 20:43

Inferno wrote:It's good that phpDivinglog will get some maintaince.

Maybe it's good to make a list of things we want from 2.2beta to 3.0 since I have to admit the code is in a bit messy at the moment.


G'day Rob,

I'd appreciate some help with coming to grips with the code. Right now I'm struggling to understand how variables are passed into the templates.

For example, there's a value set for the width of thumbnails in the config file. But in the templates the fixed value 120 is used. I want to replace it with the value specified in the config file, but can't work out how to access it in the template file.

Then I thought I'd also add in a value for thumbnail height as well.

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

Re: phpDivingLog 3.0 Development

Postby lloyd_borrett » Wed Jul 20, 2011 20:50

m.wagner wrote:Great to see the revival of phpDivingLog. I also would recommend to gather the features first. Let's think of what we want and set some goals. Then let's also define a bit the scope; I think you can't just start off with coding..


G'day,

Happy to receive ideas for features.

However, much of what I initially want to do is quite clear. Display the extra information I've been showing in my current v1.9a. Then to replicate in phpDivingLog the display of the new information now available in Diving Log 5.

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

Re: phpDivingLog 3.0 Development

Postby Inferno » Wed Jul 20, 2011 21:23

Moved everything to github

https://github.com/Infern1/phpDivinglog
Inferno
 
Posts: 246
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands

Re: phpDivingLog 3.0 Development

Postby Inferno » Wed Jul 20, 2011 22:35

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

Re: phpDivingLog 3.0 Development

Postby lloyd_borrett » Thu Jul 21, 2011 21:36

Thanks Rob,

Now it's starting to make sense.

Have now gone through and modifed the image thumbnail related code to use those config settings. Been fixing a few other things along the way.

Currently getting the Diving Statistics page up to display images properly, plus add in the extra information I had added to the page.

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

Re: phpDivingLog 3.0 Development

Postby Inferno » Thu Jul 21, 2011 21:42

lloyd_borrett wrote:Thanks Rob,

Now it's starting to make sense.

Have now gone through and modifed the image thumbnail related code to use those config settings. Been fixing a few other things along the way.

Currently getting the Diving Statistics page up to display images properly, plus add in the extra information I had added to the page.


I hope you have an idea how git works, so the changes can be merged easily

See here for a short manual: http://b.lesseverything.com/2008/3/25/g ... and-github

You just want to patch some else’s repo:
This is really simple. Here are the steps:
Go to github and click the “fork” button.
git clone git://github.com/stevenbristol/lovd-by-less.git
cd lovd-by-less
Make your cahnges
git status
git commit -a
git push
go back to git hub and click the “pull request” button.
Inferno
 
Posts: 246
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands

Re: phpDivingLog 3.0 Development

Postby lloyd_borrett » Fri Jul 22, 2011 19:46

Right now I'm working on an issue with the display of certification card scans in divestats.tpl.

On my setup the test for isset on the scan image path isn't working. It would always try to show two images even when there was only one scan or no scans.

So I changed it to test for '' instead and that mostly works. But one card record keeps returning 'Array' for $cells[cell_data].scan2path, even though phpMyAdmin shows there is nothing in the field.

Something very weird happening. Very annoying.
lloyd_borrett
 
Posts: 228
Joined: Sun Jun 11, 2006 09:24
Location: Frankston South, Victoria, Australia

Re: phpDivingLog 3.0 Development

Postby lloyd_borrett » Sat Jul 23, 2011 23:55

Inferno wrote:I hope you have an idea how git works, so the changes can be merged easily


I have no idea how git works and I'm not really sure about setting it up on my netbook. Suspect it could add too much overhead.

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

Re: phpDivingLog 3.0 Development

Postby lloyd_borrett » Sun Jul 24, 2011 00:01

Now have it working with the 'additions' I'd already added to my old v1.9a.

Have also added in the ability to set as a config value the choce of ddd.dddddd, ddd mm.mmm or ddd mm ss.ss as the coordinate format.

Still can't work out how to fix the problem with that image on the dive statistics page without a kludgy workaround.

Will now look at updating the various 3rd party components, before moving to the new database format.

Best Regards, Lloyd Borrett.
Last edited by lloyd_borrett on Sun Jul 24, 2011 00:05, edited 1 time in total.
lloyd_borrett
 
Posts: 228
Joined: Sun Jun 11, 2006 09:24
Location: Frankston South, Victoria, Australia

Re: phpDivingLog 3.0 Development

Postby Inferno » Sun Jul 24, 2011 00:05

lloyd_borrett wrote:
Inferno wrote:I hope you have an idea how git works, so the changes can be merged easily


I have no idea how git works and I'm not really sure about setting it up on my netbook. Suspect it could add too much overhead.

Best Regards, Lloyd Borrett.

If you don't know just send me your updated version and I will try to merge them in
Inferno
 
Posts: 246
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands

Re: phpDivingLog 3.0 Development

Postby Inferno » Sun Jul 24, 2011 00:06

lloyd_borrett wrote:Now have it working with the 'additions' I'd already added to my old v1.9a.

Still can't work out how to fix the problem with that image on the dive statistics page.


Can you send/post the part which is not clear/not working
Inferno
 
Posts: 246
Joined: Thu Apr 19, 2007 20:36
Location: The Netherlands

Next

Return to Extensions

Who is online

Users browsing this forum: No registered users and 2 guests