Author Topic: NWS website changed .. advforecast2.php V3.03 02-Jul-2012 now available  (Read 20696 times)

0 Members and 1 Guest are viewing this topic.

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 6729
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Whew... testing finished and advforecast2.php V3.03 02-Jul-2012 now supports the revised NWS pages.

For V3 template users .. use the updates page for Base-USA 02-Jul-2012

For V2 template users and non-template users, the script page has the download link.

Best regards,
Ken

ps.. I've locked the other thread so folks won't be confused :)
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Boltek-PCI/NexStorm, microSferics ToA, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge/hub
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4062
    • Colorado Springs Weather
Thanks Ken. I'm glad everyones got theirs up and running. I cant get mine going :-(




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Hikvision HD IP Camera

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 1979
    • SouthEast Lincoln, NE Weather
That was fast work, Ken.  Many thanks! =D> =D> =D>
Regards, Jerry Wilkins
gwwilk@inebraska.com

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4062
    • Colorado Springs Weather
I've changed the lines but it still displays Saratoga

 $NOAAZone = 'KSZ031';  // change this line to your NOAA warning zone.
// set $fileName to the URL for the point-printable forecast for your area
 $fileName = "http://forecast.weather.gov/MapClick.php?CityName=Hays&state=KS&site=DDC&textField1=38.8866&textField2=-99.298&e=1&TextType=2";//
$iconDir = './forecast/images/';
$iconType = '.jpg';        // default type='.jpg' -- use '.gif' for animated icons from http://www.meteotreviglio.com/
$cacheFileDir = './';      // default cache file directory

I dont understand




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Hikvision HD IP Camera

Offline Cienega32

  • Forecaster
  • *****
  • Posts: 2571
    • East Mesa Weather
I was locked out of the other thread while composing this (short version):

95% perfect for me (v2 templates) - 'Tstrms' is now 'Thunderstorms' which pushes off the page when the forecast has them all thru-out like I do this week.

Thanks Ken for the rapid response! I noticed the problem this morning and just now went to your site and found the update.



Pat ~ Davis VP2 6153-Weatherlink-Weather Display-StartWatch-VirtualVP-Win7 Pro-64bit
www.LasCruces-Weather.com   www.EastMesaWeather.com

Offline McLouthWX

  • Member
  • *
  • Posts: 41
    • McLouth Weather Live
Many thanks for your lightening quick response, Ken. My site is 100% again.

Ken
If you aren't confused, then you weren't paying attention.

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4062
    • Colorado Springs Weather
How you guys do it?




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Hikvision HD IP Camera

Offline Moose Whisperer

  • Senior Contributor
  • ****
  • Posts: 240
    • Alaska Weather Watch
How you guys do it?
I don't know. I just copied over my advforecast2.php and everything worked. You sure you didn't change anything in your Settings.php file?

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4062
    • Colorado Springs Weather
How you guys do it?
I don't know. I just copied over my advforecast2.php and everything worked. You sure you didn't change anything in your Settings.php file?

You copied the new advforecast2.php to your server to replace the old one? Any you made these changes to the new one...
 $NOAAZone = 'KSZ031';  // change this line to your NOAA warning zone.
// set $fileName to the URL for the point-printable forecast for your area
 $fileName = "http://forecast.weather.gov/MapClick.php?CityName=Hays&state=KS&site=DDC&textField1=38.8866&textField2=-99.298&e=1&TextType=2";//
$iconDir = './forecast/images/';
$iconType = '.jpg';        // default type='.jpg' -- use '.gif' for animated icons from http://www.meteotreviglio.com/
$cacheFileDir = './';      // default cache file directory

Any more changes that I have to do?

Thanks




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Hikvision HD IP Camera

Offline dasman

  • Forecaster
  • *****
  • Posts: 426
    • Wx Peotone
1st  Ken thanks for your rapid fix =D> \:D/

