NEW AtomFeed.php Program

A NEW AtomFeed.php program is available.

This new version replaces the previous version.
Recommendations by forum members, changes at the NWS, and issues over the past several months are addressed in this revised program.

The AtomFeed program now consists of three files that makes it more efficient in downloading data, handling errors, and using county codes along with zone codes.

[b]What’s new

wow… Thanks for taking the time in making this Curly. I’ll be adding this after work today.

::Two Thumbs Up::

Thanks for the hard work on it Curly!

Thanks for testing this on your end Tony!

As a side note, since this is going into another folder, do not delete the old AtomFeed.php file in your main folder until you test out the new one. You can always revert back to the old one if there are any issues.

Any time Rick! Always a pleasure to try and learn new stuff :lol:

Got it up and running. Looks great!

Thanks Again

I got it working, Thank you again Curly for all of your hard work.

One question… in the atomfeed-config file i have this for now…



"WAZ505" => "Snoqualmie,Wa", // Snoqualmie Wa - priority zone listed first
    "WAC033" => array(1 => "WAC033",'a' => "WAZ505"),  // COUNTY CODE => COUNTY CODE => ZONE CODE
    "WAZ033" => array(1 => "WAC033",'a' => "WAZ505",'b' => "WAZ505"),  // COUNTY CODE =>  COUNTY CODE => ZONE CODE => ZONE CODE
    "MDZ006" => "No.Balt.Co.", // N Baltimore
    "MDZ011" => "So.Balt.Co." // S Baltimore


In the old one i have this…



