cloudy

Author Topic: YR.NO forecast PHP-script - updated  (Read 32347 times)

0 Members and 1 Guest are viewing this topic.

Offline i_fiorentino

  • Alessandro Bardi
  • Posts: 1,500
  • 160 mls Carmignano (Po), Tuscany, Italy
    • Meteocarmignano.it
Re: YR.NO forecast PHP-script - updated
« Reply #30 on: October 15, 2009, 01:57:43 PM »
Yes, i have.

Offline weatherc

  • Posts: 1,789
  • Salo, Finland
    • Weatherstation Salo,FI
Re: YR.NO forecast PHP-script - updated
« Reply #31 on: October 15, 2009, 02:02:49 PM »
It doesn't work  :(
Which is the problem....
http://www.meteocarmignano.it/wxysforecast.php

Thanks for any help,

Alessandro

It worked for Seano just when tested it. Delete the .xml's in the cache-folder and try again, as they my be empty or something like that.

Offline i_fiorentino

  • Alessandro Bardi
  • Posts: 1,500
  • 160 mls Carmignano (Po), Tuscany, Italy
    • Meteocarmignano.it
Re: YR.NO forecast PHP-script - updated
« Reply #32 on: October 15, 2009, 02:07:05 PM »
Yeah!
Now it works ok.
Here is my link: http://www.meteocarmignano.it/wxysforecast.php?tl=0&lang=it

Thanks Henkka and MArtin!
Cheers,

Alessandro

Offline weatherc

  • Posts: 1,789
  • Salo, Finland
    • Weatherstation Salo,FI
Re: YR.NO forecast PHP-script - updated
« Reply #33 on: October 15, 2009, 02:33:41 PM »
Per request from Jim, is now the pulldown optional. If choose to not show the pulldown is the default forecast shown.
Note, if you call the forecast like yr_xml.php?tl=1 will it force to show no 1 and so on.

Henkka

Offline Bergerie

  • EndUser
  • Posts: 164
  • Montauroux, France
    • MontaurouxMeteoLive
Re: YR.NO forecast PHP-script - updated
« Reply #34 on: October 15, 2009, 03:41:48 PM »
Hi Henka,
If the pulldown is now optional, how could I swith it off, i.e disappear from the forecast. The default works but I thought you meant with "optional" appear or dispappear from forecast overview. Did I miss something?
Rgds
Dick

Offline K3JAE

  • Posts: 757
  • CoCoRaHS: TN-CR-7; WxUngrd: KTNBRUCE2; CWOP: AT066
  • Carroll County, TN, USA
    • K3JAE's Weather Station
Re: YR.NO forecast PHP-script - updated
« Reply #35 on: October 15, 2009, 05:12:32 PM »
I thought I might try this script and without ANY problems I successfully installed it and it worked "right out of the box."

I did some heavy editing to fit the format of my page as well as changed the icons a bit. Feel free to take a look it at...
http://www.k3jae.com/wxyr_xml.php and feel free to give opinion etc. I look forward to hearing from a few of you.


73's de K3JAE

John
K3JAE Weather Station

Offline weatherc

  • Posts: 1,789
  • Salo, Finland
    • Weatherstation Salo,FI
Re: YR.NO forecast PHP-script - updated
« Reply #36 on: October 15, 2009, 05:35:02 PM »
Hi Henka,
If the pulldown is now optional, how could I swith it off, i.e disappear from the forecast. The default works but I thought you meant with "optional" appear or dispappear from forecast overview. Did I miss something?
Rgds
Dick

In newest version there are a setting for disappearing it   :wink:

@K3JAE: Looks really great!  :D

Henkka
« Last Edit: October 15, 2009, 05:37:26 PM by weatherc »

Offline K3JAE

  • Posts: 757
  • CoCoRaHS: TN-CR-7; WxUngrd: KTNBRUCE2; CWOP: AT066
  • Carroll County, TN, USA
    • K3JAE's Weather Station
Re: YR.NO forecast PHP-script - updated
« Reply #37 on: October 15, 2009, 07:06:40 PM »
Thank you sir... Additionally, although it is not displaying, I edited your code just a hair to add a third color for the temperature display...

Meaning changed:

