This is quite exciting! I've now made a version that uses objects, and
actually works! So please try it, you'll find it here:
I've also tried to make some documentation for it, which is included
in the tarball. I used a php-script called PHPDoc, which can be found
here: <http://www.phpdoc.de/> It works by reading comments in the
code, and then build HTML-pages with that information.
It's not finished yet, but I think we're getting really close now. The
main advantages of this structure is:
1) It is easy to add support for new database-engines. Basically they
just have to support three methods: insert_metar(), update_metar()
I've made a database-engine called 'none' which doesn't do
anything, and one called 'mysql' which is fully working. I hope
that someone will write an engine for PostgreSQL, dbm etc.
2) The translators are able to override the output-routines, if that
is necessary. And at the same time, most languages only need to
translate the English language-file, just like old times :-)
I've made an English language-file. It's probably missing some
strings, since I changed the keys in the $strings-array quite a bit
while I was coding. When a string is missing, PHP complains about
an undefined index. If you get such an error, then please report it
to this list.
I know that there's still some problems with getting it to work under
PHP3, which should be solved. We'll have to try and identify the cause
of these problems, and then make a fix.
So, what do you think? Is it any good?
Please report any failures and successes you get - thanks.
Checkout http://www.gimpster.com for:
PHP Weather => Shows the current weather on your webpages.
PHP Shell => A telnet-connection (almost :-) in a PHP page.