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.

Many of these scripts are now available on GitHub at https://github.com/ktrue

Buy Me A Coffee 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.

Note: Twitter widget has been disabled 3-Jul-2023 since it no longer displays the recent update Tweets.

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

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

The configuration for Settings.php discussed here is for the Canada-ML Specific template set. It assumes you've already done the common Settings.php configuration required for all the template sets
Common Settings in Settings.php | USA specific | Canada-ML specific | World specific | World-ML specific | menubar.php configuration


<?php
$SITE
['WDlanguage']        = 'en';  // Language used by WD
#  ='en' - English, 'de' = German, 'dk' = Danish, 'it'=Italian, 'fr'=French,
#  ='es' - Spanish, 'no' = Norwegian 
#
# Multilanguage support 
$SITE['allowLanguageSelect'] = true// set to false to disable the the use of language selector
$SITE['useLanguageFlags'] = false;  // true=show flags, false=show language names
$SITE['lang'] = 'en'// default language
$SITE['langavail'] = array('en',   // select languages to offer here.  Use comments to remove languages
  
'fr'// 'french',
);


# if your WD 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'
);

# 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

# fcsturlEC is for Environment Canada forecast (ec-forecast.php)
$SITE['fcsturlEC']        = 'http://weatheroffice.gc.ca/city/pages/on-107_metric_e.html';
 
$SITE['fcsticonsdirEC'] = './ec-icons/';      // EC forecast icons for Canada (ec-forecast.php)
#
#---- 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']   = 'ec-forecast.php';    // Canada forecasts from Environment Canada
$SITE['fcstorg']        = 'EC';    // set to 'EC' for Environment Canada

#$SITE['fcstscript']    = 'plaintext-parser.php';    // WXSIM forecast (if only forecast script)
#$SITE['fcstorg']        = 'WXSIM';    // set to 'WXSIM' for WXSIM forecast

# radar settings (will override defaults in ec-radar.php script
###########################################################################
$SITE['ecradar']    = 'WKR';  // set to default Site for ec-radar (same as id=xxx on EC website)
#                                set to 'NAT' for EC Canada national composite map
##########################################################################
?>
$SITE['WDlanguage']
This setting controls the source language that WD uses.
For the current release of the ML templates, only $SITE['WDlanguage'] = 'en' (English) is supported .. there is no reverse translation from the other WD languages built into the scripts, but may be added in the future.
Please leave as 'en' until further notice.
$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 language name instead.
$SITE['lang']
This setting controls the default language to be presented from among the choices in $SITE['langavail'].
The default is 'en' (English).
$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 (ajaxWDwx.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.
The Canada-ML template is shipped with 'en'=English and 'fr'=French available.
$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'
);

 
$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['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['fcsturlEC'] = 'http://weatheroffice.gc.ca/city/pages/on-107_metric_e.html';
This setting specifies the Environment Canada URL for the weather forecast and conditions page - it is used by the ec-forecast.php script to get the forecast and any current warnings for the forecast area.
$SITE['fcsticonsdirEC'] = './ec-icons/';
This setting specifies the relative FILE location of the directory containing the Environment Canada forecast icons. This is used by the ec-forecast.php script for the forecast icons in the ajax-dashboard, ajax-sidebar and wxforecast.php page.
$SITE['fcstscript'] = 'ec-forecast.php';
$SITE['fcstorg'] = 'EC';
This setting specifies the forecast organization (EC) and the script location. The default will use Environment Canada as the forecast source. 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['ecradar'] = 'WKR';
This setting specifies the default Environment Canada radar site to be used by ec-radar.php script on the wxradar.php page for animated display of the radar graphics.
deformed-offering