• English
  • Nederlands

User Tools

Site Tools


en:check_these_first

Install the Leuven-Template step 4 of 7

Only change the text in the line itself if you are instructed to do so.
In a lot of cases, just add a comment mark, or remove one.

Let's start

Go step by step through this document, make a change, and TEST whether the change is successful.
Most settings to be changed are in the _my_texts/wsUserSettings.php script.
All line numbers mentioned below are approximately, as new interim-releases sometimes add or remove lines from the settings-files.

Specify the region where your weatherstation is located

$SITE['region'] 		= 'america';    // #####
#$SITE['region'] 		= 'canada'; 	// #####
$SITE['region'] 		= 'europe';	// #####
#$SITE['region'] 		= 'other';      // #####

Again DO NOT change names only select the region you are in by removing the # and make sure all other lines have a # on the first position. In the lines above the region “europe” is selected.

There are two lines WITHOUT a comment mark in this example. Only the last line is used.

All settings are stored inside a table with is named: $SITE[]

Every setting has its own name inside that table $SITE['name'] and a value : $SITE['name'] = 'value' and every line is ended with a ;

The name of the setting in this example is 'region'
The value of the setting with the name 'region' is 'europe'

$SITE['region'] = 'europe';

A value remains valid until it is changed on another place. In our example the line with the name 'other' has a comment mark and is therefor not used. So the value will remain 'europe'.

Which settings SHOULD we set first, which will we check later?

Not every setting is equaly important. The width of the page ('1100px' or '1200px') can be set later when fine-tuning your site.

The essential settings which we have to check first in wsUserSettings.php are marked with ##### on the line.

These settings are needed and often there are groups of sub-settings based on their value. As an example the region setting form a few minutes ago. This setting controls the decimal-point, the units used for weather-values, the weather-warning script, a.s.o. Even the menu has a different content as different scripts are used for regional maps.

Specify yor weather-program

$SITE['WXsoftware'] 	= 'CU';  	// ##### Cumulus
#$SITE['WXsoftware'] 	= 'CW';  	// ##### consolewd = WeatherDisplay for raspberryPI
#$SITE['WXsoftware']	= 'MB';		// ##### Meteobridge	
#$SITE['WXsoftware']	= 'MH';     	// ##### Meteohub
#$SITE['WXsoftware'] 	= 'VW';	        // ##### vws
#$SITE['WXsoftware'] 	= 'WC';  	// ##### WeatherCat
#$SITE['WXsoftware'] 	= 'WD';  	// ##### WeatherDisplay
$SITE['WXsoftware'] 	= 'WL';		// ##### WeatherLink
#$SITE['WXsoftware'] 	= 'WS';	        // ##### wswin
#$SITE['WXsoftware'] 	= 'WV';	        // ##### wview
#
# for weatherlink.com users --------------------
#$SITE['WXsoftware'] 	= 'DW';	        // ##### Davis WeatherLink.Com  ONLY uncomment after setting the id and password
$SITE['wlink_key']      = 'xyz';        // ##### Your weatherlink.com user id
$SITE['wlink_pw']       = 'xyz';        // ##### and password.
# ---- end of wl.com users ---------------------

In this example the program used is Cumulus as the setting for 'WXsoftware' has the value 'CU'. Make sure in your own case that all other lines have a comment mark.

Identity settings

#---------------------------------------------------------------------------
#  IMPORTANT    General settings such as station location, identity 
#---------------------------------------------------------------------------
$SITE['organ']		= 'your station';	// #####
$SITE['yourArea']	= 'your area'; 		// #####

The name of your weather-station and a relative short name for the area/region your weather-station is in. It will be to be displayed on every page header and on the forecast pages.

You have to test NOW to check if you did not make a typing error. An error with a quote to few or to much is also made by experienced programmers. So “save” your changes, upload your changed wsUserSettings.php to your website if not already done and test your changes by typing www.your website name.com/weather27/ in your browser.

How can visitors contact you

If you want to include a contact page (via menu or footer) you have to specify correct e-mail addresses here. Use a noreply@ address for the Webmaster E-mail from (which the visitor sees when he asks for a copy of the e-mail) and a valid e-mail address to receive the inquiries from the visitor. This last address is not seen by the visitor so robots / hackers can not see them either.

$SITE['contactName']   = 'Your name goes here'; 	// ##### Webmaster naam or simply webmaster
$SITE['contactEmail']  = 'noreply@yourweatherstation';	// ##### Webmaster E-mail from
$SITE['contactEmailTo']= "contact@yourweatherstation";	// ##### contact E-mail goes to  THIS email adress, so it MUST be a real one

Password to protect your settings

