Author Topic: Weather Advisory  (Read 901 times)

0 Members and 1 Guest are viewing this topic.

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1314
  • BismarckWeather.net
    • BismarckWeather.net
Weather Advisory
« on: February 24, 2017, 02:32:54 PM »
Trying to implement the Saratoga scripts and Cumulus.  I'm down to the last bug.  Then VWS can be on its way out the door.

Anyone know where this is configured?  I don't live in Cali, BTW.  I need to adjust to my regional 2 counties.

http://beta.bismarckweather.net/wxadvisory.php
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Weather Advisory
« Reply #1 on: February 24, 2017, 02:35:35 PM »
In Settings.php
Code: [Select]
// NOAA warning zone
$SITE['noaazone'] = 'CAZ513'; // used for NOAA advisories and advforecast2.php zone forecasts
$SITE['hurlURL'] = "wxadvisory.php"; // page to launch for details on NOAA advisories
//

// NWS Alerts package configuration (for Curly's nws-alerts scripts)
// "Location|ZoneCode|CountyCode[|CountyCode]..."
// Note: if more than 4 zone/county codes are used, a message will appear if you are NOT using
//    cron to provide updates.
// Note: additional/optional nws-alerts configuration is in nws-alerts-config.php file
$SITE['NWSalertsCodes'] = array(
  "Santa Clara Valley|CAZ513|CAC085",
//  "Santa Cruz Mtns|CAZ512|CAC081|CAC085|CAC087",
  "Santa Cruz|CAZ529|CAC087",
//  "Monterey|CAZ530|CAC053",
//  "South/East Bay|CAZ508|CAC081",
//  "San Mateo Coast|CAZ509|CAC081",
//  "San Francisco|CAZ006|CAC075"
);
$SITE['NWSalertsSidebar'] = true; // =true to insert in menubar, =false no insert to menubar
//
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 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1314
  • BismarckWeather.net
    • BismarckWeather.net
Re: Weather Advisory
« Reply #2 on: February 24, 2017, 02:44:45 PM »
I have mine set to this:  Is something caching?

// NOAA warning zone
$SITE['noaazone']       = 'NDZ035'; // used for NOAA advisories and advforecast2.php zone forecasts
$SITE['hurlURL']      = "wxadvisory.php"; // page to launch for details on NOAA advisories
//

// NWS Alerts package configuration (for Curly's nws-alerts scripts)
// "Location|ZoneCode|CountyCode[|CountyCode]..."
// Note: if more than 4 zone/county codes are used, a message will appear if you are NOT using
//    cron to provide updates.
// Note: additional/optional nws-alerts configuration is in nws-alerts-config.php file
$SITE['NWSalertsCodes'] = array(
  "Bismarck|NDZ035|NDC015",
  "Mandan|NDZ034|NDC059",
);
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Weather Advisory
« Reply #3 on: February 24, 2017, 03:20:31 PM »
That looks fine.  If you don't have a cron job set to run nws-alerts.php on a schedule, then make sure that nws-alerts-config.php has
Code: [Select]
$noCron        = true;                     // true=not using cron, update data when cache file expires   false=use cron to update data
so the nws-alerts.php will run and fetch new data as needed when any wx...php page is loaded in your site.
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 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1314
  • BismarckWeather.net
    • BismarckWeather.net
Re: Weather Advisory
« Reply #4 on: February 24, 2017, 03:38:06 PM »
Perfect!  Thanks for all your help.  I really appreciate it.

As long as I have your attention, I put this into my footer.php for Google Analytics.  Is this the best place?  Another file maybe better?

     <?php include_once("analyticstracking.php") ?>
     </div>
    </div><!-- end id="footer" -->
  </div><!-- end id="page" wrapper -->
  </body>
</html>
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9279
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: Weather Advisory
« Reply #5 on: February 24, 2017, 04:31:55 PM »
Sure.. the top.php, header.php, menubar.php and footer.php are all included in every wx...php page, so the footer.php is a fine place to put it.

Put things that are needed in the <head> section of each page in top.php
Put things that are needed in the <body> section of each page in header.php, menubar.php or footer.php depending on where you want to place the item on the resulting page.

See: http://saratoga-weather.org/wxtemplates/construction.php for a description of how the template set works.
« Last Edit: February 24, 2017, 04:35:47 PM by saratogaWX »
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 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1314
  • BismarckWeather.net
    • BismarckWeather.net
Re: Weather Advisory
« Reply #6 on: February 24, 2017, 04:40:19 PM »
Perfect.  I hadn't seen that page.  That will help a lot.
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1314
  • BismarckWeather.net
    • BismarckWeather.net
Re: Weather Advisory
« Reply #7 on: February 25, 2017, 12:15:25 AM »
Is there anyway to increase timer before the page prompts you to reload?
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI

Offline 92merc

  • BismarckWeather.net
  • Forecaster
  • *****
  • Posts: 1314
  • BismarckWeather.net
    • BismarckWeather.net
Re: Weather Advisory
« Reply #8 on: February 25, 2017, 12:30:02 AM »
I was able to find var maxupdates = 0; in the ajaxCUwx.js.  I set it accordingly.  Thanks!
https://www.BismarckWeather.net
Davis VP2, Cumulus, WeatherDisplay, Blitzortung, Saratoga Scripts, NOAA Stream via PI