NEW AtomFeed.php Program

I put a fresh copy in there Michael. Changed just the first zone to my main one
and it wouldnt load the ajax-dashboard.

8O
This is a job for Curly! :slight_smile:

YUP

Thanks for the help Michael.

Just for info Curly, i got mine all working the way i wanted too… Thanks again for the script.

How’d you get your “Weather Alert” box up there? I had it and lost it again.

This is what Im using on my index page…



<?php
echo "<!-- AtomFeed Alert Box-->";
include("./atomalerts/AtomArray.php");
if($alert_box !== '') {
print '
<div>
<table border="0" cellspacing="0" cellpadding="0" style="width: 650px; margin: 0px auto 0px auto;">
<tr>
<td style="color: #FFFF99; background-color: #3AB; text-align: center">WEATHER ALERTS</td>
</tr>
<tr>
<td>'.$alert_box.'</td>
</tr>
</table>
</div>';
}
echo "\n<!-- end AtomFeed Alert Box-->\n";
?>




Well that woulda fixed the width problem I had before. Didnt realize there
was a width size within the code I have on my index page to print the warnings.

Except now I cant get the warning box and No Watches… to apear

I noticed in your view source the code isnt there…all i see is the start and end tags of the script…

Hmmm.

If you go to http://www.cnyweather.com/atomalerts/AtomFeed.php, viewing the source,
that shows it’s downloading the files. I’ll see what I did wrong when Curly gets on

My AtomArray.php shows nothing in view source now.

I see Mark has his AtomArray in his atomalerts folder. Mine is just in my root

Thats where the script put it by itself. Not really sure if that matters though. as long as you have your config file pointing to where ever it is.

Does the …/AtomArray.php mean that it isnt in the root folder, correct Mark?

Mine is in the root so I just changed it to just $file_output = "AtomArray.php

On the next cron job, i believe I will get an error on the site again.

The AtomArray.php is the data file that the web pages pull the information from and should be set to go into the root.
All of the web pages that are in the root use include("AtomArray.php"). Since the main AtomFeed files are in another folder, you need to use this setting:
$file_output = "../AtomArray.php";.
If you omit off the ’ …/ ', it will keep the AtomArray.php file in the sub folder and the include function for the web pages will not get the file and create an error.

I really screwed something up Curly

http://www.cnyweather.com/AtomZone.php returns Invalid zone or no zone entered in URL

If you wanna hack into my site, lemme know. I have an error on the main page now.

Fixed the issue with the Alert Box not displaying when $local_alerts is set to true and there were no local alerts but other alerts.
Both of these files need to be updated AtomFeed.php and AtomFeed-config.php.
The AtomFeed.php file can be downloaded and then uploaded to the server in the sub folder. There are no user settings in this file. AtomFeed.php version 4

You can download the AtomFeed-config.php, or copy and paste it, or make this modification to your existing file.
Open AtomFeed-config.php and find this

$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

Replace it with this

$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
						 
$colorCode_bckgrnd = false;  // true=color code background to first alert severity rating + change text to black
                            // false=no color code for the background, always use aBox_Color
						 

An option was added to change the alert box background color to a severity rated color code. If the highest ranked alert is a warning, the background will be red or if it is a watch, the background will change to orange. All text will be black if this option is set to true and there is an alert.

Curly

Tony,

This is your warning message

Warning: include(../AtomArray.php) [function.include]: failed to open stream: No such file or directory in /home/content/c/n/y/cnyweather/html/index.php on line 60

That means it is looking in /cnyweather/ for the AtomArray.php file. The AtomArray.php file is in the root along with your index page.
You will need to edit your index page and change this include("../AtomArray.php"); to this include("AtomArray.php");

To place the AtomArray.php file in the root, this needs to be set in the AtomFeed-config.php file

 $file_output = "../AtomArray.php";

Web pages will need the default setting include("AtomArray.php");

Got that done now.

Here’s what I have on my index page:

<div id="main-copy">
    
<?php
echo "<!-- AtomFeed Alert Box-->";
include("AtomArray.php");
if($alert_box !== '') {
print '
<div>
<table border="0" cellspacing="0" cellpadding="0" style="width: 625px; margin: 0px auto 0px auto;">
<tr>
<td style="color: #FFFF99; background-color: #3AB; text-align: center">WEATHER ALERTS</td>
</tr>
<tr>
<td>'.$alert_box.'</td>
</tr>
</table>
</div>';
}
echo "\n<!-- end AtomFeed Alert Box-->\n";
?>

AtomArray.php is in my root. I’m gonna find a warning somewhere and add it to mine to see if the top box is working.

:lol: :lol: :lol: :lol:

I musta messed up one path or another Curly.

The Weather alert box was there for a sec now it’s gone.

The Weather alert box was there for a sec now it's gone.

Oh boy… the latest update should have fixed that.

SRY, That’s all set now.

I always have path issues. Always going down the wrong path. 8)

Next thing. Do I have to change all the paths in AtomFeed-config.php to put the files created
into the atomalerts folder I created? My atom feed hasnt updated since I ran atomalerts/AtomFeed.php manually.

$AdvisURL = "AtomZone.php"; // filename of your full detailed advisory page (CHMOD=664)

$AlertSummary = "AtomSummary.php"; // filename of your summary advisory page (CHMOD=664)

$file_output = "../AtomArray.php";  // filename of the main alert arrays (CHMOD=664)
                                    // (filename to be included in other pages)

$a_arrays = "../AtomWork.txt";     //  temp working file (CHMOD=664)
							 
$xmlFilename = "../LiveFeed.xml";   // filename for xml file (CHMOD=664)

$cache_folder = "../atomalerts/work/";  // folder to keep cache and data files - chmod to 775