phpDivinglog 2.0

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

phpDivinglog 2.0

Post by Inferno » Mon Dec 03, 2007 22:33

Here is the announcement of phpDivinglog 2.0

I made a small review of the new things in 2.0:
http://rob.lensen.nu/phpdivinglog/whats ... vinglog-20

Changelog:
phpDivingLog v2.0 - 2007-12-03 - Rob Lensen
* Changed phpdivinglog to use smarty templates
* Added multiuser option, so one install can handle more divers
* Make phpDivinglog object oriented
* All code can viewed via PHPdoc
* New pie chart on dive depths overview
* Option to choose between a grid view or old fashioned table layout
* New pager for table layout
* Upgrade of jpgraph and lightbox
* Language fixes for different languages
* New url layout more easy for page indexing and linking
* Lots of other things, see http://rob.lensen.nu/WebSVN/ for all changes
Download via sourceforge: http://sourceforge.net/projects/phpdivinglog
or: http://rob.lensen.nu/devdoc/phpDivinglog-2.0.tar.gz ; http://rob.lensen.nu/devdoc/phpDivinglog-2.0.zip

Big thanks to all people to helped to develop and submit bugs!
I need to mention them:
- dervish00
- Warlock
- Sven
- mhedstrom
And Lloyd for all previous work on phpDivinglog!

Bugs can be submitted via sourceforge of via the forum.

TheULi
Posts: 40
Joined: Tue Dec 04, 2007 08:18
Location: Sottrum / Germany
Contact:

Post by TheULi » Tue Dec 04, 2007 08:22

hello,

thanks for the work, Rob!

i get an error after installing the new version.

Code: Select all

Fatal error: main() [function.require]: Failed opening required 'ABSPATH/includes/misc.inc.php' (include_path='.:/homepages/46/d13485098/htdocs/divelog//pear/:/homepages/46/d13485098/htdocs/divelog//include:/homepages/46/d13485098/htdocs/divelog/') in /homepages/46/d13485098/htdocs/divelog/config.inc.php on line 223
i think that in config.inc.php

Code: Select all

require_once (ABSPATH . '/includes/misc.inc.php');
should be:

Code: Select all

require_once (ABSPATH_DIVELOG . '/includes/misc.inc.php');
regards
ULi

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

Post by Inferno » Tue Dec 04, 2007 08:40

TheULi wrote:hello,

thanks for the work, Rob!

i get an error after installing the new version.

Code: Select all

Fatal error: main() [function.require]: Failed opening required 'ABSPATH/includes/misc.inc.php' (include_path='.:/homepages/46/d13485098/htdocs/divelog//pear/:/homepages/46/d13485098/htdocs/divelog//include:/homepages/46/d13485098/htdocs/divelog/') in /homepages/46/d13485098/htdocs/divelog/config.inc.php on line 223
i think that in config.inc.php

Code: Select all

require_once (ABSPATH . '/includes/misc.inc.php');
should be:

Code: Select all

require_once (ABSPATH_DIVELOG . '/includes/misc.inc.php');
All fixed in the files that can be downloaded (sf.net and rob.lensen.nu)

FrankK
Posts: 12
Joined: Mon Dec 10, 2007 14:56

Post by FrankK » Mon Dec 10, 2007 15:29

I am having a strange error with the PHPDiving log - the main page displays fine

Also, I am able to use the diving log 1.9 without a problem.

Its alsmost like it does not like the method of submitting to the details (where 2.0 seems to use a / - and 1.9 uses" ?nr=" )


I have 1.9 @ http://www.kostyun.com/diving/divelog

and 2.0 @ http://www.kostyun.com/diving/divelog2

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

Post by Inferno » Mon Dec 10, 2007 15:33

FrankK wrote:I am having a strange error with the PHPDiving log - the main page displays fine


and 2.0 @ http://www.kostyun.com/diving/divelog2
Link doesn't work

got a 404

FrankK
Posts: 12
Joined: Mon Dec 10, 2007 14:56

Post by FrankK » Mon Dec 10, 2007 15:45

It should work now - I was figuring I'd have a few minutes to FTP it up! I would much rather use 2.0 as I like the tables that you've used a lot better.

I also realized I had to update the config file to reflect the new folder.

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

Post by Inferno » Mon Dec 10, 2007 16:03

Problem is that your server hasn't enabled Multiviews.

Edit the .htacces file and add:

Code: Select all

Options +MultiViews
See: http://httpd.apache.org/docs/1.3/conten ... ation.html
The effect of MultiViews is as follows: if the server receives a request for /some/dir/foo, if /some/dir has MultiViews enabled, and /some/dir/foo does not exist, then the server reads the directory looking for files named foo.*, and effectively fakes up a type map which names all those files, assigning them the same media types and content-encodings it would have if the client had asked for one of them by name. It then chooses the best match to the client's requirements.
I will add something to the INSTALL file