I have the script up and running.  I did however notice that my page no longer Validates HTML 1.0 transitional.  The error seems to be the way the coding from the script displays in the page it is called from.  I went to your site and you have the same validation issue on yours.  my page is http://www.peotoneweather.com/.  Don't get me wrong...Im happy the way it is (working), I just wanted to let you know incase you didn't already.

Thanks again Ken.  Y0u the MAN.
Dave Sommerfed
Peotone Illinois USA
CW7762, KILPEOT1
NWS COOP, CoCoRaHS, Spotter Network

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4062
    • Colorado Springs Weather




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Hikvision HD IP Camera

Offline Moose Whisperer

  • Senior Contributor
  • ****
  • Posts: 240
    • Alaska Weather Watch
How you guys do it?
I don't know. I just copied over my advforecast2.php and everything worked. You sure you didn't change anything in your Settings.php file?

You copied the new advforecast2.php to your server to replace the old one? Any you made these changes to the new one...
 $NOAAZone = 'KSZ031';  // change this line to your NOAA warning zone.
// set $fileName to the URL for the point-printable forecast for your area
 $fileName = "http://forecast.weather.gov/MapClick.php?CityName=Hays&state=KS&site=DDC&textField1=38.8866&textField2=-99.298&e=1&TextType=2";//
$iconDir = './forecast/images/';
$iconType = '.jpg';        // default type='.jpg' -- use '.gif' for animated icons from http://www.meteotreviglio.com/
$cacheFileDir = './';      // default cache file directory

Any more changes that I have to do?

Thanks
No, I didn't touch a thing in the new advforecast2.php file. All of the settings in your Settings.php file will override those in the new advforecast2.php file. The only time you need to edit anything in the new file is if you are using it as a stand alone.

Offline DaculaWeather

  • It's a Jeep thing... you wouldn't understand.
  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3159
  • SCCA EM #156
    • North Georgia and US Weather
Ken... got them working. one question. The NWS is using the full word "thunderstorms" which they never did. Now when all the days have thunderstorm, the table expands larger than it should. Is that word being substituted by the script?

They use to use Tstms or something.

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4062
    • Colorado Springs Weather
So just copy the new advforecast2.php to my server to override the old one?




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Hikvision HD IP Camera

Offline Moose Whisperer

  • Senior Contributor
  • ****
  • Posts: 240
    • Alaska Weather Watch
So just copy the new advforecast2.php to my server to override the old one?
That's what I did!

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4062
    • Colorado Springs Weather
So just copy the new advforecast2.php to my server to override the old one?
That's what I did!

Not working like that for me




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Hikvision HD IP Camera

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4062
    • Colorado Springs Weather
Weird :sad:




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Hikvision HD IP Camera

Offline Moose Whisperer

  • Senior Contributor
  • ****
  • Posts: 240
    • Alaska Weather Watch
So just copy the new advforecast2.php to my server to override the old one?
That's what I did!

Not working like that for me
Are you absolutely sure you are using the correct version of the new file?

http://saratoga-weather.org/advforecast2.php?sce=view

The only reason I ask is because those cities showing on your website right now aren't even the ones showing in the array in the new version of the file - so I have no idea where they are coming from.




Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4062
    • Colorado Springs Weather
So just copy the new advforecast2.php to my server to override the old one?
That's what I did!

Not working like that for me
Are you absolutely sure you are using the correct version of the new file?

http://saratoga-weather.org/advforecast2.php?sce=view

The only reason I ask is because those cities showing on your website right now aren't even the ones showing in the array in the new version of the file - so I have no idea where they are coming from.






Yes. Just copy that to notepad and overwrite the old advforecast2? Correct




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Hikvision HD IP Camera

Offline Moose Whisperer

  • Senior Contributor
  • ****
  • Posts: 240
    • Alaska Weather Watch
Looking back, I see the cities in your dropdown list are actually the default cities set in the original Settings.php file provided with Ken's base template zip file:

