deformed-offering

Free Weather Website Templates

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.
RSS feed for Scripts Updates A RSS Feed is available to help keep you informed on updates to the scripts.

If you find one or more of the scripts useful to you, please consider making a donation to help offset the routine expenses of operation of this website.
Thanks for your kind support!

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.

This page was updated Wednesday, 02-Sep-2009 11:03 AM

Weather Display/PHP/AJAX Website Template Set - Settings.php - Common

The Settings.php file is the key to successful customization of the website. You'll need to enter data in this PHP file to reflect your unique website. The Settings.php file is slightly different for the three flavors of the template set (USA, Canada, World) due to the different supporting scripts used. The configuration discussed here is for ALL the tempate sets.
Common Settings in Settings.php | USA specific | Canada specific | Canada-ML specific | World specific | World-ML specific | menubar.php configuration


<?php
# Sitewide configuration
#
############################################################################
$SITE['charset']        = 'ISO-8859-1'// character set for webpages (iso-8859-1=latin)
$SITE['CSSscreen']        = 'weather-screen-php.css'// 800px design
$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 the use of Theme Switcher 
$SITE['CSSscreenDefault'] = 'weather-screen-orange.css';
$SITE['CSSwideOrNarrowDefault'] = 'narrow'// 'narrow' or 'wide'
#############################################
$SITE['flyoutmenu'] = true// set to false to use classic menubar.php instead

$SITE['clientrawfile']    = './clientraw.txt';  // relative FILE location of clientraw.txt

# Configurable Carterlake/WD/PHP template Site Settings
############################################################################
$SITE['WXtags']            = 'testtags.php';  // for testtags.php weather variables
$SITE['organ']            = 'USA Weather Website with WD/PHP &amp; AJAX';
$SITE['copyr']            = '&copy; ' date("Y",time()) . ', Your Weather Website';
$SITE['remote']            = "onclick=\"window.open(this.href,'_blank');return false;\"";
$SITE['tz']             = 'PST8PDT';  //NOTE: this *MUST* be set correctly to
// translate UTC times to your LOCAL time for the displays.
//  http://saratoga-weather.org/timezone.txt  has the list of timezone names
//  pick the one that is closest to your location and put in $ourTZ like:
//    $ourTZ = 'America/Los_Angeles';  // or
//    $ourTZ = 'Europe/Brussels';
$SITE['location']       = 'Somewhere,Some State, USA';
$SITE['email']            = 'mailto:somebody@somemail.org';
# Weather Station sensors
$SITE['DavisVP']        = true;  // set to false if not a Davis VP weather station
$SITE['UV']                = true;  // set to false if no UV sensor
$SITE['SOLAR']            = true;  // set to false if no Solar sensor
$SITE['showSnow']        = true;   // set to false if snow not recorded on WD
$SITE['showSnowTemp']     = 4;      // show snow instead of rain if temp is <= this amount
//                                // note: temp in C if uomTemp is C / temp in F if uomTemp is F
# 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';

#
#Forecast script settings area
#
$SITE['UVscript']        = 'get-UV-forecast-inc.php'// worldwide forecast script for UV Index
//    comment out above line to exclude UV forecast
//
# if you have WXSIM and plaintext-parser.php, set $SITE['WXSIM'] = true;
# to have the WXSIM forecast text appear in the dashboard along with your primary forecast org's
# forecast.  
$SITE['WXSIM']            = true;  // Set to false if no WXSIM/plaintext-parser.php
$SITE['WXSIMscript']     = 'plaintext-parser.php'// script for decoding plaintext.txt into icons

$SITE['fcsticonsdir'] = './forecast/images/'// NOAA-style icons for NWS, WU, WXSIM forecast scripts
#
###########################################################################

