NEW AtomFeed.php Program

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
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 hasn't updated since I ran atomalerts/AtomFeed.php manually.

There are no settings in the AtomFeed-config.php file for updating. The settings place the files when updated.
If it hasn’t updated since you’ve manually ran the file, that means the cron job or the program to call the AtomFeed.php file, like the Windows Task Scheduler, doesn’t have the new path atomalerts/AtomFeed.php.
Check the file for the sub folder.

On my index page inside the alert box, Its not showing no advisories anymore. Any ideas or should I just let it go and see if it fixes itself? it was working this morning and i havent touched any of the files today.

There was an issue with this under certain conditions and I’ve updated the AtomFeed.php file and the AtomFeed-config.php file.
Update both files as described here http://discourse.weather-watch.com/p/339508

I’ve got 2 atomalerts folders now Rick. I think it was cause i had this path

$cache_folder = “…/atomalerts/work/”; // folder to keep cache and data files - chmod to 775

Which I changed now to just …/work

$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 = "../atomalerts/AtomArray.php";  // filename of the main alert arrays (CHMOD=664)
                                    // (filename to be included in other pages)

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

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

$icon_folder = '../images';	// folder for all icons. *Do not added trailing forward slash			   


Thanks Curly, that fixed it. Overlooked that update you posted.

Which I changed now to just ../work

I strongly discourage doing that. That put another sub folder in your root, cnyweather?/work, and is no longer connected with the cnyweather?/atomalerts folder.
You should not change the path to this folder by adding the dot dot. The option is there to change the name of the folder.

I changed back to $cache_folder = “/work/”; //

Havent had an update since 6:45 Rick