Code: [Select]
if($temp <= 0) {
$tcolor = "below";
} else {
$tcolor = "over";
}

To this:
Code: [Select]
if($temp <= 7) {
$tcolor = "below";
} else
if($temp >= 24) {
$tcolor = "over";
} else {
$tcolor = "middle";
}

below = "below color" / less than or equal to 7C (40F)
middle = Middle color" / between 7.1C to 23.9C (between 40.1F and 74.9F) (added to the .css file)
over = "Over color" / greater than or equal to 24C (75F)
« Last Edit: October 15, 2009, 07:09:46 PM by K3JAE »


73's de K3JAE

John
K3JAE Weather Station

Offline magical46

  • Posts: 448
    • Weybourne Weather
Re: YR.NO forecast PHP-script - updated
« Reply #38 on: October 15, 2009, 07:14:54 PM »
Hi Guys
I have just managed to get this up and running following the advice in this thread. I am a complete novice when it comes to this coding stuff but I think its looking good. Thanks to all of you.  :D
http://www.weybourneweather.co.uk/wxyrforcast.php

Phil

Offline AM1234

  • Posts: 375
  • Beamsville, Ontario, Canada
    • Beamsville Weather Station
Re: YR.NO forecast PHP-script - updated
« Reply #39 on: October 15, 2009, 07:43:44 PM »
This script is great, it's working, except I can't get the other cities in my drop-down menu to work, it just stays at my default location. What did I miss?

http://www.beamsvillewx.ca/wxyrno.php
Ann-Marie
Beamsville, Ontario, Canada

Offline BfdWx

  • Posts: 1,594
  • Branford Connecticut
    • Branford Weather
Re: YR.NO forecast PHP-script - updated
« Reply #40 on: October 15, 2009, 08:20:33 PM »
Quote
What did I miss?

Did you put an instance of each country, region, and city in for each drop down? That had me for a bit too!

Jack

Offline AM1234

  • Posts: 375
  • Beamsville, Ontario, Canada
    • Beamsville Weather Station
Re: YR.NO forecast PHP-script - updated
« Reply #41 on: October 15, 2009, 08:41:34 PM »
This is what I have in the yr_xml.php:

Code: [Select]
$citys = array(
'Canada/Ontario/Lincoln',
'Canada/Ontario/St.Catharines',
'Canada/Ontario/Hamilton',
'Canada/Ontario/Toronto'
);

Ann-Marie
Beamsville, Ontario, Canada

Offline BfdWx

  • Posts: 1,594
  • Branford Connecticut
    • Branford Weather
Re: YR.NO forecast PHP-script - updated
« Reply #42 on: October 15, 2009, 08:52:12 PM »
Should look more like this....

Code: [Select]
$country = array
('United_States','United_States','United_States','United_States','United_States','United_States','United_States','United_States','United_States','United_States');

$region = array('Connecticut','Connecticut','Connecticut','Connecticut','Connecticut','Connecticut','Connecticut','Connecticut','Connecticut','Connecticut');

$citys = array('Branford','East_Haven','Guilford','North_Branford','Madison','New_Haven','West_Haven','Milford','North_Haven','Wallingford');

Offline AM1234

  • Posts: 375
  • Beamsville, Ontario, Canada
    • Beamsville Weather Station
Re: YR.NO forecast PHP-script - updated
« Reply #43 on: October 15, 2009, 09:08:03 PM »
Great, Jack, thanks very much :) In the version I'm using, though, I don't see any place to list country and region, just cities, like in the code I displayed above.
« Last Edit: October 15, 2009, 09:16:12 PM by AM1234 »
Ann-Marie
Beamsville, Ontario, Canada

Offline weatherc

  • Posts: 1,789
  • Salo, Finland
    • Weatherstation Salo,FI
Re: YR.NO forecast PHP-script - updated
« Reply #44 on: October 15, 2009, 09:33:15 PM »
AM1234 & firewall:
I did a change to that today so the version AM1234 use is the new one and seems ok :)

But, there are something really odd on AM1234's page, as it shows the html-headers for standalone-version, did included it with PHP-include?
If yes, try to rename the page sligly different as the autocheck for standalone looks for just yr_xml as name.

Henkka

 

cumulus