$ZoneLocation = array(
    "WAZ505" => "East Puget Sound Lowlands, WA ", 
    "WAZ007" => "Seattle Metropolitan Area, WA ", 
    "WAZ507" => "Everett, Vicinity, WA ", 
    "WAZ509" => "Tacoma Area, WA ", 
    "WAZ519" => "West Slopes Central Cascades and Passes, WA ",
    "WAC033" => "King County, WA",
    "WAC061" => "Snohomish County, WA",
    "WAC037" => "Kittitas County, WA",
    "WAC053" => "Pierce County, WA"



My main zone is WAZ505 and my main county is WAC033… How would i type this into the new one? Thanks.

I did mine like this if this helps you out:

// county/zone codes => location
$Code_Location = array(
"NYZ037" => "So Oneida Co.", // S ONEIDA - priority zone listed first
"NYZ009" => "No Oneida Co.", // N ONEIDA
"NYC065" => array(1 => "NYC065",'a' => "NYZ009", 'b' => "NYZ037"),  // array = county 2 zone conversion
"NYZ032" => "No Herkimer Co.", // N HERKIMER
"NYZ038" => "So Herkimer Co.", // S HERKIMER
"NYZ036" => "Madison Co.", // MADISON
"NYZ008" => "Lewis Co.", // LEWIS
"NYZ046" => "Otsego Co.", // OTSEGO
"NYZ006" => "Oswego Co.", // OSWEGO

Thanks Tony, that does help. What are your main zone and county codes?

Curly,

Very nice job!! :hello1: :hello1: :hello1:

Got it all up and running!

Michael

That extra array is for the county code to zone code conversion.
When entering a county code for the conversion, one zone code gets entered in the array (‘a’) unless that county is split into two zones. Only when a county is split into two zones, the second zone goes in ‘b’.

This line is correct


    "WAC033" => array(1 => "WAC033",'a' => "WAZ505"),  // COUNTY CODE => COUNTY CODE => ZONE CODE

You will need to delete this line


    "WAZ033" => array(1 => "WAC033",'a' => "WAZ505",'b' => "WAZ505"),  // COUNTY CODE =>  COUNTY CODE => ZONE CODE => ZONE CODE

When you have an array like this, set $use_conversion to true.
If you do not have that type of an array, set $use_conversion to false.

Thanks Curly… Got a couple more questions…lol

The warning showing now on my index page isnt one of my main county or zone codes but its still showing.

$local_alerts = true; // true=show primary location

Unless im misunderstanding that, it should only show my current zone or county code alerts, is that correct?

The alert box isnt centered below the “weather alerts”. Ive tried changing the box size, but that didnt seem to do much to align it. Fixed

Is your zone the first one listed in the array?

Thanks Curly.
Got it downloaded and will install and test it tomorrow.

This is what i have…WAZ505 is my primary zone and WAC033 is my primary county. I got the other warning not showing now, which is what i wanted. is there a way for it to show " no warnings/advisories for a zone/location"? if there are no warnings?



$Code_Location = array(
    "WAZ505" => "Snoqualmie,Wa", // Snoqualmie Wa - priority zone listed first
    "WAC033" => array(1 => "WAC033",'a' => "WAZ505"),  // COUNTY CODE => COUNTY CODE => ZONE CODE
    "WAZ508" => "Seattle Metropolitan Area, WA", // Seattle
    "WAZ509" => "Tacoma Area, WA", // Tacoma
    "WAZ519" => "West Slopes Central Cascades and Passes, WA", //
    "WAC061" => "Snohomish County, WA", // Snohomish County, WA
    "WAC037" => "Kittitas County, WA", // Kittitas County, WA
    "WAC053" => "Pierce County, WA" // Pierce County, WA


Yes it should be showing a non alert message in the box.

I will need to duplicate your settings and see what is going on.
The problem that I have now is my internet service is down so I can’t get your county and zone alerts. #-o

ok…if you have time… I can post some settings here or a file… just let me know what one…

Thank You Curly for all your work…I’ve installed it for the first time and I think I have it working well…http://www.bwsrh.com/AtomSummary.php5

I have a question about the last update statement…I’m using a vbs script in XP, should I expect to see that time change every 10 minutes (which is my update rate) or is this the time last updated by NOAA.

I would think the time should update every 10 minutes but that’s not my case.

Thanks Again.

Steve

Curly, a couple issues:

  1. I cant get the box size smaller to fit on my narrow page

  2. Its showing a different zone than mine (NYZ037) on the main page.
    Trying to get it to just show my zone

Here’s my settings:

$create_box = true;   //  true=create a box <div><table>  false= no box created, just alert messages

$aBox_Width = '450';     // width of box  examples - aBox_Width = '80%';  aBox_Width = '850px';  or smallest box  aBox_Width = '';

$link2details = true;  //  true=link to full detail page   false=link to summary page

$local_alerts = true;  // true=show primary location  false=show all locations 
// also when set to true, all alerts are displayed for the local location
// regardless if limit_topAlerts is set to true

$limit_topAlerts = false;  // true=display highest ranked alert for each code
                          // false=display all alerts for each code
						  
$always_show = true;  // true=display message if no alerts   false=display message only when alert is active
						  
$limit_NoAlerts = true;  // true=show 1 'no alert' message if always_show=true   
                        // false=show 'no alert' message for each code if always_show=true
						// *only if local_alerts=false

$line_break = false;      // true=one alert per line if aBox_Width is used   false=fit multiple alerts on each line
                         // *if line_break=false AND aBox_Width has a value, icons are removed
						 
$aBox_Color = '#FFEEBB';  // background color of the alert box if create_box=true  examples  '#FFF'  '#FFEEBB'  'white'

$aBox_Border = '1';      // border size of alert box  0=no outline if create_box=true

$aBox_Icon = true;       // true=show icons in alert box   false=no icons in the alert box if create_box=true

Tony

Tony,

With regards to the width, I think you need to place either a % or px behind your number. Mine is set $aBox_Width = ‘100%’;

To get just your zone to show, you need to place your zone as the very first one in the array. My main zone is MDZ011. Here is my setup:

// county/zone codes => location
$Code_Location = array(
    "MDZ011" => "So.Balt.Co.", 
    "MDC005" => array(1 => "MDC005",'a' => "MDZ011",'b' => "MDZ006"),
    "MDC013" => array(1 => "MDC013",'a' => "MDZ005"),
    "MDC027" => array(1 => "MDC027",'a' => "MDZ010"),
    "MDC003" => array(1 => "MDC003",'a' => "MDZ014"),
    "MDC021" => array(1 => "MDC021",'a' => "MDZ004"),
    "MDC031" => array(1 => "MDC031",'a' => "MDZ009"),
    "MDC025" => array(1 => "MDC025",'a' => "MDZ007"),
    "MDC033" => array(1 => "MDC033",'a' => "MDZ013"),
    "MDZ006" => "No.Balt.Co.", 
    "MDZ005" => "Carroll Co.", 
    "MDZ010" => "Howard Co.",
    "MDZ014" => "A.Arudel Co.",
    "MDZ004" => "Frederick Co.",
    "MDZ009" => "Montgomery Co.",
    "MDZ007" => "Harford Co.",
    "MDZ013" => "P.Georges Co."
);

Michael

Ah I thought it was just looking for a number.

I put in 80%, 100% and it’s still too wide.

I do have my zone 1st Michael. If you look on the first page of this, I posted it up for ALITTLEweird1.
It’s cool, we’ll figure it out.