Author Topic: Advisory & Warning Issue  (Read 913 times)

0 Members and 1 Guest are viewing this topic.

Offline Jumpin Joe

  • Forecaster
  • *****
  • Posts: 1073
    • Joe’s Weather
Advisory & Warning Issue
« on: September 28, 2018, 07:20:45 AM »
On my site right now as I post, at the top the "No watches, Warnings or Advisories" is displayed all the time and on the left side in my Navigation Pane Alerts, alerts are showing, which is accurate anyone know why this is??????
Thanks,
Joe

https://joesweather.info
« Last Edit: October 05, 2018, 04:23:34 PM by Jumpin Joe »
https://joesweather.info
Davis Vantage Pro 2 Plus 24-FARS Wireless
WeatherLink Live

Offline Jumpin Joe

  • Forecaster
  • *****
  • Posts: 1073
    • Joe’s Weather
Re: Advisory & Warning Issue
« Reply #1 on: October 05, 2018, 04:26:07 PM »
Right now on my site the issue is present.... anyone know why this is happening?

Thanks,
Joe

https://joesweather.info
https://joesweather.info
Davis Vantage Pro 2 Plus 24-FARS Wireless
WeatherLink Live

Offline miraculon

  • Sunrise Side Weather
  • Forecaster
  • *****
  • Posts: 4107
  • KE8DAF
    • Sunrise Side Weather in Rogers City MI USA
Re: Advisory & Warning Issue
« Reply #2 on: October 05, 2018, 05:06:52 PM »
Your https://joesweather.info/wxadvisory.php page looks OK as well. BTW, your county names are kind of hidden until you float over them.

I am not 100% sure about this, but I believe that the "atom-top-warning.php" file might control that banner. Maybe Ken can confirm.

According to your https://joesweather.info/atom-top-warning.php?sce=view your county code seems OK.

Code: [Select]
//------------------------------------------------------------------
// begin settings
//------------------------------------------------------------------
*/

//  change $myDefaultZone default(below) to your station's county zone
//  other settings are outlined below, and are optional
$myDefaultZone = 'OHZ070'; // change this to your zone

OHZ070 is what NWS shows for Butler County per https://alerts.weather.gov/cap/wwaatmget.php?x=OHZ070&y=1.

I can't tell what the problem might be, sorry.

Greg H.


Blitzortung Stations #706 and #1682
CoCoRaHS: MI-PI-1
CWOP: CW4114 and KE8DAF-13
WU: KMIROGER7
Amateur Radio Callsign: KE8DAF

Offline Jumpin Joe

  • Forecaster
  • *****
  • Posts: 1073
    • Joe’s Weather
Re: Advisory & Warning Issue
« Reply #3 on: October 05, 2018, 06:24:08 PM »
Thank you for checking, Greg. Hopefully, Ken can pinpoint it.

The county name issue has been there for years.... don’t know how to correct that either.

Joe
https://joesweather.info
Davis Vantage Pro 2 Plus 24-FARS Wireless
WeatherLink Live

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Advisory & Warning Issue
« Reply #4 on: October 05, 2018, 11:20:23 PM »
Do you have this code in your index.php
Code: [Select]
<div id="main-copy">
   
<?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
  
  } else { 
// use atom scripts of choice
if ($useTopWarning) {
  include_once("atom-top-warning.php");
} else {
 print "      <div class=\"advisoryBox\">\n";
 $_REQUEST['inc'] = 'y';
 $_REQUEST['summary'] = 'Y';
 include_once("atom-advisory.php");
 print "      </div>\n";
}
  }
?>

  If so, then the nws-alerts.php is what creates the displays for the top box, sidebar box and the wxadvisory.php page, and they should be consistent.  The old atom-advisory and atom-top-warning scripts are not used with the Base-USA template when nws-alerts is installed/configured.

When I use ?mu=1 to force nws-alerts to reload on the view-source of your index page, I see
Quote
<!-- nws-alerts noCron=true .. running nws-alerts.php inline -->
<!-- nws-alerts.php - V1.42 - 27-Jan-2018 -->
<!-- 4 unique Zone entries found. Zones='OHZ070,OHC017,OHC061,OHC165' -->
<!-- cache age 93 seconds - no fetch needed -->
<!-- manual update of cache requested -->
<!-- Cron job not used -->
<!-- XML source: https://alerts.weather.gov/cap/wwaatmget.php?x=OHZ070&y=1 -->
<!-- HTTP stats:  RC=200 dest=104.91.32.186 port=443 (from sce=192.252.149.25)
      Times: dns=0.028 conn=0.037 pxfer=0.077 get=0.463 total=0.541 secs -->