After you are fully finished testing, you can set a password to make is more difficult to list your settingsfile.

#---------------------------------------------------------------------------
#  IMPORTANT    After ready with debug this password protect your settings and other snesitive data
#---------------------------------------------------------------------------
$SITE['password']        = '';                           // #####

But wait until you know for sure that support is not necessary anymore. As I can not check problems caused by errors in the settings when they are password protected.

Regional settings for your weatherstation

The following lines should be set for the regional part you are in.
for 'america' 82 - 110, 'canada' 114 - 137, 'europe' 142 - 157 and 'other' 160 - 170

Dthe linenumbers can change with every (interim) release

Latitude and longitude

$SITE['latitude']	= '50.89518';	 // #####
$SITE['longitude']	= '4.69741'; 	 // #####

These values are probably also specified in your weather program and are used here for earthquake reports, astronomy and forecasts.

So they are extremely important to specify them correctly.

Example: 50.8500 / 4.3400 is for Leuven in Belgium and 41.30068 / -72.793671 is for Brandford CT, USA. Take attention for the sign of those fields. North of the equator is positive (=no sign), South of the equator needs a - sign. Left of Greenwich line needs a - sign also.

Decimal method

This template uses the decimal method for latitude and longitude. So 50.89518 is used and not 50° - 53' - 41.57“

Double check when copying from your weahter-program

Some weather programs use a different signing method, so do not simply copy the lat/lon settings from your weather program.

There are numerous sites to find the lat/long using a zoomable map such as: http://itouchmap.com/latlong.html U can convert from UU/MM/SS to decimal at this website.

Area code for weatherwarnings

$SITE['warnArea'] = 'BE004';	// ##### area where this weatherstation is located

If you want the severe weather-warnings on your website:
For “europe”: Visit the: http://www.meteoalarm.eu/ website and find the code of your area in the browser address field.

Example: http://www.meteoalarm.eu/en_UK/0/0/UK012-East_of_England.html
Here UK012 is the code for East England. Another code is BE004 for Vlaams Brabant.

For “america”: CT009 = is an area in Connecticut. You can find your area code at http://alerts.weather.gov/, go down on that page and you find a “State (Zone List | County List)”. clicking on either Zone or County list for your state lists all codes for your state.

Be aware that for the USA the Curly NWS-alerts are included also. You choose later on in the customization if you want to use the Curly scripts. Default the Leuven-Template uses the Leuven-Template NOAA scripts.

Canada needs no setting, default set to false.

Default language

The currently languages which are supported in the template are

code language
nl Dutch - Nederlands
en English
fr French - Francais
de German - Deutsch

Ohther languages are available as a free add-on on, visit this page Languages.

$SITE['lang']	= 'en'; 	// ##### default language for website to use

The default language (which is shown first) of your website should be specified here.

Time zone

$SITE['tz'] = 'Europe/Brussels'; 	// ##### 

Time zone for the whole of Western Europe, leave it if you do not know your EXACT timezone description. Beware: this timezone setting is NOT an international standard one, but is the coding used by websites and PHP programs. You can browse the available timezones at http://us1.php.net/manual/en/timezones.php

Nearest airport / official weather station

$SITE['METAR'] = 'EBBR';  // ##### 

The “METAR” code is used to obtain the current weather conditions for your area and is used o.a. by airplanes continuously. Those conditions are guarded closely and most of the times they are very correct.

These METAR-valuesare used for most weather-programs inside the template as only WD has current condition tags.

Use Google to find the closest METAR to your city. A text file with 'all' metar codes http://weather.rap.ucar.edu/surface/stations.txt

Location-code for Yahoo weather

$SITE['yaPlaceID'] = '973505';  // #####  

The yaPlaceID (yahoo city code) is used to obtain the current weather conditions for your area from Yahoo. This is a alternative for the previous setting, METAR. The past period there were multiple disruptions in obtaining the METAR information so the Yahoo alternative is now more needed then ever.

The conditions supplied by Yahoo are of the same quality level as METAR and most of the times they are correct.

At the website https://weather.yahoo.com you can easily find your own Yhoo place ID.
Do a search for Leuven, accept the proposed “Leuven, Vlaams Brabant, BE” and you see the following line in your browser address field. https://weather.yahoo.com/belgium/vlaams-brabant/leuven-973505/ The number 973505 is the yahoo place id for Leuven. You can use a similar approach for finding your own ID and you should insert it in the setting.

Is your station located in the Netherlands or Belgium?

Until now the values for a setting where alays supplied as a 'value', within quotes. The “yes / no” value is specified without quotes as true or false