"CAZ513|Saratoga|http://forecast.weather.gov/MapClick.php?CityName=Saratoga&state=CA&site=MTR&textField1=37.2639&textField2=-122.022&e=1&TextType=2",
"CAZ513|Los Gatos|http://forecast.weather.gov/MapClick.php?CityName=Los+Gatos&state=CA&site=MTR&textField1=37.2267&textField2=-121.974&e=0&TextType=2",
"CAZ513|Cupertino|http://forecast.weather.gov/MapClick.php?CityName=Cupertino&state=CA&site=MTR&textField1=37.3231&textField2=-122.031&e=0&TextType=2",
"CAZ513|Sunnyvale|http://forecast.weather.gov/MapClick.php?CityName=Sunnyvale&state=CA&site=MTR&textField1=37.3689&textField2=-122.035&e=0&TextType=2",
"CAZ513|Santa Clara|http://forecast.weather.gov/MapClick.php?CityName=Santa+Clara&state=CA&site=MTR&textField1=37.3542&textField2=-121.954&e=0&TextType=2",
"CAZ513|San Jose|http://forecast.weather.gov/MapClick.php?CityName=San+Jose&state=CA&site=MTR&textField1=37.3394&textField2=-121.894&e=0&TextType=2",
"CAZ508|Mountain View|http://forecast.weather.gov/MapClick.php?CityName=Mountain+View&state=CA&site=MTR&textField1=37.3861&textField2=-122.083&TextType=2",
"CAZ529|Santa Cruz|http://forecast.weather.gov/MapClick.php?CityName=Santa+Cruz&state=CA&site=MTR&textField1=36.9742&textField2=-122.03&e=0&TextType=2",
"CAZ006|San Francisco|http://forecast.weather.gov/MapClick.php?CityName=San+Francisco&state=CA&site=MTR&textField1=37.775&textField2=-122.418&e=0&TextType=2",


what do lines 178 - 186 of your settings.php file show right now?

Offline DaculaWeather

  • It's a Jeep thing... you wouldn't understand.
  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3159
  • SCCA EM #156
    • North Georgia and US Weather
Got all of mine working. Thanks for getting  me pointed in the right direction Ken and thank you for everything you do for us.
I just wish they wouldn't the full word Thunderstorms!

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4062
    • Colorado Springs Weather
Looking back, I see the cities in your dropdown list are actually the default cities set in the original Settings.php file provided with Ken's base template zip file:

"CAZ513|Saratoga|http://forecast.weather.gov/MapClick.php?CityName=Saratoga&state=CA&site=MTR&textField1=37.2639&textField2=-122.022&e=1&TextType=2",
"CAZ513|Los Gatos|http://forecast.weather.gov/MapClick.php?CityName=Los+Gatos&state=CA&site=MTR&textField1=37.2267&textField2=-121.974&e=0&TextType=2",
"CAZ513|Cupertino|http://forecast.weather.gov/MapClick.php?CityName=Cupertino&state=CA&site=MTR&textField1=37.3231&textField2=-122.031&e=0&TextType=2",
"CAZ513|Sunnyvale|http://forecast.weather.gov/MapClick.php?CityName=Sunnyvale&state=CA&site=MTR&textField1=37.3689&textField2=-122.035&e=0&TextType=2",
"CAZ513|Santa Clara|http://forecast.weather.gov/MapClick.php?CityName=Santa+Clara&state=CA&site=MTR&textField1=37.3542&textField2=-121.954&e=0&TextType=2",
"CAZ513|San Jose|http://forecast.weather.gov/MapClick.php?CityName=San+Jose&state=CA&site=MTR&textField1=37.3394&textField2=-121.894&e=0&TextType=2",
"CAZ508|Mountain View|http://forecast.weather.gov/MapClick.php?CityName=Mountain+View&state=CA&site=MTR&textField1=37.3861&textField2=-122.083&TextType=2",
"CAZ529|Santa Cruz|http://forecast.weather.gov/MapClick.php?CityName=Santa+Cruz&state=CA&site=MTR&textField1=36.9742&textField2=-122.03&e=0&TextType=2",
"CAZ006|San Francisco|http://forecast.weather.gov/MapClick.php?CityName=San+Francisco&state=CA&site=MTR&textField1=37.775&textField2=-122.418&e=0&TextType=2",