# ajax-dashboard, ajax-sidebar settings (will override defaults in
#  the scripts themselves when included in this site
###########################################################################
$SITE['WDdateMDY'] = true// for WD date format of month/day/year.  =false for day/month/year
$SITE['uomTemp'] = '&deg;F';
$SITE['uomBaro'] = ' inHg';
$SITE['uomWind'] = ' mph';
$SITE['uomRain'] = ' in';
$SITE['uomSnow'] = ' cm';
$SITE['uomDistance'] = ' miles';  // or ' km' -- used for Wind Run display
$SITE['uomPerHour'] = '/hr';
$SITE['imagesDir'] = './ajax-images/';  // directory for ajax-images with trailing slash
# note: date format used for PHP parts only.  Weather-Display 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 'd/m/Y' for Euro format?>
$SITE['charset'] = 'ISO-8859-1';
This setting specifies the character set the webpage uses. The default is the Latin set.
$SITE['CSSscreen'] = 'weather-screen-php.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-sidebar in your copy of the CSS.
$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['clientrawfile'] = './clientraw.txt';
This setting specifies the relative FILE location of the WD clientraw.txt file. If you've installed the template set in a subdirectory, and your clientraw.txt is in the document root directory, use
$SITE['clientrawfile'] = '../clientraw.txt';
 
$SITE['WXtags'] = 'testtags.php';
This specifies the name and relative file location of the testtags.php file (required weather variable PHP file routinely uploaded by Weather Display).
$SITE['organ'] = 'USA Weather Website with WD/PHP &amp; AJAX';
This specifies the text to use in the Heading area on all pages in the website.
$SITE['copyr'] = '&copy; ' . 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['tz'] = 'PST8PDT';
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. Timezone codes for use in this setting are available at http://saratoga-weather.org/timezone.txt -- pick one of them that reflects the timezone in your locale.
$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['UV'] = true;
$SITE['SOLAR'] = true;
These two logical variables are used to describe your weather station hardware.
Set $SITE['UV'] =false; if you don't have a UV sensor.
Set $SITE['SOLAR'] = false; if you don't have a Solar Radiation sensor.
These settings will control some content display on the ajax-dashboard and the ajax-gizmo display.
$SITE['DavisVP'] = true;
This setting is used to control display of Davis Vantage Pro specific values (like 'Storm Rain').
=true; if you have a Davis Vantage Pro weather station
=false; if you have another type of weather station.
$SITE['showSnow'] = true;
This setting controls the display/non-display of a Snow section to replace the Rain section in the ajax-dashboard. You'll need to use the WD manual snow entry panel to keep the snow data updated.
= true; to display the Snow section when snow display conditions are met (see below)
=false; to always display the Rain section only.
$SITE['showSnowTemp'] = 4;
If $SITE['showSnow'] = true and the outside temperature is less than or equal to this temperature (default=4°C or 34°F for USA) and snow data is available from the WD snow data entry panel, then the Snow section will replace the Rain section on the ajax-dashboard on the home page, otherwise the Rain panel will be displayed.
 
$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['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['fcsticonsdir'] = './forecast/images/';
This specifies the relative FILE location of the icon set used by the forecast scripts (advforecast.php, WU-forecast.php, WXSIM plaintext-parser.php)
$SITE['WDdateMDY'] = true';
This specifies how Weather-Display is set for internal date format.
Use $SITE['WDdateMDY'] = true'; for WD internal dates in month/day/year format. (USA)
Use $SITE['WDdateMDY'] = false'; for WD internal dates in day/month/year format. (Canada, World)
$SITE['uomTemp'] = '&deg;F';
$SITE['uomBaro'] = ' inHg';
$SITE['uomWind'] = ' mph';
$SITE['uomRain'] = ' in';
$SITE['uomDistance'] = ' miles';
$SITE['uomPerHour'] = '/hr';
$SITE['uomSnow'] = ' in';
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 Weather-Display uploads in the testtags.php file. These settings are used for the PHP display of the page. The AJAX-enabled contents will overwrite the displays on the dashboard with units determined by the ajaxWDwx.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. The ajaxWDwx.js script should have the same location specified.
$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-Display internal dates on weather variables included via testtags.php are NOT processed -- they remain in the format specified with your Weather-Display Units 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-Display internal times on weather variables included via testtags.php are NOT processed -- they remain in the format specified with your Weather-Display Units 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.

You'll need to perform other settings specific to the template set you selected. Please continue the setup process by using the below links for that information.
USA specific | Canada specific | Canada-Multilingual specific | World specific | World-Multilingual

deformed-offering