They're free, but use at your own risk
The scripts referenced here are used in the operation of this weather station, and may be freely copied and used to support your station. Please note that you use these scripts at your own risk. No warranty is expressed or implied. I accept no liability for any damages that may ensue from their use.
You will need to configure them for your own particular weather station website.
A RSS Feed is available to help keep you informed on updates to the scripts.
Many of these scripts are now available on GitHub at https://github.com/ktrue
A Version History is available -- check back from time to time to see if there are updates to scripts you have downloaded earlier.
Announcements of version updates and new scripts are made on
WXForum.net and
Weather-Watch forums
and saratogaWXPHP Twitter account as they become available.
Note: Twitter widget has been disabled 3-Jul-2023 since it no longer displays the recent update Tweets.
This page was updated
Wednesday, 14-Aug-2024 7:35 AM
PHP/AJAX Website Template Set - Settings.php - Base-USA
The configuration for Settings.php discussed here is for the Base-USA Specific template set.
<?php
############################################################################
# Sitewide configuration - website style and features
############################################################################
$SITE['CSSscreen'] = 'weather-screen-blue-narrow.css'; // Default screen 800px design
// Note: $SITE['CSSscreen'] will be overridden if the Theme Switch (below) is enabled.
// To lock your site to use only one CSS as specified in $SITE['CSSscreen'], just
// turn off the Theme Switcher.
$SITE['CSSprint'] = 'weather-print-php.css';
#
#$SITE['CSSscreen'] = 'weather-screen.css'; // Classic design
#$SITE['CSSprint'] = 'weather-print.css';
# Mike Challis' Theme Switch configuration
$SITE['allowThemeSwitch'] = true; // set to false to disable the use of Theme Switcher
$SITE['CSSscreenDefault'] = 'weather-screen-blue.css'; // leave -narrow or -wide off this .. just change color here
$SITE['CSSwideOrNarrowDefault'] = 'narrow'; // 'narrow' or 'wide'
# CSSsettings_mode
# sets allowable user style select options:
# 1 user can select style and screen width (show style select and screen width select)
# 2 user can select styles only (hide screen width select)
# 3 user can select screen width only (hide style select)
$SITE['CSSsettings_mode'] = 1; // set to 1, 2 or 3
$SITE['flyoutmenu'] = true; // set to false to use the menu list inside menubar.php instead
$SITE['charset'] = 'ISO-8859-1'; // default character set for webpages (iso-8859-1=latin)
#
# Multilanguage support
#
$SITE['lang'] = 'en'; // default language for website to use
$SITE['allowLanguageSelect'] = false; // set to false to disable the use of language selector
$SITE['useLanguageFlags'] = true; // true=show flags, false=show language 2-char abbreviations
$SITE['languageSelectDropdown'] = true; // true=show dropdown list for languages, false=show linear flags list
$SITE['languageSelectButton'] = false; // true=show 'Set' button for language select, false=use onchange to submit
$SITE['langavail'] = array('en', // select languages to offer here. Use comments to remove languages
// array('en', should be first entry on line above
// other languages with the USA set can be enabled by installing language packs
// 'af', // afrikaans
// 'ct', // 'catalan',
// 'dk', // 'danish',
// 'nl', // 'dutch',
// 'fi', // 'finnish',
// 'fr', // 'french',
// 'de', // 'german',
// 'el', // 'greek',
// 'it', // 'italian',
// 'no', // 'norwegian',
// 'pl', // 'polish',
// 'pt', // 'portuguese',
// 'es', // 'spanish',
// 'se', // 'swedish',
);
// if your software uploads almanac dates using a language OTHER THAN English, please put the month
// names in your language to replace the English ones below. This is used primarily by the
// wxastronomy.php page for the local dates of moon phases, solistices, and equinoxes
$SITE['monthNames'] = array( // for wxastronomy page .. replace with month names in your language
'January','February','March','April','May','June',
'July','August','September','October','November','December'
);
// example:
//$SITE['monthNames'] = array( // Danish for wxastronomy page .. replace with month names in your language
//'januar','februar','marts','april','maj','juni',
//'juli','august','september','oktober','november','december'
//);
############################################################################
# Sitewide configuration - Station location, identity and date/time info
############################################################################
$SITE['organ'] = 'USA Website with PHP & AJAX';
$SITE['copyr'] = '© ' . date("Y",time()) . ', Your Weather Website';
$SITE['location'] = 'Somewhere, SomeState, USA';
$SITE['email'] = 'mailto:somebody@somemail.org';
# Station location: latitude, longitude, cityname
$SITE['latitude'] = '37.27153397'; //North=positive, South=negative decimal degrees
$SITE['longitude'] = '-122.02274323'; //East=positive, West=negative decimal degrees
$SITE['cityname'] = 'Saratoga';
$SITE['tz'] = 'America/Los_Angeles'; //NOTE: this *MUST* be set correctly to
// translate UTC times to your LOCAL time for the displays.
// http://us.php.net/manual/en/timezones.php has the list of timezone names
// pick the one that is closest to your location and put in $SITE['tz'] like:
// $SITE['tz'] = 'America/Los_Angeles'; // or
// $SITE['tz'] = 'Europe/Brussels';
// note: date format used for PHP parts only. Weather software dates are not processed
// except on the astronomy page
$SITE['timeFormat'] = 'D, d-M-Y g:ia T'; // Day, 31-Mar-2006 6:35pm Tz (USA Style)
//$SITE['timeFormat'] = 'm/d/Y g:ia'; // USA format 03/31/2006 14:03
//$SITE['timeFormat'] = 'd/m/Y H:i'; // Euro format 31/03/2006 14:03
//$SITE['timeFormat'] = 'Y-m-d H:i'; // ISO format 2006-03-31 14:03
$SITE['timeOnlyFormat'] = 'g:ia'; // USA format h:mm[am|pm\
//$SITE['timeOnlyFormat'] = 'H:i'; // Euro format hh:mm (hh=00..23);
$SITE['dateOnlyFormat'] = 'd-M-Y'; // for 31-Mar-2008 or 'j/n/Y' for Euro format
############################################################################
# Sitewide configuration - support scripts configuration
############################################################################
###########################################################################
# These values should reflect the units-of-measure your weather station
# uses to report the weather data when processing weather tags.
# Note: if you change them here, make sure to make the corresponding
# changes in the ajax[WXname]wx.js AJAX script also.
###########################################################################
$SITE['WDdateMDY'] = true; // for WD date format of month/day/year. =false for day/month/year
$SITE['uomTemp'] = '°F'; // ='°C', ='°F'
$SITE['uomBaro'] = ' inHg'; // =' hPa', =' mb', =' inHg'
$SITE['uomWind'] = ' mph'; // =' km/h', =' kts', =' m/s', =' mph'
$SITE['uomRain'] = ' in'; // =' mm', =' in'
$SITE['uomSnow'] = ' in'; // =' cm', =' in'
$SITE['uomDistance'] = ' miles'; // or ' km' -- used for Wind Run display
$SITE['uomPerHour'] = '/hr';
//
$SITE['imagesDir'] = './ajax-images/'; // directory for ajax-images with trailing slash
//
$SITE['cacheFileDir'] = './cache/'; // directory to use for scripts cache files .. use './' for doc.root.dir
//
$SITE['UVscript'] = 'get-UV-forecast-inc.php'; // worldwide forecast script for UV Index
// comment out above line to exclude UV forecast from dashboard, gizmo and wxuvforecast.php page
//
// if you have WXSIM installed set $SITE['WXSIM'] = true; otherwise set it to false
$SITE['WXSIM'] = false; // Set to false if you have not installed WXSIM
$SITE['WXSIMscript'] = 'plaintext-parser.php'; // script for decoding plaintext.txt into icons
$SITE['defaultlang'] = 'en'; // 'en' for English (WXSIM plaintext-parser.php)
# fcsturlNWS is the point-printable forecast URL from http://www.weather.gov/ (used by advforecast2.php)
$SITE['fcsturlNWS'] = 'http://www.wrh.noaa.gov/forecast/MapClick.php?site=mtr&smap=1&textField1=37.26389&textField2=-122.02194&TextType=2';
$SITE['fcsticonsdir'] = './forecast/images/'; // NOAA-style icons for NWS, WU, WXSIM forecast scripts
$SITE['fcsticonstype']= '.jpg'; // default type='.jpg' -- use '.gif' for animated icons from http://www.meteotreviglio.com/
//
// in the following section, enable settings for ONE primary forecast organization
// pick which script AND org are to be used for your forecast here: (last uncommented pair will
// be the ones used on the wxforecast.php page and in your dashboard and sidebar
$SITE['fcstscript'] = 'advforecast2.php'; // USA-only NWS Forecast script
$SITE['fcstorg'] = 'NWS'; // set to 'NWS' for NOAA NWS
// Optional multi-city/zone forecast specification for advforecast2.php
$SITE['NWSforecasts'] = array( // for the advforecast2.php V3.xx version script
// use "Zone|Location|Point-printableURL", as entries .. first one will be the default forecast.
"CAZ513|Saratoga|http://forecast.weather.gov/MapClick.php?CityName=Saratoga&state=CA&site=MTR&textField1=37.2639&textField2=-122.022&e=1&TextType=2",
"CAZ513|Los Gatos|http://forecast.weather.gov/MapClick.php?CityName=Los+Gatos&state=CA&site=MTR&textField1=37.2267&textField2=-121.974&e=0&TextType=2",
"CAZ513|Cupertino|http://forecast.weather.gov/MapClick.php?CityName=Cupertino&state=CA&site=MTR&textField1=37.3231&textField2=-122.031&e=0&TextType=2",
"CAZ513|Sunnyvale|http://forecast.weather.gov/MapClick.php?CityName=Sunnyvale&state=CA&site=MTR&textField1=37.3689&textField2=-122.035&e=0&TextType=2",
"CAZ513|Santa Clara|http://forecast.weather.gov/MapClick.php?CityName=Santa+Clara&state=CA&site=MTR&textField1=37.3542&textField2=-121.954&e=0&TextType=2",
"CAZ513|San Jose|http://forecast.weather.gov/MapClick.php?CityName=San+Jose&state=CA&site=MTR&textField1=37.3394&textField2=-121.894&e=0&TextType=2",
"CAZ508|Mountain View|http://forecast.weather.gov/MapClick.php?CityName=Mountain+View&state=CA&site=MTR&textField1=37.3861&textField2=-122.083&TextType=2",
"CAZ529|Santa Cruz|http://forecast.weather.gov/MapClick.php?CityName=Santa+Cruz&state=CA&site=MTR&textField1=36.9742&textField2=-122.03&e=0&TextType=2",
"CAZ006|San Francisco|http://forecast.weather.gov/MapClick.php?CityName=San+Francisco&state=CA&site=MTR&textField1=37.775&textField2=-122.418&e=0&TextType=2",
);
// */
// Uncomment the two lines below to use WXSIM as the ONLY forecast script to use
// $SITE['fcstscript'] = 'plaintext-parser.php'; // WXSIM forecast (if only forecast script)
// $SITE['fcstorg'] = 'WXSIM'; // set to 'WXSIM' for WXSIM forecast
// NOAA warning zone
$SITE['noaazone'] = 'CAZ513'; // used for NOAA advisories and advforecast2.php 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
//
// Radar settings
$SITE['noaaradar'] = 'MUX'; // LAST 3 characters of NOAA Radar Site ID
// e.g. Radar KMUX has $SITE['noaaradar'] = 'MUX';
$SITE['WUregion'] = 'sw'; // Wunderground regional maps
// 'sw'=SouthWest, 'nw'=NorthWest, 'mw'=Midwest
// 'sp'=South Central, 'ne'=North East, 'se'=South East
$SITE['NWSregion'] = 'sw'; // NOAA/NWS regional radar maps
// 'ak' = Alaska,
// 'nw' = Northwest, 'nr' = Northern Rockies, 'nm' = North Mississippi Valley,
// 'nc' = Central Great Lakes, 'ne' = Northeast,
// 'hi' = Hawaii,
// 'sw' = Southwest, 'sr' = Southern Rockies, 'sc' = Southern Plains,
// 'sm' = South Mississippi Valley, 'se' = Southeast
$SITE['WUsatellite'] = 'sw'; // Wunderground regional satellite maps
// ="nw" North West, ="nc" North Central, ="ne" North East,
// ="wc" West Central, ="ce" Central, ="ec" East Central,
// ="sw" South West, ="sc" South Central, ="se" South East,
// GRLevel3 Radar image settings (for wxgr3radar.php and radar-status.php scripts
$SITE['GR3radar'] = 'kmux'; // set to lower-case full name of NEXRAD radar site
$SITE['GR3DIR'] = '/GR3'; // set to directory for GRLevel3 images (or '.' for root directory
$SITE['GR3type'] = 'cr'; // radar image type 'cr','br','cr248','br1' etc.
$SITE['GR3img'] = 'jpg'; // GR3 image type 'jpg' or 'png'
$SITE['GR3cnt'] = 10; // number of images in series 10=(_0 ... _9 in name of file)
$SITE['GR3width'] = 512; // width of GR3 images
$SITE['GR3height'] = 512; // height of GR3 images
$SITE['showradarstatus'] = true; // set to false to suppress 'active' message by radar-status.php
##########################################################################
# end of configurable settings
##########################################################################
?>
Sitewide configuration - website style and features
- $SITE['CSSscreen'] = 'weather-screen-blue-narrow.css';
$SITE['CSSprint'] = 'weather-print-php.css';
- These settings control which CSS files are to be used for both the screen and print formats.
You may use your own customized version of the Carterlake CSS if you include the unique
CSS settings for the ajax-dashboard/ajax-gizmo in your copy of the CSS.
Note: $SITE['CSSscreen'] will be overridden if the Theme Switch (below) is enabled.
To lock your site to use only one CSS as specified in $SITE['CSSscreen'], just turn off the Theme Switcher.
- $SITE['allowThemeSwitch'] = true;
- This setting controls the use of Mike Challis' Theme Changer. If set to true, then the Theme Changer is enabled and browsers can pick among the color schemes and wide/narrow format.
If set to false, then the Theme Changer is disabled, and the screen style chosen in
$SITE['CSSscreen'] is enforced throughout the website.
- $SITE['CSSscreenDefault'] = 'weather-screen-orange.css';
$SITE['CSSwideOrNarrowDefault'] = 'narrow';
- These settings control the default (first time browsed) look for your website when
$SITE['allowThemeSwitch'] = true; As distributed, the Orange, Narrow screen is the default.
$SITE['CSSscreenDefault'] should be set to 'weather-screen-[color].css' where [color] is
'blue','orange','green','red','teal','silver'
$SITE['CSSwideOrNarrowDefault'] should be set to either 'wide' or 'narrow'
- $SITE['flyoutmenu'] = true;
- This setting controls the function of the menu system (New with V1.14).
If $SITE['flyoutmenu'] = true; then the flyout-menu system will be used.
If $SITE['flyoutmenu'] = false; then the menubar.php menu system will be used.
- $SITE['charset'] = 'ISO-8859-1';
- This setting specifies the character set the webpage uses. The default is the Latin set.
- $SITE['lang']
- This setting controls the default language to be presented from among the choices in $SITE['langavail'].
The default is 'en' (English).
- $SITE['allowLanguageSelect']
- This setting controls the viewer's ability to change languages.
= true allows the changes,
= false denies the ability to change from the $SITE['lang'] setting below.
- $SITE['useLanguageFlags']
- This setting controls the display of country flags representing the languages available.
= true shows the flags,
= false will show the two-letter country/language designator instead.
- $SITE['languageSelectDropdown'] = true;
- This setting controls whether to show the dropdown list for language selection.
= true shows dropdown list for languages
= false shows linear flags list or language name abbreviations based on $SITE['useLanguageFlags'] above.
- $SITE['languageSelectButton'] = false;
- This setting determines whether to show a 'Set' button for the dropdown language select list.
= true show 'Set' button for language select dropdown list
= false allows the JavaScript 'onchange' event to do a submit when the selection changes in the language dropdown list.
- $SITE['langavail']
- This setting enables which language translations are to be offered. For each language offered, five files are needed in the website (LL is the language translation identifier):
language-LL.txt - primary translation file
language-LL.js - translation file for the AJAX JavaScript (ajax[WXsftw]wx.js)
ajax-images/flag-LL.gif - flag image for the language
wxabout-LL.html - About page in language LL
plaintext-parser-lang-LL.txt - translation file for the WXSIM forecast (needed if WXSIM is used)
To enable a language, just add the 2-character language code into the array. To remove languages, simply comment out the entry for that language with '//' in the first two columns.
- $SITE['monthNames'] = array(
'January','February','March','April','May','June',
'July','August','September','October','November','December'
);
- This setting is used by the wxastronomy.php page to parse the lunar/solar dates from Weather-Display.
If your dates on the wxastronomy.php appear correct, there is no need to use this setting.
If the dates are shown in a language other than English, then use this setting to specify the names of the months in your language.
For example, a French specification would appear as:
$SITE['monthNames'] = array(
"janvier","février","mars","avril","mai","juin",
"juillet","août","septembre","octobre","novembre","décembre"
);
Sitewide configuration - Station location, identity and date/time
- $SITE['organ'] = 'USA Weather Website with PHP & AJAX';
- This specifies the text to use in the Heading area on all pages in the website.
- $SITE['copyr'] = '© ' . date("Y",time()) . ', Your Weather Website';
- This specifies the Copyright information used in the footer area on all pages in the website. Note that the code shown will automatically display the current year in the copyright notice.
- $SITE['location'] = 'Somewhere,Some State, USA';
- This specifies the small subheader on the left of the heading area .. use it to identify your city, state/provence, country.
- $SITE['email'] = 'mailto:somebody@somemail.org';
- Put the email address you'd like for folks to contact you. This link appears in the footer area on each page.
- $SITE['latitude'] = '37.27153397';
$SITE['longitude'] = '-122.02274323';
- Set your station location (latitude and longitude) in decimal degrees. Positive numbers for North Latitude and East Longitude. Negative numbers for South Latitude and West Longitude. Sample above is for Saratoga, CA, USA.
- $SITE['cityname'] = 'Saratoga';
- Set your city/town name here.
- $SITE['tz'] = 'America/Los_Angeles';
- This setting specifies the time zone for your weather station.
It's very important to get this correctly specified as many webservers don't run with the same local
time as your website.
Use http://us.php.net/manual/en/timezones.php for timezone names to use based on your locale.
Pick the one that is closest to your location and put in $SITE['tz'] like:
$SITE['tz'] = 'Pacific/Auckland'; or
$SITE['tz'] = 'Europe/Brussels';
- $SITE['timeFormat'] = 'D, d-M-Y g:ia T';
- This specifies how to display the long-format date/time on the PHP pages. It is used in a PHP date(); statement to format date/time for display. See the allowed format parameters here.
Use $SITE['timeFormat'] = 'm/d/Y g:ia'; for USA format 03/31/2006 2:03pm
Use $SITE['timeFormat'] = 'd/m/Y H:i'; for Euro format 31/03/2006 14:03
Use $SITE['timeFormat'] = 'Y-m-d H:i'; for ISO format 2006-03-31 14:03
Note: the weather software internal dates on weather variables included via the tags file are NOT processed
-- they remain in the format specified with your weather software setup.
- $SITE['timeOnlyFormat'] = 'g:ia';
- This specifies how time (without date) is to be formatted on the PHP pages.
Use $SITE['timeOnlyFormat'] = 'H:i'; for European 24hr time.
Note: the weather software internal times on weather variables included via the tags are NOT processed --
they remain in the format specified with your weather software setup.
- $SITE['dateOnlyFormat'] = 'd-M-Y';
- This specifies how date (without time) is to be formatted on the wxtrends.php page.
Note: make sure the $SITE['WDdateMDY'] variable is set correctly otherwise some strange dates will appear on your wxtrends.php page.
Sitewide configuration - support scripts configuration
- $SITE['WDdateMDY'] = false';
- This specifies how your weather software is set for internal date format.
Use $SITE['WDdateMDY'] = true'; for weather software internal dates in month/day/year format. (Base-USA)
Use $SITE['WDdateMDY'] = false'; for weather software internal dates in day/month/year format. (Base-Canada, Base-World)
- $SITE['uomTemp'] = '°F';
$SITE['uomBaro'] = ' inHg';
$SITE['uomWind'] = ' mph';
$SITE['uomRain'] = ' in';
$SITE['uomSnow'] = ' in';
$SITE['uomDistance'] = ' miles';
$SITE['uomPerHour'] = '/hr';
- Configure these settings to display the correct text on the ajax-dashboard and ajax-gizmo for your particular units of measure for your website.
They should match units with what your weather software uploads in the [WXsftw]tags.php file.
These settings are used for the PHP display of the page.
The AJAX-enabled contents will overwrite the displays on the dashboard and gizmo
with units determined by the ajax[WXsftw]wx.js script settings.
- $SITE['imagesDir'] = './ajax-images/';
- This specifies the relative FILE location for the images used by the ajax-dashboard, ajax-gizmo and several other scripts in the package. It contains the current conditions icons as well.
Weather-Display plugin only: the ajaxWDwx.js script should have the same location specified.
- $SITE['cacheFileDir'] = './cache/';
- // directory to use for scripts cache files .. use './' for doc.root.dir
- $SITE['UVscript'] = 'get-UV-forecast-inc.php';
- This variable specifies the script to get the UV forecast for your area. The default setting shown uses your specified latitude and longitude to obtain the UV forecast from KNMI/EMA at www.temis.nl -- this value is used in the ajax-dashboard to display a UV forecast in lieu of a Solar and/or UV sensor on your station.
- $SITE['WXSIM'] = true;
$SITE['WXSIMscript'] = 'plaintext-parser.php';
- If you have WXSIM operating on your website, this specifies the formatting script to use.
Set
$SITE['WXSIM'] = false; if you aren't using WXSIM.
- $SITE['defaultlang'] = 'en';
- This setting specifies the default language to use for the WXSIM plaintext-parser.php. Please ensure you have the appropriate language plugin file (plaintext-parser-lang-XX.txt) in the same directory as plaintext-parser.php in order to engage this feature. You may also have to change the $SITE['charset'] setting if your language file is not using iso-8859-1 Latin character set.
- $SITE['fcsturlNWS'] = 'http://www.wrh.noaa.gov/forecast/MapClick.php?site=mtr&smap=1&textField1=37.26389&textField2=-122.02194&TextType=2';
- This setting specifies the URL to your NWS Point-printable forecast. It is used by the advforecast2.php to extract forecast icons/text from the NWS forecast which is displayed in the ajax-dashboard, ajax-sidebar, and on the wxforecast.php page.
- $SITE['fcsticonsdir'] = './forecast/images/';
- This setting specifies the relative FILE location for the NOAA icon images. These images are also used by the WXSIM forecast via plaintext-parser.php
- $SITE['fcsticonstype'] = '.jpg';
- This specifies the file type of the icon set used by the forecast scripts ( advforecast2.php, WXSIM plaintext-parser.php)
='.jpg'; default - use the NOAA photo-style Saratoga icons.
='.gif'; setting if you have installed the animated forecast icons from www.meteotreviglio.com
- $SITE['fcstscript'] = 'advforecast2.php';
$SITE['fcstorg'] = 'NWS';
- This pair of settings indicates the NWS forecast is to be used for icons/text in the ajax-dashboard, ajax-sidebar and on the wxforecast.php page. Optionally, you can use WXSIM for the forecast source by setting
$SITE['fcstscript'] = 'plaintext-parser.php'; and
$SITE['fcstorg'] = 'WXSIM';
This will cause the WXSIM forecast icons to appear in the ajax-dashboard and WXSIM forecast to be used on the wxforecast.php page.
- $SITE['NWSforecasts'] = array( );
- This optional setting allows advforecast2.php to display forecasts for multiple cities/zones with a drop-down selection box
The format for the entries is:
"Zone|Location|Point-printableURL" with the first entry used as the default
Sample:
$SITE['NWSforecasts'] = array(
"CAZ513|Saratoga|http://forecast.weather.gov/MapClick.php?CityName=Saratoga&state=CA&site=MTR&textField1=37.2639&textField2=-122.022&e=1&TextType=2",
"CAZ513|Los Gatos|http://forecast.weather.gov/MapClick.php?CityName=Los+Gatos&state=CA&site=MTR&textField1=37.2267&textField2=-121.974&e=0&TextType=2",
"CAZ513|Cupertino|http://forecast.weather.gov/MapClick.php?CityName=Cupertino&state=CA&site=MTR&textField1=37.3231&textField2=-122.031&e=0&TextType=2",
);
Tip: use NWS-info-map to quickly locate your desired forecast points and get copycode to put in the $SITE['NWSforecasts'] array.
- $SITE['noaazone'] = 'CAZ513';
- This setting specifies the NOAA warning zone (do not use a County zone). This setting is used by the advforecast2.php forecast script for Zone forecasts (failover) for wxforecast.php page.
- $SITE['hurlURL'] = "wxadvisory.php";
- This setting specifies the page to be launched for more details when an advisory is present. It is used by
atom-advisory.php and atom-top-warning.php scripts, and the wxindex.php, wxforecast.php and wxadvisory.php pages.
- $SITE['NWSalertsCodes'] = array();
- This setting specifies the NWS Warning Zone/County Zones to use with the nws-alerts scripts available in V3.105 28-Jun-2012 Base-USA distribution thanks to Curly of Michiana Weather for his kind permission to include this function in the template distribution.
The format is "Location|ZoneCode|CountyCode[|CountyCode]..." as shown below. If you specify more than 4 unique Zone/County codes, and are NOT using cron to pre-fetch the data, a message will appear above the main page to remind you to set up cron to improve your page load speed.
Note: additional/optional nws-alerts configuration is in nws-alerts-config.php file and this $SITE['NWSalertsCodes'] setting will override what you specify in nws-alerts-config.php file for $myZC = array(...); when using the template.
Presence of 1 or more values in this setting will automatically switch your template from using atom-advisory.php or atom-top-warning.php for wxindex.php, wxadvisory.php to use the nws-alerts instead for the displays.
Change nws-alerts-config.php internal setting to $noCron = false; if you are using cron to run the nws-alerts.php script.
Sample:
$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"
);
Tip: use NWS-info-map to quickly locate your desired forecast points and get copycode to put in the $SITE['NWSalertsCodes'] array.
- $SITE['NWSalertsSidebar'] = true;
- This setting controls the appearance of the summary NWS alerts from the nws-alerts scripts in the menubar.php display.
= true; (default) includes the summary NWS alerts in the menubar.php display under the External Links section.
= false; to not include the summary NWS alerts in the menubar.php display.
Note: this setting available in V3.105 28-Jun-2012 Base-USA distribution and later.
- $SITE['noaaradar'] = 'MUX';
- This setting specifies the UPPERCASE LAST three characters of the NEXRAD radar ICAO (name). It is used by the
WU-radar-inc.php and wxnwsradar.php scripts to specify the primary radar site. This setting overrides what is specified within scripts.
- $SITE['WUregion'] = 'sw';
- This setting specifies the Weather Underground 'region' for use with WU-radar-inc.php for the wxradar.php page.
This setting overrides what is specified within the WU-radar-inc.php script.
- $SITE['NWSregion'] = 'sw';
- This setting specifies the NWS 'region' for use with regional map displays on the wxindex.php
home page.
- $SITE['WUsatellite'] = 'sw';
- This setting specifies the WU 'region' for use with regional map displays on the wxindex.php
home page.
- $SITE['GR3radar'] = 'kmux';
- Even if you don't have GRLevel3 installed, set this to the lowercase ICAO (name) of your NOAA Nexrad radar site.
It is used by the radar-status.php script to select the radar site to monitor.
- $SITE['GR3DIR'] = '/GR3';
$SITE['GR3type'] = 'cr';
$SITE['GR3img'] = 'jpg';
$SITE['GR3cnt'] = 10;
$SITE['GR3width'] = 512;
$SITE['GR3height'] = 512;
- These settings control the wxgr3radar.php page for generation and display of GRLevel3 radar.
If you don't have GRLevel3 software, you can remove the wxgr3radar.php page from
the menubar.php links and not be concerned about setting up this optional page.
- $SITE['showradarstatus'] = true;
- This setting specifies the action that the radar-status.php script uses when displaying
the status of your NEXRAD radar on the wxradar.php and wxgr3radar.php pages.
The default is to show the status box even when the radar is active.
Set $SITE['showradarstatus'] =false; to show the radar status box only when there is a
problem with the radar site.
NOTE: When you have finished with these settings here, you also need to use this link for instructions to customize the WU-radar-inc.php script to display the Metro and City level radar images, and position the 'red dot' over the location of your station in the nine maps. All that configuration is done by changing WU-radar-inc.php, and only the $SITE['noaaradar'] and $SITE['WUregion'] values here override what is in the WU-radar-inc.php script.