<!-- XML source: https://alerts.weather.gov/cap/wwaatmget.php?x=OHC017&y=1 -->
<!-- HTTP stats:  RC=200 dest=104.91.32.186 port=443 (from sce=192.252.149.25)
      Times: dns=0.000 conn=0.009 pxfer=0.054 get=0.112 total=0.167 secs -->
<!-- XML source: https://alerts.weather.gov/cap/wwaatmget.php?x=OHC061&y=1 -->
<!-- HTTP stats:  RC=200 dest=104.91.32.186 port=443 (from sce=192.252.149.25)
      Times: dns=0.000 conn=0.009 pxfer=0.046 get=0.101 total=0.147 secs -->
<!-- XML source: https://alerts.weather.gov/cap/wwaatmget.php?x=OHC165&y=1 -->
<!-- HTTP stats:  RC=200 dest=104.91.32.186 port=443 (from sce=192.252.149.25)
      Times: dns=0.000 conn=0.009 pxfer=0.047 get=0.120 total=0.167 secs -->
<!-- Cache file updated: Fri 10-5-2018 11:12 pm -->
<!-- Icon data file updated -->
<!-- Total process time: 1.0392 seconds -->
indicating that OZH070 zone is loading correctly.

Looking at nws-alerts-config.php?sce=view shows several things that likely need changing:

$useAlertBox   = false;         // true=use alert box & write data file   false= not using alert box & don't write file
should be
$useAlertBox   = true;         // true=use alert box & write data file   false= not using alert box & don't write file

and
$shoNone       = false;         // true=show one 'NONE' if no alerts for all location   false=don't show one 'NONE' if no alerts for all location
should be
$shoNone       = true;         // true=show one 'NONE' if no alerts for all location   false=don't show one 'NONE' if no alerts for all location

to get the NONE icons to display in the sidebar for no alerts, and for the alertbox text to be created
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 Jumpin Joe

  • Forecaster
  • *****
  • Posts: 1073
    • Joe’s Weather
Re: Advisory & Warning Issue
« Reply #5 on: October 08, 2018, 10:06:16 AM »
I do have that code and I made the changes you suggested in the nws-alerts-config.php script.  Thank you!

Can you tell me what I need to do to correct the issue with not being able to see the "External Links" and the "Alerts" in the Navagition pane on the left without hovering over them?

Thanks again,

Joe
https://joesweather.info
Davis Vantage Pro 2 Plus 24-FARS Wireless
WeatherLink Live

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Advisory & Warning Issue
« Reply #6 on: October 08, 2018, 04:26:46 PM »
Hmmm... In header.php, you have
Code: [Select]
<!--<h1 class="headerTitle">--> which shouldn't be commented out.  It should be
Code: [Select]
<h1 class="headerTitle"> to remove one HTML errata later on the page.

You also seem to be missing a </div> in header.php at the end. 
Code: [Select]
</div>
<!-- end of header -->
Both of those can cause page formatting errors.

In nws-alerts-config.php you have
Code: [Select]
$addNone       = false;        // true=add NONE foreach location with no alerts        false= don't show any NONE
$shoNone       = false;         // true=show one 'NONE' if no alerts for all location   false=don't show one 'NONE' if no alerts for all location
and that should be
Code: [Select]
$addNone       = true;        // true=add NONE foreach location with no alerts        false= don't show any NONE
$shoNone       = true;         // true=show one 'NONE' if no alerts for all location   false=don't show one 'NONE' if no alerts for all location
to show the 'NONE' icons if no alerts are available.
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 Jumpin Joe

  • Forecaster
  • *****
  • Posts: 1073
    • Joe’s Weather
Re: Advisory & Warning Issue
« Reply #7 on: October 08, 2018, 07:10:57 PM »
Fantastic!
Looks great now.

Thank you.
https://joesweather.info
Davis Vantage Pro 2 Plus 24-FARS Wireless
WeatherLink Live