There are a few “Benelux-only” scripts inside the template which are usefull for weatherstions in those two countries.

 	$SITE['belgium']	= true; 		// #####    if not in the country set to false
	$SITE['netherlands']	= true; 		// #####    this is for country specific information

Set those country settings to false if you are not located there.

CCN - Current conditions

#---------------------------------------------------------------------------
#  STANDARD     C U R R E N T  C O N D I T I O N S   from which source do we get them
#---------------------------------------------------------------------------    
#$SITE['curCondFrom']	= 'wd';		// if you are using WeatherDisplay AND have set WD correctly
#$SITE['curCondFrom']	= 'yahoo';	// if you use Yahoo also for the forecast on the startpage no other forecast
$SITE['curCondFrom']	= 'metar';	// default, mostly best choice

Again uncomment (= remove the # before the setting) for your choice and make sure that ALL other settings have a # on the first position.

In the example above the 'meter' (= nearby airport) is used to obtain the current conditions (clouds, rain etc).

2015-July-01 After multiple errors / problems with the metar site/script: Use yahoo.

If you are using weatherDisplay AND you have a solar sensor attached than you can use the first choice ‘wd’. If you are using Yahoo on home page to obtain the 5 day forecast use the second choice ‘yahoo’. In all other cases use the default last choice 'metar'

Settings for your start or home page

The following settings define which parts will be shown on the start page and where we get the some of the values from.

$SITE['header']	= '3';		// ##### normal header = 2 default. 1=small less information

There are three headers to choose from. Default the header3 is selected, that is the one with the small gauges in it. There are two other headerswhich are coloured blue in the image below. Type 1 is the lower one with a rotating weather-values display. Type 2 is slightly higher but the most important weather values are always visible. Type 1:

Type 1:
Type 2:

The numbers in the image refer to

nr meaning
1 Your own message, used for maintenance remarks or new features on your site. You find the settings for this at line 280
#---------------------------------------------------------------------------
# STANDARD      your own yellow message box.  
#---------------------------------------------------------------------------
$SITE['maintenanceShow']	= true; 	//#####  display this file always (true) when it exists
$SITE['maintenanceTxt']		= './_my_texts/maintenance.txt';
2 Note also the different location of the warnings. Either on top of the page or below the header. This is a separate setting and set independant from the “header” type choosen. Set here weer-waarschuwingen
3 The type of “header'
$SITE['header']	= '2';
4 The name of your weatherstation as previously specified.
$SITE['organ']
5 In both type 1 and 2 header you see de date/time (9-11-2013 18:35 0r 18:50) for the weahter-values displayed. So you can see immediately if the upload of your weatherdata is functioning. In type 1 you see also the “ajax/gizmo”. This name is used in different templates for years. The Gizomo can be shown or not shown on every page by a setting in the menu-data file. The Gizmo displays a set of 7 different weathervalues. In the example above the value for rain-today is displayed (1.2 mm)

Background colors and image

$SITE['colorNumber']	= '0';		// ##### 	this number is the default key which color and style your website will be using
# 0=weather adapted, 1=green,      2=blue,     3=pastel,   4=red,   
# 5=orange,  6=none, 7=ws_clouds, 8=ws_cloudsn, 9=ws_mist, 
#10=ws_moon, 11=ws_pclouds, 12=ws_rain, 13ws_snow, 14= ws_storm, 15=ws_sun, 16=ws_thunder

In the standard installation, a program is included with which the different colors can be tested:
www.name-of-your-website.com/weather27/testMood.php

If you change $SITE['colorNumber'] = 0;
to $SITE['colorNumber'] = 7;, you choose 'clouds', and changing
to $SITE['colorNumber'] = 4; results in a mostly red colored website.

Default setting is “0=weather adapted” as most users like the changing cbackgrounds based on the current weather.

During the first install until debug is switched off the color is reset to 3, pastel blue. Otherwise the error messages are hidden behind the colored background photo's which makes debugging far more difficult.

Side and bottom area

$SITE['sideDisplay']	= true;	// ##### will be displayed if true.
$SITE['bottomDysplay']	= true;	// ##### 

Specify if you want these parts on every screen. If you choose for the default vertical menu the sideDisplay is always displayed regardless of the setting here.

Number of visitors

$SITE['showVisitors']= true;	// show number of visitors in footer

The number of visitors (including bots) is printed in the footer part of every page of your website.
Change true to false if you do not want those numbers shown and calculated.

Visited pages

$SITE['pages_visited']= true;	// count and show visited pages

All pages which are visited will be counted and can be displayed during the debug phase using a menu choice.

Information of partners, equipment and other websites

$SITE['partners'] 	= 'B';	// ##### show other websites (partners)
$SITE['equipment']	= 'B';	// ##### show links about the equipment 
$SITE['otherWS'] 	= '';	// ##### show links to other weather-stations

'partners' are organizations you upload your weatherinformation to. Example WeatherUnderground
'equipment' are the computer, weatherprogram, webhost you use to run your weather site
'otherWS' are links to websites of friends a.s.o.
Specify if and where you want this information on every screen. 'B' stands for the bottom area, 'V' for the vertical area on the left where also the menu can be displayed. An empty entry indicates that you do not want that information to be displayed. So in the example code above you will display a logo and a link of all partner-websites in the bottom area. Also you will display there a logo and a link of the equipment and weatherprogram you are using. And you decided to not display anything about other websites.

bottom_extras.jpg

In this example image the partners this weather station is cooperating with are the Benelux mesonets HWA and BNLWN, AWEKAS, WeatherlinkIP and WeatherUnderground. This website uses a Davis Weather station, Meteohub as the weather program, also Meteoplug to store its data and a webhoster with the name Hostnet.

Where can you find the information to adapt the display of logo and links to your own situation:

info where to find adapt using
partners weather27/_my_texts/partners.phpt
weather27/_my_texts/partners_lang.txt
text editor
equipment These settings
weather27/wsBottom.php
weather27/wsSideColom.php
text editor
otherWS weather27/wsSideColom.php text editor

Webcam

#---------------------------------------------------------------------------
# IMPORTANT     webcam can only be shown in side area. there is also a separate page in the menu
#---------------------------------------------------------------------------
$SITE['webcamPage'] 	   = true;              // ##### do we want a webcam page
$SITE['webcamSide'] 	   = true; 		// ##### show webcam in side column
# 
$SITE['webcamName'][1]     = 'My webcam'; 
$SITE['webcamImg'][1]      = 'http://wiri.be/image.jpg';   //  these are for demonstration only, replace with yours
$SITE['webcamImgNight'][1] = './img/webcam_night.png';     //  default "no broadcast" image for night time.

If you do not have a webcam , set the first setting to false. webcam.jpg For every webcam you will be printed above the (small) webcam image

  • The image-link to the static image for this webcam and
  • An optional img-link if you want to use a different link to a night image.

Social site buttons

#---------------------------------------------------------------------------
# social site support can be shown in side column below menu or in header below the language select
#---------------------------------------------------------------------------
$SITE['socialSiteSupport']= ""; 	// #### '' no support; "H"orizontal or "V"ertical  
$SITE['socialSiteKey']    = "ra-4fd8a66b72fa8566";   // your key from http://www.addthis.com/  

Include icons for Facebook, Twitter and so on. you can disply these either in the side column, (example image = 3 large icons) or in the header (an all-in-1 icon). The icons are generated using the free addthis.com service. You can start using my key but to get a better insight in your visitors you can ask for your own free key at http://www.addthis.com/

Warnings

The warnings are retrieved form the warnings site based on the setting $SITE['warnArea'] which is specified in the beginning of the settings. Here we customize how the warnings will be displayed.

#---------------------------------------------------------------------------
# 	warnings
#---------------------------------------------------------------------------
$SITE['warnings'] 	= true;		// show (default) meteo warnings on every page

If set to false no warnings will be displayed.

$SITE['warningInside']	= false;	// default

Default the warnings are displayed before everything else on the page. If you want the warning inside your page just below the header set this setting to true.

$SITE['warningGreen']	= false;	// default = no

If you want a display message also when there is no warning, change this setting to true.

$SITE['warningsXtnd'] 	= false;	// false =  one line per warning,

If you want the whole text of the warning displayed on your page set to true. Be careful, use with care. The whole text can be extremely large, for instance do not use it in Belgium or half of your window will be used by the warning.

if ($SITE['region'] ==	'america') {
	$SITE['useCurly']		= false;		##### use template/noaa script or curly's script

The users in the USA can choose the more extensive Curly scripts which make it possible to display multiple warnings for multiple area's. if one choses for these scripts the adaptions are done by modifying the setting scripts in the NWS folder in weather27/usa

Extra banners on top or bottom

If you want to put some adds or extra information on top of the page or at the bottom these are the settings for that.

#-----------------------------------------------------------------------------------------
# Banners for ads and other extra's
#-----------------------------------------------------------------------------------------
$SITE['banners']		= true;
$SITE['bannerTop']		= true;
$SITE['bannerBottom']		= true;
$SITE['bannerTopTxt']		= './banner.txt';       // can be .txt - .html file or .php
$SITE['bannerBottomTxt']	= './banner.txt';
en/check_these_first.txt · Last modified: 2015/07/02 13:07 by wvdkuil