what do lines 178 - 186 of your settings.php file show right now?

This...

$SITE['NWSforecasts']   = array( // for the advforecast2.php V3.xx version script
// use "Zone|Location|Point-printableURL",  as entries .. first one will be the default forecast.
  "CAZ513|Saratoga|http://forecast.weather.gov/MapClick.php?CityName=Saratoga&state=CA&site=MTR&textField1=37.2639&textField2=-122.022&e=1&TextType=2",
"CAZ513|Los Gatos|http://forecast.weather.gov/MapClick.php?CityName=Los+Gatos&state=CA&site=MTR&textField1=37.2267&textField2=-121.974&e=0&TextType=2",
"CAZ513|Cupertino|http://forecast.weather.gov/MapClick.php?CityName=Cupertino&state=CA&site=MTR&textField1=37.3231&textField2=-122.031&e=0&TextType=2",
"CAZ513|Sunnyvale|http://forecast.weather.gov/MapClick.php?CityName=Sunnyvale&state=CA&site=MTR&textField1=37.3689&textField2=-122.035&e=0&TextType=2",
"CAZ513|Santa Clara|http://forecast.weather.gov/MapClick.php?CityName=Santa+Clara&state=CA&site=MTR&textField1=37.3542&textField2=-121.954&e=0&TextType=2",
"CAZ513|San Jose|http://forecast.weather.gov/MapClick.php?CityName=San+Jose&state=CA&site=MTR&textField1=37.3394&textField2=-121.894&e=0&TextType=2",
"CAZ508|Mountain View|http://forecast.weather.gov/MapClick.php?CityName=Mountain+View&state=CA&site=MTR&textField1=37.3861&textField2=-122.083&TextType=2",
"CAZ529|Santa Cruz|http://forecast.weather.gov/MapClick.php?CityName=Santa+Cruz&state=CA&site=MTR&textField1=36.9742&textField2=-122.03&e=0&TextType=2",
"CAZ006|San Francisco|http://forecast.weather.gov/MapClick.php?CityName=San+Francisco&state=CA&site=MTR&textField1=37.775&textField2=-122.418&e=0&TextType=2",




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Hikvision HD IP Camera

Offline Moose Whisperer

  • Senior Contributor
  • ****
  • Posts: 240
    • Alaska Weather Watch
Got all of mine working. Thanks for getting  me pointed in the right direction Ken and thank you for everything you do for us.
I just wish they wouldn't the full word Thunderstorms!
Looks Good, glad you got it working!  =D>

Offline cospringswx

  • Forecaster
  • *****
  • Posts: 4062
    • Colorado Springs Weather
Lines 164-167 say this...

# fcsturlNWS is the point-printable forecast URL from http://www.weather.gov/ (used by advforecast2.php)
$SITE['fcsturlNWS']      = 'http://forecast.weather.gov/MapClick.php?CityName=Hays&state=KS&site=DDC&textField1=38.8782&textField2=-99.3188&e=1&TextType=2';
$SITE['fcsticonsdir'] = './forecast/images/'; // NOAA-style icons for NWS, WU, WXSIM forecast scripts
$SITE['fcsticonstype']= '.jpg'; // default type='.jpg' -- use '.gif' for animated icons from http://www.meteotreviglio.com/




Ryan 

Colorado Springs, CO
www.cospringsweather.com
Davis Vantage Vue
Weather Display Software
Hikvision HD IP Camera

Offline Moose Whisperer

  • Senior Contributor
  • ****
  • Posts: 240
    • Alaska Weather Watch
Looking back, I see the cities in your dropdown list are actually the default cities set in the original Settings.php file provided with Ken's base template zip file:

"CAZ513|Saratoga|http://forecast.weather.gov/MapClick.php?CityName=Saratoga&state=CA&site=MTR&textField1=37.2639&textField2=-122.022&e=1&TextType=2",
"CAZ513|Los Gatos|http://forecast.weather.gov/MapClick.php?CityName=Los+Gatos&state=CA&site=MTR&textField1=37.2267&textField2=-121.974&e=0&TextType=2",
"CAZ513|Cupertino|http://forecast.weather.gov/MapClick.php?CityName=Cupertino&state=CA&site=MTR&textField1=37.3231&textField2=-122.031&e=0&TextType=2",
"CAZ513|Sunnyvale|http://forecast.weather.gov/MapClick.php?CityName=Sunnyvale&state=CA&site=MTR&textField1=37.3689&textField2=-122.035&e=0&TextType=2",
"CAZ513|Santa Clara|http://forecast.weather.gov/MapClick.php?CityName=Santa+Clara&state=CA&site=MTR&textField1=37.3542&textField2=-121.954&e=0&TextType=2",
"CAZ513|San Jose|http://forecast.weather.gov/MapClick.php?CityName=San+Jose&state=CA&site=MTR&textField1=37.3394&textField2=-121.894&e=0&TextType=2",
"CAZ508|Mountain View|http://forecast.weather.gov/MapClick.php?CityName=Mountain+View&state=CA&site=MTR&textField1=37.3861&textField2=-122.083&TextType=2",
"CAZ529|Santa Cruz|http://forecast.weather.gov/MapClick.php?CityName=Santa+Cruz&state=CA&site=MTR&textField1=36.9742&textField2=-122.03&e=0&TextType=2",
"CAZ006|San Francisco|http://forecast.weather.gov/MapClick.php?CityName=San+Francisco&state=CA&site=MTR&textField1=37.775&textField2=-122.418&e=0&TextType=2",


what do lines 178 - 186 of your settings.php file show right now?

This...

$SITE['NWSforecasts']   = array( // for the advforecast2.php V3.xx version script
// use "Zone|Location|Point-printableURL",  as entries .. first one will be the default forecast.
  "CAZ513|Saratoga|http://forecast.weather.gov/MapClick.php?CityName=Saratoga&state=CA&site=MTR&textField1=37.2639&textField2=-122.022&e=1&TextType=2",
"CAZ513|Los Gatos|http://forecast.weather.gov/MapClick.php?CityName=Los+Gatos&state=CA&site=MTR&textField1=37.2267&textField2=-121.974&e=0&TextType=2",
"CAZ513|Cupertino|http://forecast.weather.gov/MapClick.php?CityName=Cupertino&state=CA&site=MTR&textField1=37.3231&textField2=-122.031&e=0&TextType=2",
"CAZ513|Sunnyvale|http://forecast.weather.gov/MapClick.php?CityName=Sunnyvale&state=CA&site=MTR&textField1=37.3689&textField2=-122.035&e=0&TextType=2",
"CAZ513|Santa Clara|http://forecast.weather.gov/MapClick.php?CityName=Santa+Clara&state=CA&site=MTR&textField1=37.3542&textField2=-121.954&e=0&TextType=2",
"CAZ513|San Jose|http://forecast.weather.gov/MapClick.php?CityName=San+Jose&state=CA&site=MTR&textField1=37.3394&textField2=-121.894&e=0&TextType=2",
"CAZ508|Mountain View|http://forecast.weather.gov/MapClick.php?CityName=Mountain+View&state=CA&site=MTR&textField1=37.3861&textField2=-122.083&TextType=2",
"CAZ529|Santa Cruz|http://forecast.weather.gov/MapClick.php?CityName=Santa+Cruz&state=CA&site=MTR&textField1=36.9742&textField2=-122.03&e=0&TextType=2",
"CAZ006|San Francisco|http://forecast.weather.gov/MapClick.php?CityName=San+Francisco&state=CA&site=MTR&textField1=37.775&textField2=-122.418&e=0&TextType=2",

hmmm... that might be where the problem is. Somehow your settings.php file wasn't overriding the forecast properly.

Try copying all of your original settings from your old advforecast2.php into the corresponding lines of your Settings.php file and see if that works.