phpweather-devel Mailing List for PHP Weather (Page 21)
Brought to you by:
iridium
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
(4) |
Dec
(7) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(2) |
Feb
(52) |
Mar
(79) |
Apr
(9) |
May
(28) |
Jun
(17) |
Jul
(25) |
Aug
(48) |
Sep
(18) |
Oct
(6) |
Nov
|
Dec
(8) |
2003 |
Jan
(26) |
Feb
(10) |
Mar
(2) |
Apr
(21) |
May
(23) |
Jun
(15) |
Jul
(15) |
Aug
(8) |
Sep
(16) |
Oct
(3) |
Nov
(4) |
Dec
|
2004 |
Jan
(35) |
Feb
(35) |
Mar
(9) |
Apr
(6) |
May
(1) |
Jun
(3) |
Jul
(3) |
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
2005 |
Jan
(4) |
Feb
(6) |
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
2006 |
Jan
|
Feb
(5) |
Mar
(7) |
Apr
(2) |
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: peter h. <pet...@vi...> - 2002-03-08 11:36:34
|
hi Henrik There is a good book "PHP for Flash" by Steve Webster (pub:Friends of Ed), although I am currently working through "PHP for the WWW : Visual Quickstart, Guide" by Larry Ullman (pub Peachpit Press). PHPWeather was also my introduction to PHP. I downloaded Martin's "tar" a few months ago and then yikes; realised that here was a language that I had never seen before. I hadn't a clue how to implement PHPWeather and searched for "An idiots guide to putting it on a HTML page", to no avail. Everyboby seemed to undesatnd C+ and UNIX languages and I felt completely out of my depth. I too am an artist and well you probably know the path, learn HTML->learn Director->learn javascript->learn flash5. I began to learn PHP to implement PHPWEather, but now realise that if I learn PHP I can also build dynamic web/flash apps. Many thanks to Martin, for the introduction. The good news is the syntax for PHP is well developed and the on line PHP Manual PDF format) is excellent. Learning PHP will definitely improve your actionscripting :) So I too am on a steep learning curve and would be grateful for any other recommended PHP manuals/authors. ps I can't find a definition of "tar" can someone enlighten me ? peter >At 13:29 07/03/2002 +0100, you wrote: >HI there I LOVE your program I would very much like to get the into flash, to work with them ad graphich, ehhh, but the problem is i dint know php.' I tried to load all the variabels into flash, but none og them are useful, would you mind helping me ? regards /Henrik Denmark _______________________________________________ PHPWeather-devel mailing list PHP...@li... https://lists.sourceforge.net/lists/listinfo/phpweather-devel :: peter hagerty :: arklo.com :: liverpool |
From: Martin G. <gim...@gi...> - 2002-03-07 16:48:42
|
HE...@dr... writes: > HI there > > I LOVE your program Thanks :-) > I would very much like to get the into flash, to work with them ad > graphich, ehhh, but the problem is i dint know php.' Are you talking about Macromedia Flash? > I tried to load all the variabels into flash, but none og them are > useful, would you mind helping me ? Yes, but I'm not what you're trying to do... Do you want to use PHP Weather together with Flash on a website, or is it something else? -- Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather => Shows the current weather on your webpage. PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: <HE...@dr...> - 2002-03-07 12:30:04
|
HI there I LOVE your program I would very much like to get the into flash, to work with them ad graphich, ehhh, but the problem is i dint know php.' I tried to load all the variabels into flash, but none og them are useful, would you mind helping me ? regards /Henrik Denmark |
From: Martin G. <gim...@gi...> - 2002-03-07 09:54:37
|
Hi everybody As some of you might have noticed, then I've been playing with CVS the last couple of days. I've made a module called 'web' which will contain the webpages for phpweather.sourceforge.net and a module called 'phpweather-1.x' which contains version 1.60 of PHP Weather. So, if anybody has an idea for a light design for phpweather.sf.net, then I would love to hear about it. When the pages are updated in CVS, they will be checked out into /home/groups/p/ph/phpweather/htdocs automatically, so it should be easy for us to maintain this. Also, if someone finds new and exciting bugs in PHP Weather, then it's easy for them to fix it directly in CVS. -- Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather => Shows the current weather on your webpage. PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Martin G. <gim...@gi...> - 2002-03-07 09:01:19
|
Carsten Klapp <car...@ma...> writes: > Hi Martin, Hi Carsten - and others :-) > With a little stumbling around I finally managed to use PHPWeather > as a plugin for PhpWiki! I'm thinking of including the plugin with > the distribution of PhpWiki (http://phpwiki.sf.net/phpwiki/) as an > example of how to write plugins, and of course because PHPWeather is > so cool too. That's really great! > There were a couple problems I encountered along the way, so I think > I will want to wait a bit before submitting my plugin to PhpWiki's > CVS. Patches included at the end of this message, based on code I > pulled down from the PHPWeather CVS today. > > * PhpWiki uses the PEAR library for database access, which already > declares db classes with the same names as the ones PHPWeather's > database code wants to use. I fixed this by prefixing the affected > classes and functions with PW_. This is probably a good idea if you > want to allow your custom DB functions to coexist with other web > apps which rely on PEAR. (PhpWiki recently has an ADODB interface > for it's sql, but it still ships "out of the box" with PEAR as the > default for sql.) I see. I think you're right about this - we ought to prefix all our functions with a common string and I guess 'pw' is the logical choice, even though it doesn't remind me of PHP Weather. > * Need a method to return the weather data as an array or just as > preformatted html string, so the calling app can position it on the > page where it wants to. For PhpWiki I just quickly modified the > pretty_print() to collect the output into a variable instead of > printing it and return that. Ahh, yes - that should have been changed a long time ago. When I started the script, I didn't think that much about it. Thanks for the patch! -- Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather => Shows the current weather on your webpage. PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Vaclav R. <va...@ph...> - 2002-02-28 13:57:40
|
I don't know if this question has appeared before, but... does anybody tried to include TAF decoder into phpweather? Vac |
From: Ray v. B. <r_v...@ho...> - 2002-02-28 13:36:33
|
>I'm sorry, but I'm not able to make an exact reference as I do not have the >relevant document, being the WMO publication No. 306, Manual on Codes (ICAO >Annex 3 only states how to create a METAR). I talk from 30 years of >experience with OPMET codes. > >I don't know where your item 12.5 comes from... ...snip... Section 12.5 comes from the Federal Meteorological Handbook No. 1 (found it via the www.gimpster.com site at: http://tgsv5.nws.noaa.gov/oso/oso1/oso12/fmh1/fmh1ch12.htm) Maybe section 12.5 is one of the exceptions as described in section 12.1 (find it below): "12.1 General The coding standards in this chapter conform to WMO Code Forms METAR FM 15-IX Ext. and SPECI FM 16-IX Ext. and the United States Exceptions filed with the WMO. These exceptions reflect national observing practices which differ from practices outlined in the WMO Manual on Codes No. 306." I'm not argueing that the '/////' is not a valid construction, I'm just curious where it comes from and I guess I want to know if there are more of these constructions. Martin created phpweather based on the document the is linked above. If that is not the whole story (or partially the wrong story), IMHO the script should be adjusted to comply to the exact metar definition. Greetz, Ray _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. |
From: Funder, J. O. <jh...@NA...> - 2002-02-28 09:08:48
|
I'm sorry, but I'm not able to make an exact reference as I do not have the relevant document, being the WMO publication No. 306, Manual on Codes (ICAO Annex 3 only states how to create a METAR). I talk from 30 years of experience with OPMET codes. I don't know where your item 12.5 comes from, but I'm sure that omitting eg. the windgroup will cause a lot of trouble in all systems decoding the METAR except phpweather - this is because phpweather just identify each group without any form of validation. When we use these data for aviation purposes we also check the validity of the contents of the METAR. This includes that a windgroup must be found, a cloudgroup must be found (CAVOK and SKC regarded as cloudgroups). Checking that the dewpoint is lower than the temperature aso. aso. - I could go on for ages. .....and by the way, I have never seen a METAR without a windgroup. rgds Johnny Funder -----Oprindelig meddelelse----- Fra: Ray van Beek [mailto:r_v...@ho...] Sendt: 28. februar 2002 09:40 Til: jh...@NA...; php...@li... Emne: Re: SV: Funny chars in metar? >The ///// indicates that the item could not be measured for one reason or >another (typically instrumentfailure). In some way, it seems logical, *BUT* this is not according to the metar specification: "12.5 Coding Missing Data in METAR/SPECI When an element does not occur, or cannot be observed, the corresponding group and preceding space are omitted from that particular report." Do you have a specification that describes the use of '/////' ? If is specified, I think that the script should be modified to add support the '/////' notation. Greetz, Ray _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com |
From: Ray v. B. <r_v...@ho...> - 2002-02-28 08:40:07
|
>The ///// indicates that the item could not be measured for one reason or >another (typically instrumentfailure). In some way, it seems logical, *BUT* this is not according to the metar specification: "12.5 Coding Missing Data in METAR/SPECI When an element does not occur, or cannot be observed, the corresponding group and preceding space are omitted from that particular report." Do you have a specification that describes the use of '/////' ? If is specified, I think that the script should be modified to add support the '/////' notation. Greetz, Ray _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com |
From: Funder, J. O. <jh...@NA...> - 2002-02-28 07:08:18
|
Hi, The ///// indicates that the item could not be measured for one reason or another (typically instrumentfailure). 9999 has NOTHING to do with the wind - it means that visibility is 10 kilometers or more. 'Light and variable' wind is indicated with (eg.) VRB02KT. rgds Johnny Funder -----Oprindelig meddelelse----- Fra: Lee Marzke [mailto:lm...@ad...] Sendt: 28. februar 2002 01:31 Til: Ray van Beek Cc: php...@li... Emne: Re: Funny chars in metar? 9999 is an often used abbreviation for Wind light and variable. Don't know about the rest. Lee Marzke <le...@n9...> At 10:45 AM 2/27/02 +0100, you wrote: >Hi all! > >Ever seen a metar like the one below? > >EHEH 270855Z /////KT 9999 SCT028 ///// Q//// BLU BLU > >The wind dir/speed, temperature and pressure have been affected, but I >can't find the appropriate definition in the Federal Meteorological >Handbook No. 1. > >Does anyone know what this means? Is this a valid metar code? > >Ray > > >_________________________________________________________________ >Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. > > >_______________________________________________ >PHPWeather-devel mailing list >PHP...@li... >https://lists.sourceforge.net/lists/listinfo/phpweather-devel -- ========================================================= Lee Marzke, <le...@n9...> North Wales, PA N84176 (PA-28) at Brandywine, N99 ========================================================= _______________________________________________ PHPWeather-devel mailing list PHP...@li... https://lists.sourceforge.net/lists/listinfo/phpweather-devel |
From: Lee M. <lm...@ad...> - 2002-02-28 01:31:02
|
9999 is an often used abbreviation for Wind light and variable. Don't know about the rest. Lee Marzke <le...@n9...> At 10:45 AM 2/27/02 +0100, you wrote: >Hi all! > >Ever seen a metar like the one below? > >EHEH 270855Z /////KT 9999 SCT028 ///// Q//// BLU BLU > >The wind dir/speed, temperature and pressure have been affected, but I >can't find the appropriate definition in the Federal Meteorological >Handbook No. 1. > >Does anyone know what this means? Is this a valid metar code? > >Ray > > >_________________________________________________________________ >Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. > > >_______________________________________________ >PHPWeather-devel mailing list >PHP...@li... >https://lists.sourceforge.net/lists/listinfo/phpweather-devel -- ========================================================= Lee Marzke, <le...@n9...> North Wales, PA N84176 (PA-28) at Brandywine, N99 ========================================================= |
From: Ray v. B. <r_v...@ho...> - 2002-02-27 09:45:45
|
Hi all! Ever seen a metar like the one below? EHEH 270855Z /////KT 9999 SCT028 ///// Q//// BLU BLU The wind dir/speed, temperature and pressure have been affected, but I can't find the appropriate definition in the Federal Meteorological Handbook No. 1. Does anyone know what this means? Is this a valid metar code? Ray _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp. |
From: Martin G. <gim...@gi...> - 2002-02-24 15:02:12
|
"Ray van Beek" <r_v...@ho...> writes: >> Judging from your temperature table-cell in the bottom of your >> page, are you working on some sort of thermometer? You know: a >> little glass one with red mercury rising with the temperature. I >> think that would be a great addition to the other icons. > > I wasn't working on that. But I think that would be a great idea. I'll > start on that right away. I let you know when it is ready... It was only a suggestion - I didn't mean to put pressure on you. But since you like the idea, I'll look forward to see your work :-) -- Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather => Shows the current weather on your webpage. PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Ray v. B. <r_v...@ho...> - 2002-02-24 14:35:24
|
>I'll fix that in the next release. We should also have your beautiful >icons with in that release - the current weather and wind icons look >great. (See http://www.devolder.nl/cgibin/phpweather/table.php) > >Judging from your temperature table-cell in the bottom of your page, >are you working on some sort of thermometer? You know: a little glass >one with red mercury rising with the temperature. I think that would >be a great addition to the other icons. I wasn't working on that. But I think that would be a great idea. I'll start on that right away. I let you know when it is ready... Ray _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx |
From: Martin G. <gim...@gi...> - 2002-02-24 09:45:57
|
"Ray van Beek" <r_v...@ho...> writes: >> But if $weather_str is left as the empty string, then it shouldn't >> be able to sneak 'Current weather is' into the report :-) >> $weather_str is copied directly to the output, it's not prefixed >> with 'Current weather' or anything like that. > > ..snip... > if (isset($data['weather'])) { > $weather_str = sprintf($strings['current_weather'], $data['weather']); > } else { > $weather_str = ''; > } > ..snip... Ahh - now I see it. The test should be if (!empty($data['weather'])) so that the empty string is considered false... I'll fix that in the next release. We should also have your beautiful icons with in that release - the current weather and wind icons look great. (See http://www.devolder.nl/cgibin/phpweather/table.php) Judging from your temperature table-cell in the bottom of your page, are you working on some sort of thermometer? You know: a little glass one with red mercury rising with the temperature. I think that would be a great addition to the other icons. -- Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather => Shows the current weather on your webpage. PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Ray v. B. <r_v...@ho...> - 2002-02-24 07:53:35
|
> > I have seen similar texts. For example, take the next metar: > > > > EHEH 231555Z 27013KT 9999 FEW018 03/01 Q0996 BLU > > > > It doesn't specify any precipitation or other weather phenomena. > > Therefor, the $weather_str stays empty, leading to the missing text. > > Maybe this should be changed to omitting the entire line ('Current > > weather is .')? > >But if $weather_str is left as the empty string, then it shouldn't be >able to sneak 'Current weather is' into the report :-) $weather_str is >copied directly to the output, it's not prefixed with 'Current >weather' or anything like that. ...snip... if (isset($data['weather'])) { $weather_str = sprintf($strings['current_weather'], $data['weather']); } else { $weather_str = ''; } ...snip... At some point the script test the existence of $data['weather']. Alltough the string itself is empty, it has been set previously: Somewhere at the beginning of the process_metar() function. As you can see, some other strings are set as well: ...snip... $decoded_metar['temp_visibility_miles'] = ''; $cloud_layers = 0; $decoded_metar['remarks'] = ''; $decoded_metar['weather'] = ''; ...snip... I found this by temporary adding two printf lines in the first snippet above. It shows that the isset() function finds that the the 'weather' string has been set (empty). This results in printing the 'Current weather is .' line. Greetz, Ray _________________________________________________________________ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com |
From: Martin G. <gim...@gi...> - 2002-02-24 00:01:11
|
"Ray van Beek" <r_v...@ho...> writes: > I have seen similar texts. For example, take the next metar: > > EHEH 231555Z 27013KT 9999 FEW018 03/01 Q0996 BLU > > It doesn't specify any precipitation or other weather phenomena. > Therefor, the $weather_str stays empty, leading to the missing text. > Maybe this should be changed to omitting the entire line ('Current > weather is .')? But if $weather_str is left as the empty string, then it shouldn't be able to sneak 'Current weather is' into the report :-) $weather_str is copied directly to the output, it's not prefixed with 'Current weather' or anything like that. -- Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather => Shows the current weather on your webpage. PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Ray v. B. <r_v...@ho...> - 2002-02-23 17:03:37
|
>From: "Rui Fernandes" <nov...@ne...> >To: <php...@gi...> >Subject: Bug >Date: Fri, 22 Feb 2002 12:17:24 -0000 > >Dear friend, > >I've found a bug in the script. When I asked the information for London, it >came: > >54 minutes ago, at 11:20 UTC, the wind was blowing at a speed of 10.3 >meters per second (23.0 miles per hour) from West in London / Gatwick >Airport, United Kingdom. The temperature was 13 degrees Celsius (55 degrees >Fahrenheit), and the pressure was 1,001 hPa (29.56 inHg). The relative >humidity was 76.7%. There were scattered clouds at a height of 914 meter >(3000 feet) and scattered clouds at a height of 1280 meter (4200 feet). The >visibility was >11.3 kilometers (>7 miles). Current weather is . >(...missing...) > >I can't find the problem. Can you solve it? I have seen similar texts. For example, take the next metar: EHEH 231555Z 27013KT 9999 FEW018 03/01 Q0996 BLU It doesn't specify any precipitation or other weather phenomena. Therefor, the $weather_str stays empty, leading to the missing text. Maybe this should be changed to omitting the entire line ('Current weather is .')? Ray EHEH 231555Z 27013KT 9999 FEW018 03/01 Q0996 BLU _________________________________________________________________ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com |
From: Rui F. <nov...@ne...> - 2002-02-22 12:20:52
|
Dear friend, I've found a bug in the script. When I asked the information for London, = it came: 54 minutes ago, at 11:20 UTC, the wind was blowing at a speed of 10.3 = meters per second (23.0 miles per hour) from West in London / Gatwick = Airport, United Kingdom. The temperature was 13 degrees Celsius (55 = degrees Fahrenheit), and the pressure was 1,001 hPa (29.56 inHg). The = relative humidity was 76.7%. There were scattered clouds at a height of = 914 meter (3000 feet) and scattered clouds at a height of 1280 meter = (4200 feet). The visibility was >11.3 kilometers (>7 miles). Current = weather is . (...missing...) I can't find the problem. Can you solve it? Best regards, Rui Fernandes |
From: Martin G. <gim...@gi...> - 2002-02-21 07:56:58
|
Carsten Klapp <car...@ma...> writes: > Hi, > > PhpWeather is really cool! > > I started writing a PhpWeather plugin for PhpWiki, so it can call > PHPWeather. I have a suggestion which might make PhpWeather easier > to include in other web sites. Cool! I've been looking a little at the WikiWikiWeb concept and I like it - the idea that everyone is able to correct and improve the pages by editing them is great. > In order to arbitrarily embed the output from PhpWeather at a > specific location on the page, it would be helpful if the entire > weather code could be wrapped up in a single function, so the user > would only have to worry about 1 include. The function would also > return the result as a string rather than using print to try to do > the output itself. Yes - you're right. It's kind of wrong that the report is output instead of being returned as a string. > Such a function could be called something like this: > > <?php > // my great php application > $icao = "CYYZ"; > $language = 'en'; > $format = 'metar'; > $name = "Toronto Pearson Int\'l Airport / Ontario, Canada"; > > require_once('phpweather.inc'); > $weather = PHPWeather($icao, $format, $language, $name); > > //... > > ?> The above approach looks good... > The whole phpweather.inc probably could be rewritten using classes > too, but I haven't had time to delve inside the code yet, PhpWiki > keeps me busy. I've already rewritten PHP Weather with classes - see the code in CVS here: http://sourceforge.net/cvs/?group_id=23245 -- Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather => Shows the current weather on your webpage. PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Martin G. <gim...@gi...> - 2002-02-21 07:49:26
|
"Ray van Beek" <r_v...@ho...> writes: > Hi all! > > Please check out my first (partial) attempt to iconize weather info. > It only does the sky cover and precipitation. Wind direction is to > come next. I can see that it is there now - great work! I looks *really* nice. But the links to the code (images.inc) doesn't work. > Find it at: http://www.devolder.nl/cgibin/phpweather/table.php > > Please forgive my php-programming. I'm sure this can be done much > better and more efficient, but I wanted to get the thing running > first. That's also the approach I take when programming PHP - we can always optimize the code later. -- Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather => Shows the current weather on your webpage. PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Carsten K. <car...@ma...> - 2002-02-20 06:56:19
|
Hi, PhpWeather is really cool! I started writing a PhpWeather plugin for PhpWiki, so it can call PHPWeather. I have a suggestion which might make PhpWeather easier to include in other web sites. In order to arbitrarily embed the output from PhpWeather at a specific location on the page, it would be helpful if the entire weather code could be wrapped up in a single function, so the user would only have to worry about 1 include. The function would also return the result as a string rather than using print to try to do the output itself. Such a function could be called something like this: <?php // my great php application $icao = "CYYZ"; $language = 'en'; $format = 'metar'; $name = "Toronto Pearson Int\'l Airport / Ontario, Canada"; require_once('phpweather.inc'); $weather = PHPWeather($icao, $format, $language, $name); // somewhere, deep in the web site... printf("<table summary="Local weather via PHPWeather"><tr><td>%s</td></tr> </table>", $weather); ?> // inside 'phpweather.inc'... <?php // PHPWeather wrapper function /** * This is a convenience wrapper function for PHPWeather */ function PHPWeather($icao, $format = 'pretty', $language = 'en', $name = ' ') { include(sprintf('locale_%s.inc', $language)); switch ($format) { case 'pretty': return pretty_print_metar($icao, $format, $language, $name); break; case 'metar': return get_metar($icao); break; } //...etc } ?> The whole phpweather.inc probably could be rewritten using classes too, but I haven't had time to delve inside the code yet, PhpWiki keeps me busy. Carsten CC: replies to <car...@ma...> (I'm not on the mailing-list). |
From: Ray v. B. <r_v...@ho...> - 2002-02-17 21:33:26
|
Hi all! Please check out my first (partial) attempt to iconize weather info. It only does the sky cover and precipitation. Wind direction is to come next. Find it at: http://www.devolder.nl/cgibin/phpweather/table.php Please forgive my php-programming. I'm sure this can be done much better and more efficient, but I wanted to get the thing running first. Greetz, Ray _________________________________________________________________ Join the worlds largest e-mail service with MSN Hotmail. http://www.hotmail.com |
From: Martin G. <gim...@gi...> - 2002-02-14 12:31:04
|
"Max Hammond" <ma...@fl...> writes: >> And it would be preferable if the script could try and guess when >> to turn if off. > > get_browser() depends on browscap.ini being properly defined and > kept up to date, and won't help with people who've disabled js. > Since browscap does not get installed by default with PHP, I think > we're asking for trouble by using it. You're right - I've actually never used get_browser(), it just seamed like a nice builtin way of detecting the browsers capabilities - until you pointed out that it isn't a default feature. > Sure, give people an option, but I don't think we should be using > get_browser() at all. Agreed. Perhaps the easiest way of doing things would be to simply write 'Please wait... (If you have disabled JavaScript or nothing happens, click here)' where the last part is a link to the page with the JavaScript-thing turned off. > This is something for application designers to worry about, whereas > phpweather is a library rather than an application. Very true. I've had the exact same thought about PHP Weather: it should be regarded as a library which people can use to build all kinds of functionality on. I did realise this when I made the first code, and that means that the library-functionality is mixed with the application-level code. The code in CVS is much more separated - the class metar_parser doesn't do anything except parsing METARs. But the class is still rather tightly coupled with other classes - it's probably a mistake that it is a descendant of data_retrieval, as metar_parser isn't an improved data-retriever - it's whole other thing. PHP Weather is my first attempt at using objects, and I wanted the hierarchy to end with class phpweather, so that people could do something like this: $weather = new phpweather(array('icao' => 'EKYT')); $weather->print_pretty(); It still looks nice IMHO, but it can also be done without making phpweather a descendant of metar_parser. The ideal situation would be, that the core of PHP Weather is metar_parser. One should then be able to connect the metar_parser with different output-modules, such as: localized textual output, numeric output, WAP output, image output and so on. > It would make more sense IMO to start building this kind of > functionality into the CVS tree. I think that a lot of what's in CVS > is nearly ready for release, so we should be concentrating on making > a release out of it, rather than tweaking the old stuff. The > functions in CVS (eg browsing to the airport of choice) are more at > the application level than the current releases. I agree - I've just been afraid to do the switch, as it seams that people are very fond of the old version. It's probably a chicken-and-egg problem: people doesn't switch to the new version before it's almost complete, and I don't release the new version before people start using it... :-) So, let's work on getting a release of the new code, so that people can stop using the old ugly code. -- Martin Geisler My GnuPG Key: 0xF7F6B57B See my homepage at http://www.gimpster.com/ for: PHP Weather => Shows the current weather on your webpage. PHP Shell => A telnet-connection (almost :-) in a PHP page. |
From: Max H. <ma...@fl...> - 2002-02-12 20:05:23
|
> >> We should also be careful not to send the JavaScript to people who > >> use older browsers - PHP has a function that can help with this > >> (get_browser()). > > > > I'm not convinved that it's worth the bother. When 0.01% of people > > are using browsers that won't understand this kind of javascript, > > it's probably not worth it. 5 years ago, yes, you had to take into > > account the fact that a good handful of people would be using > > netscape 2, but even then, we were designing for the shiny new > > Netscape 3, with all it's advanced features. > > Yes, but people might have javascript turned off, even in their new > fancy browser. So, there should still be a way to get the normal > report. > > > There is a reason for doing a browser-detect though, or at least > > finding a way around the problem: some people use screen readers, or > > parsers like betsie to present easy-to-read versions of a page. They > > won't like javascript. > > I don't know betsie, but you're right: there has to be an option to > turn this javascript-thing off. And it would be preferable if the > script could try and guess when to turn if off. get_browser() depends on browscap.ini being properly defined and kept up to date, and won't help with people who've disabled js. Since browscap does not get installed by default with PHP, I think we're asking for trouble by using it. Sure, give people an option, but I don't think we should be using get_browser() at all. This is something for application designers to worry about, whereas phpweather is a library rather than an application. It would make more sense IMO to start building this kind of functionality into the CVS tree. I think that a lot of what's in CVS is nearly ready for release, so we should be concentrating on making a release out of it, rather than tweaking the old stuff. The functions in CVS (eg browsing to the airport of choice) are more at the application level than the current releases. Max |