cloudy cloudy

Author Topic: Alternative ATOM Feed Alert Program  (Read 80415 times)

0 Members and 1 Guest are viewing this topic.

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Posts: 5,145
  • North Bend, WA
    • North Bend Weather
Re: Alternative ATOM Feed Alert Program
« Reply #15 on: July 18, 2009, 05:29:15 PM »

Mark - If you view the page source of the AtomFeed.php file, it will show errors if any. I didn't see any.
I do show the program working - http://www.snoqualmieweather.com/AtomZone.php?zone=COZ099&loc=BACA+COUNTY+COLORADO

If you want me to check the script for problems, please post a link for the AtomFeed.php file.

Thanks
Curly





Mike went in and changed my permissions and that fixed it. Thanks.
"Nature can do without man, but man cannot do without nature."

Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Logitech Webcam

curly

  • Guest
Re: Alternative ATOM Feed Alert Program
« Reply #16 on: July 18, 2009, 05:30:55 PM »
Great!

Glad it's working... 

Offline tstorm

  • Posts: 378
  • Harpers Ferry, WV
    • Meadowbrook Farm Weather
Re: Alternative ATOM Feed Alert Program
« Reply #17 on: July 18, 2009, 05:31:32 PM »
Great script!  Thanks.  I'm a little confused after reading the docs as what I have to do to get the the warning box part to work so that it has the icon next to it.  I know I need to include AtomsFeed.php but I'm not sure of where I need to place some other code (tags).  Can someone provide me the exact code I need and where it needs to be placed and in what file.

Thanks,

John

mth

  • Guest
Re: Alternative ATOM Feed Alert Program
« Reply #18 on: July 18, 2009, 05:35:02 PM »
Great script!  Thanks.  I'm a little confused after reading the docs as what I have to do to get the the warning box part to work so that it has the icon next to it.  I know I need to include AtomsFeed.php but I'm not sure of where I need to place some other code (tags).  Can someone provide me the exact code I need and where it needs to be placed and in what file.

Thanks,

John

In your index.php, place this at the top just under your <div id="main-copy">

Code: [Select]
<?php print $alert_box?>
Be sure you have called the AtomArray.php file too

Michael
« Last Edit: July 18, 2009, 05:36:50 PM by mth »

Offline tstorm

  • Posts: 378
  • Harpers Ferry, WV
    • Meadowbrook Farm Weather
Re: Alternative ATOM Feed Alert Program
« Reply #19 on: July 18, 2009, 05:43:42 PM »
In your index.php, place this at the top just under your <div id="main-copy">

Code: [Select]
<?php print $alert_box?>
Be sure you have called the AtomArray.php file too

Michael

Okay got the short term forecast to show.  The warning box is not showing around.  How do I get this to show and text centered?

Thanks,

John

mth

  • Guest
Re: Alternative ATOM Feed Alert Program
« Reply #20 on: July 18, 2009, 05:47:22 PM »
This is controlled by your css file.  

If you have $use_CLcss set to "true", then the "advisoryBox" is used in your CSS file.  I see that yours is commented out by the //.  I would check there first for the formatting and uncomment.
« Last Edit: July 18, 2009, 05:49:12 PM by mth »

curly

  • Guest
Re: Alternative ATOM Feed Alert Program
« Reply #21 on: July 18, 2009, 05:52:55 PM »
John,

Your CSS file doesn't have "advisoryBox" and that is what the script uses.  There are two alternatives.
Find this
Code: [Select]
    $alert_bocks = '<div class="advisoryBox">' .  $alert_bocks . '</div>';
and change "advisoryBox" to "advisorybox"  or  "advisorybox1"   or  "advisoryBox2"

or you can use a defaulted box if you change   $use_CLcss = true;  to false.

mth

  • Guest
Re: Alternative ATOM Feed Alert Program
« Reply #22 on: July 18, 2009, 06:00:36 PM »

warwickpaweather

  • Guest
Re: Alternative ATOM Feed Alert Program
« Reply #23 on: July 18, 2009, 07:26:22 PM »
FOr some of us its just a bit more time consuming figuring it all out. I've placed everything on my server. Nothing is working.

mth

  • Guest
Re: Alternative ATOM Feed Alert Program
« Reply #24 on: July 18, 2009, 07:47:42 PM »
Chris,

I see that you've got something going....http://www.cwksr.com/AtomSummary.php

Let me know what you need/want to do.  I'd be glad to assist you

Michael

Offline TNETWeather

  • Kevin Reed (KrelvinAZ)
  • Posts: 5,939
  • Gremlins are at work...
  • Mesa, AZ
    • TNET Weather Station - Mesa AZ
Re: Alternative ATOM Feed Alert Program
« Reply #25 on: July 18, 2009, 07:48:34 PM »
Mark, your server does not have permission to create files.
I logged in and CHMOD your "web" folder to 777, ran AtomFeed.php and it created the files, then I CHMOD the "web" folder back to 715.

Pretty common issue ...

It might be a good idea if the script used a general data area and used that to create files in.  that way you can keep it at 0777 and not have to deal with it,

You can add a simple index.php file in that directory to keep out snoopers like:

Code: [Select]
<?php
   header 
("Location: /index.php");
?>


All you need is Time, Aptitude and Desire ... and you can build just about anything...

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Posts: 5,145
  • North Bend, WA
    • North Bend Weather
Re: Alternative ATOM Feed Alert Program
« Reply #26 on: July 18, 2009, 10:33:02 PM »
Just a quick question...

How often does it check for updates? I can force the update by going to Atomfeed.php. Its been little over 3 hours since last update. Thanks.
"Nature can do without man, but man cannot do without nature."

Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Logitech Webcam

abaldish

  • Guest
Re: Alternative ATOM Feed Alert Program
« Reply #27 on: July 18, 2009, 10:40:29 PM »
You could run the Atomfeed from a crontab and set for how often you want it to check for updates. Say every 15 minutes.

Just a quick question...

How often does it check for updates? I can force the update by going to Atomfeed.php. Its been little over 3 hours since last update. Thanks.

curly

  • Guest
Re: Alternative ATOM Feed Alert Program
« Reply #28 on: July 18, 2009, 10:44:33 PM »
AtomFeed.php needs to be called by a cron job every 15 minutes or so.

Some hosters don't offer crons but Mike Challis has a program that uses the Window$ Task Scheduler to perform this action reliably.
http://www.642weather.com/weather/wxblog/php-scripts/scheduled-http-request-windows-task-scheduler/

Offline ALITTLEweird1

  • Mark
  • Global Moderator
  • Posts: 5,145
  • North Bend, WA
    • North Bend Weather
Re: Alternative ATOM Feed Alert Program
« Reply #29 on: July 18, 2009, 11:14:32 PM »
AtomFeed.php needs to be called by a cron job every 15 minutes or so.

Some hosters don't offer crons but Mike Challis has a program that uses the Window$ Task Scheduler to perform this action reliably.
http://www.642weather.com/weather/wxblog/php-scripts/scheduled-http-request-windows-task-scheduler/

Got It working...TY
"Nature can do without man, but man cannot do without nature."

Davis VP2 + VP2 Solar + VP2 UV + Lightning Detector + Logitech Webcam