Author Topic: Top Warning Missing  (Read 546 times)

0 Members and 1 Guest are viewing this topic.

Offline roger kirk

  • Member
  • *
  • Posts: 7
  • Roger Kirk
    • Southeastern Kentucky Weather
Top Warning Missing
« on: February 27, 2024, 10:44:24 AM »
Hello, on my website http:sekywx.com, my top weather alert is missing. I just have a small yellow box instead of a weather alert message. My alerts work down the side of the page but no local warning or advisory at the top.
Roger Kirk
Southeastern Kentucky Weather
Middlesboro. Kentucky


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Top Warning Missing
« Reply #1 on: February 27, 2024, 01:06:14 PM »
The old atom-top-warning.php and atom-advisory.php scripts stopped operating as the NWS changed the data source and format on 31-Jan-2024.
The current nws-alerts script set needs to be used instead.  I see you are running nws-alerts.php via cron for 114 zones (that's a LOT of zones but only takes 17 seconds per http://sekywx.com/cache/nws-notes.txt )

Change index.php from
Quote
<?php // insert desired warning box at top of page
  if ($useTopWarning) {
     if (phpversion() < 5.0) {
       include_once("rss-top-warning.php");
     } else {
       include_once("atom-top-warning.php");
     }
  } else {
   print "      <div class=\"advisoryBox\">\n";
   $_REQUEST['inc'] = 'y';
   $_REQUEST['summary'] = 'Y';
   if (phpversion() < 5.0) {
     include_once("rss-advisory.php");
   } else {
     include_once("atom-advisory.php");
   }
   print "      </div>\n";
  }
?>
to
Quote
<?php // insert desired warning box at top of page

  if(isset($SITE['NWSalertsCodes']) and count($SITE['NWSalertsCodes']) > 0) {
   // Add nws-alerts alert box cache file
   include_once("nws-alerts-config.php");
   include($cacheFileDir.$aboxFileName);
   // Insert nws-alerts alert box
   echo $alertBox;
   ?>
<script type="text/javascript" src="nws-alertmap.js"></script>
<?php
  }
?>
to use the nws-alerts summary box instead.  If you have too many counties displayed there, you may need to reconsider how many counties/zones you want to display.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline roger kirk

  • Member
  • *
  • Posts: 7
  • Roger Kirk
    • Southeastern Kentucky Weather
Re: Top Warning Missing
« Reply #2 on: February 28, 2024, 11:25:47 AM »
Hello, I changed the setting you wanted me to, but that did not fix my issue. I still have a yellow blank warning box at the top of my page. Also, I cut back on my coverage area some. But being that we are located just 5 minutes from three different states it was a little tricky. Hope you can help. Thank you.
Roger Kirk
Southeastern Kentucky Weather
Middlesboro. Kentucky


Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Top Warning Missing
« Reply #3 on: February 28, 2024, 11:43:22 AM »
In your index.php, you still have the old code.  Look at wxindex.php to see how it looks with nws-alerts.php summarized.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline nagnal

  • Member
  • *
  • Posts: 10
Re: Top Warning Missing
« Reply #4 on: March 02, 2024, 12:43:24 PM »
Roger how did you fix this on your site? I am beating my brains up trying to figure this out.  -dan-   http://westsenecaweather.com/

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9298
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Top Warning Missing
« Reply #5 on: March 02, 2024, 12:50:13 PM »
Roger how did you fix this on your site? I am beating my brains up trying to figure this out.  -dan-   http://westsenecaweather.com/
Looking at http://westsenecaweather.com/check-fetch-times.php?show=versions shows you have many script updates to do (since 2015).
First thing is to do the updates, then modify your index.php page as I'd showed above.  The atom-top-warning and atom-advisory scripts are no longer functional due to NWS changes.. you must use the new nws-alerts script set to get/display the alerts.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline nagnal

  • Member
  • *
  • Posts: 10
Re: Top Warning Missing
« Reply #6 on: March 02, 2024, 01:21:06 PM »
Hmmm I got some work to do

Offline roger kirk

  • Member
  • *
  • Posts: 7
  • Roger Kirk
    • Southeastern Kentucky Weather
Re: Top Warning Missing
« Reply #7 on: April 08, 2024, 09:44:33 AM »
Sorry for not getting back to you but I have been sick. I looked at your site  http://westsenecaweather.com/ and you have a very nice looking weather page. SaratogaWX is an awesome help for everyone. Keep up the good work on your site.
Roger Kirk
Southeast Kentucky Weather
Roger Kirk
Southeastern Kentucky Weather
Middlesboro. Kentucky


Offline swright1957

  • Member
  • *
  • Posts: 49
    • Wakefield Way PWS
Re: Top Warning Missing
« Reply #8 on: April 09, 2024, 05:56:04 AM »
when i look at your site i get the errors..

"anything's possible with the weather"
www.hytheweather.co.uk/signaturebanner.gif

 

anything