FrankK
Posts: 12
Joined: Mon Dec 10, 2007 14:56

Post by FrankK » Mon Dec 10, 2007 16:13

crap - I don't know if I'm going to be able to do that - as I am on hosting server that doesn't allow .htaccess files.

Just created a file and same problem. Called the ISP - takes them some time to parse the .htaccess files. Will have to try it again in a few hours.

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

Post by Inferno » Mon Dec 10, 2007 17:28

FrankK wrote:crap - I don't know if I'm going to be able to do that - as I am on hosting server that doesn't allow .htaccess files.

Just created a file and same problem.
That is a problem, so you have in divelog2/.htaccess (check file name)

The following:

Code: Select all

Options MultiViews
Try also:

Code: Select all

Options +MultiViews
I had the opinion that on almost all servers MultiView or htaccess is working.

FrankK
Posts: 12
Joined: Mon Dec 10, 2007 14:56

Post by FrankK » Mon Dec 10, 2007 17:52

I have added that - so, its a matter of waiting until the hosting provider parses the file.

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

Post by Inferno » Mon Dec 10, 2007 18:59

FrankK wrote:I have added that - so, its a matter of waiting until the hosting provider parses the file.
Yes indeed, as I can read here;
http://bbpress.org/forums/topic/pretty- ... ot-working
I did also all the things(at least three or more times, and even I create a mirror template for bbpress to match with my wordpress template when I was tired of trying the same things to make permalinks to work),. So, for those people who uses Godaddy;

It is not working with Godaddy. (Correction: It works for me, read below)

But it only took a couple of hours to update my wordpress, install and integrate bbpress with wordpress (even, partially, templates). For now, I will not move to another hosting company for permalink option. But it is a bit annoying because rewrite rules are working on Godaddy. I have installed wordpress(10 or more different websites), and drupal(3 or more websites), and no problem with permalinks. When you create your htaccess file for the first time, you need to wait for a couple of hours (in avarage 2-3 hours). After that first initialization, every change in htaccess are applied instantly. Namely you just need to wait only for the first time.

I also tried a simple redirect to check my htaccess file in forum root directory. And it was working.
So try a redirect in your .htaccess and if that works you can try the multiview option. In the meantime I will look for mod_rewrite solution

Strange things on godaddy....

FrankK
Posts: 12
Joined: Mon Dec 10, 2007 14:56

Post by FrankK » Mon Dec 10, 2007 19:08

They sure do - I have verified that the .htaccess is being parsed (which it is)

I added the following to the file .htaccess


Options +MultiViews +FollowSymLinks
RewriteEngine on
RewriteRule ^foo\.html$ http://www.google.com/ [R=301,L]

so if I request ....divelog2\foo.html I go to google.com


but, the problem is still occurring. (dam godaddy)[/list]

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

Post by Inferno » Mon Dec 10, 2007 19:20

FrankK wrote:They sure do - I have verified that the .htaccess is being parsed (which it is)

I added the following to the file .htaccess


Options +MultiViews +FollowSymLinks
RewriteEngine on
RewriteRule ^foo\.html$ http://www.google.com/ [R=301,L]

so if I request ....divelog2\foo.html I go to google.com


but, the problem is still occurring. (dam godaddy)[/list]
Can you test this one:

Code: Select all

Options Indexes FollowSymLinks MultiViews All

RewriteEngine on
# force trailing slash for real dircectories
RewriteCond %{SCRIPT_FILENAME} -d
RewriteRule [^/]$ %{REQUEST_URI}/ [R=301,L]

# ignore real files and directories
RewriteCond %{SCRIPT_FILENAME} -f [OR]
RewriteCond %{SCRIPT_FILENAME} -d
RewriteRule .* - [L]
RewriteRule !^index\.php$ index.php?path=$1 [NC,L]
From this link:
http://eccegratum.blogspot.com/2007/06/ ... using.html

FrankK
Posts: 12
Joined: Mon Dec 10, 2007 14:56

Post by FrankK » Mon Dec 10, 2007 19:48

Same problem is occurring for me - now - if I request ../divelog2/anything.html it does redirect to the index.php, but, that is all.

As I'm going though - it also seems like its the use of smarty where the problem is coming up. I'm still "trying" to pour through the code to see if I can figure it out.

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

Post by Inferno » Mon Dec 10, 2007 22:34

Maybe I solved the problem:

Try this

Code: Select all

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /diving/divelog2/
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.* - [L]

RewriteRule ^(.*)/(.*)/? $1?q=$2 [L]
RewriteRule ^(.*)/? index.php [L]
</IfModule>
Or:

Code: Select all

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.* - [L]

RewriteRule ^(.*)/(.*)/? $1?q=$2 [L]
RewriteRule ^(.*)/? index.php [L]
</IfModule>

Post Reply