cloudy

Author Topic: NOAA RSS Top Warning Scripting question  (Read 526 times)

0 Members and 1 Guest are viewing this topic.

Offline gulfbreeze

  • Posts: 14
NOAA RSS Top Warning Scripting question
« on: September 09, 2011, 07:18:52 PM »
I have noticed on several sites that the city name is used instead of the zone code.

(I.E. There are no active watches, warnings or advisories for zone CAZ513. ->  There are no active watches, warnings or advisories for Santa Clara Valley Including San Jose (California).)

How do I change from zone code to the city name?

GB

Offline saratogaWX

  • Posts: 4,577
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
    • Saratoga Weather
Re: NOAA RSS Top Warning Scripting question
« Reply #1 on: September 09, 2011, 10:02:07 PM »
In atom-advisory.php, make sure you have
Code: [Select]
$doLongTitles = true; // <== change to true to add the zone name to the Alert Title (new in ver. 2.00)
// Heat Advisory
// Heat Advisory - South Washington Coast (Washington)

$doZoneTitles = true; // <== change to true to add the full zone name to the No Active Alert Title
// false = There are no active watches, warnings or advisories for zone WAZ021.
// true =  There are no active watches, warnings or advisories for South Washington Coast (Washington).
set to have the names appear and not just the zones.

A similar setting in atom-top-warning.php is
Code: [Select]
$doLongTitles = true; // change to true to add the zone name to the Alert Title (new in ver. 2.00)
// Heat Advisory
// Heat Advisory - South Washington Coast (Washington)

Hope this helps...

Best regards,
Ken
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

Offline gulfbreeze

  • Posts: 14
Re: NOAA RSS Top Warning Scripting question
« Reply #2 on: September 09, 2011, 10:29:31 PM »
All these setting are set to True...in both php files, still shows zone code...no city/county   :(

Hang on...which code do I use...the State Zone code or the State County code?   If I use the zone code it reports MSZ080, as when I use the county code it prints Hancock (Mississippi).   :?
« Last Edit: September 09, 2011, 10:48:14 PM by gulfbreeze »

Offline saratogaWX

  • Posts: 4,577
  • Saratoga, CA, USA 37:16:28N, 122:01:23W - Elev: 374ft.
    • Saratoga Weather
Re: NOAA RSS Top Warning Scripting question
« Reply #3 on: September 10, 2011, 12:20:50 AM »
With those settings =true; the text displayed should be the same as the text displayed on the Mississippi page on the alerts.weather.gov website

Zones: http://alerts.weather.gov/cap/ms.php?x=2
Counties: http://alerts.weather.gov/cap/ms.php?x=3

For the California areas, the Zones sometimes have more than just a city name (particularly in the dense populated areas), so instead of Saratoga it says 'Santa Clara Valley Including San Jose (California)' instead.

I generally use the Zone code instead of the County code as it may contain more specific info (especially if the County is a large one).

Best regards,
Ken
Ken True
Saratoga Weather
CWOP: CW1792
WeatherUnderground: KCASARAT1
Free weather website PHP scripts and WD website AJAX templates

Offline gulfbreeze

  • Posts: 14
Re: NOAA RSS Top Warning Scripting question
« Reply #4 on: September 10, 2011, 06:16:17 AM »
Thanks Ken!

I will use the county codes, as it display at least the county name, where as the  zone only gives me the zone code.   :D

Offline Saunook

  • Posts: 30
  • Saunook, NC
    • Saunookweather
Re: NOAA RSS Top Warning Scripting question
« Reply #5 on: September 14, 2011, 09:50:32 PM »
Hi Ken

I also am having the same problem. Dosen't matter if I use
the county code NCC087 or county zone NCZ052.
atom-top-warning.php  will only show either NCC087 or NCZ052.
I have checked these two scripts and have the settings set just
like you showed above.
In atom-advisory.php it works just fine and shows Haywood County (NC)
I am using the latest versions of the two scripts and have updated
my website to v3 of the scripts. Thank you so much for all your help.
If it wasn't for your scripts, I wouldn't have a website like I do now.

Jeff
Saunookweather
« Last Edit: September 14, 2011, 09:52:08 PM by Saunook »

Offline Saunook

  • Posts: 30
  • Saunook, NC
    • Saunookweather
Re: NOAA RSS Top Warning Scripting question
« Reply #6 on: September 15, 2011, 11:50:07 AM »
Hi Ken

Got it working now.
Had to make a change in my index page.

$useTopWarning = false;  // set to true to use only the rss-top-warning script
//                         set to false to use the rss-advisory script instead

It was set to true but after I set this to false it starting working and showing my county name
Haywood (North Carolina)  instead of NCC087

Jeff
« Last Edit: September 15, 2011, 12:41:50 PM by Saunook »

Offline johnah99

  • Posts: 32
  • Loris, South Carolina USA
    • Loris SC Weather
Re: NOAA RSS Top Warning Scripting question
« Reply #7 on: September 15, 2011, 05:14:23 PM »
Quote
Had to make a change in my index page.

$useTopWarning = false;  // set to true to use only the rss-top-warning script
//                         set to false to use the rss-advisory script instead

I was having the same problem and this fixed mine too.
Thanks
Jeff

Offline Saunook

  • Posts: 30
  • Saunook, NC
    • Saunookweather
Re: NOAA RSS Top Warning Scripting question
« Reply #8 on: September 15, 2011, 10:23:29 PM »
You are welcome. I just fround that setting through good old process
of elimination. Kept trying different settings in scripts till I ran across
this setting and tried it and it worked.

Jeff
Saunookweather

 

cumulus