• English
  • Nederlands

User Tools

Site Tools


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.

Which pages with weather-forecasts are available

There are multiple forecast available as a separate page in the menu. We will now decide if we want to use a forecast-organisation and we make sute to use the correct settings so that the forecast realy reflects our area. As you will discover, these settings are differtent for most of the forecasts.

forecast from needs api-key location definition more
Met.no no latitude/longitude worldwide
Yahoo no their own code worldwide, also current conditions
WeatherUndergroundyes latitude/longitude worldwide, lot of extensions
WXSIM paid for program their own code very extensive product
yrNo no their own code worldwide, used for mobile site also
Environment Canada no their own code region 'canada' only
NOAA no latitude/longitude region 'america' only

What are the different parts on a forecast page

You can select the different parts to be displayed using the settings in the forecast scripts and wsUserSetting.php

The example image displayed here is made and contains the numbers from the explanation below.

  1. optional selection box.
    • The text file with the list of the area's is in your _my-texts folder
    • With the setting $SITE['multi_forecast'] you decide the default use of this box
    • In every full page script you can decide to sitch the use on and off also
  2. The“icons” with the day-parts with some text and arrows
  3. A meteogram with a longer period and shorter intervals compare to the icons
  4. 1 or more tables with detailed information. If there are more tables the can be used in tabs also.
  5. some space for the mandatory credits and also some extra information during the debig phase.

For every forecast there are at least 2 scripts. One “full-page” with all available information. And 1 “dashboard” script with condensed information to be used an a start-page..

forecast dashboard full page
Met.no wsmetno3/wsDashMetno.php wsmetno3/ws_metno_page.php
Yahoo forecasts/yahooForecast2.php forecasts/yahooForecast2.php
WU wuforecast/wsDashWU.php wuforecast/wu_fct_psge.php
WXSIM wsWxsim/wsDashWxsim.php wsWxsim/PrintFull.php
Yr.no wsyrnofct/wsDashYrno.php wsyrnofct/ws_yrno_page.php
EC canada/ec_print_dash.php canada/ec_print_fct.php
NOAA usa/noaafct/wsDashNoaa.php usa/noaafct/noaa_full_page.php

Forecast on start page

On the startpage there is a compressed forecast displayed with a link to the full page forecast.

First we have to decide which forecast will be used as default on the start-page.

  • Met.no for 'europe' and 'other'
  • EC = Environment Canada for regio 'canada'
  • NOAA for the USA = region 'america'
# which world-wide available forecast will be used. Can be overridden when you select your region below
#       the following forecasts need some extra settings
#$SITE['fctOrg'] = 'yahoo';              //  you need to find later the correct yahoo place id; 
#$SITE['fctOrg'] = 'wu';                 //  you need a special WU key for this forecast
#$SITE['fctOrg'] = 'wxsim';              //  you need the (paid) wxsim program on  a pc for this forecast
#$SITE['fctOrg'] = 'yrno';               //  you need to find the correct yrno city description later

#       the next forecasts need only latitude and longitude
#$SITE['fctOrg'] = 'yowindow';           //  default lat lon is used
$SITE['fctOrg'] = 'metno';              //  based on lat-lon 

Select 1 forecast from the list at lines 69-70 in wsUserSettings.php. If you switch from the default one you may have to change some settings later for a key and / or a location coe.

For region 'america' the default Met.no is changed to NOAA in the region settings. If you prefer Met.no you can set the selection there to comment.

#       select your default forecast organisation or set as comment when using other worldwide forecasts
        $SITE['fctOrg']         = 'noaa';               //  

Also for region 'canada' there is a setting in the region-settings so that EC becomes the forecaster. Again add a comment mark at postion 1 if you prefer Met.no

#       select your default forecast organisation
	$SITE['ecPage']		= true;                 // #####    Environment Canada forecasts

The members of HWA in europe/Benelux can set the forecast to HWA by removing the comment mark in their 'europe' regional settings.

#       select  your default forecast organisation
#        $SITE['fctOrg']         = 'hwa';                //  only for members of  HetWeerActueel, needs a key and id

Forecast organisations we want to use

There are multiple forecast available as a separate page in the menu. You will find the settings for them in the settings file. Scan for them and adapt as needed.


WXSIM is a program developed by Tom Ehrensperger http://www.wxsim.com/. You need to have a Windows-PC to run that program and you have to buy a licence.

$SITE['wxsimPage'] = false;		// ##### 
$SITE['wxsimData'] = '../';		// root folder

If you are using this nice program you specify here some the needed settings:

  1. wxsimPage should be set to true to display the full-page wxsim forecast
  2. wxsimData should point to the location where the WXSIM files are uploaded.

The files which are normally used are: plaintext.txt and latest.csv.If you are already using other scripts, the files are probably uploaded to the root of your website.

The other settings to use and adept the wxsim scripts are documented in wxsim

Multiple city / area selection for forecasts

$SITE['multi_forecast'] = true;  // ##### make forecast available for multiple city's in your area

The forecast scripts for the template are able to display a number of forecast for different cities, meant to be used for interesting cities in your area/country. A selection box is shown at the top of the forecast. The forecast shown defaults to your area. But the visitor can then select another area/city. Those up to 6 other cities are specified in a text-file in the _my_texts forlder.

If you prefer to not use these multiple selections, set the setting 'multi_forecast' to false.

As wxsim only supplies a forecast tailored to your own local situation, there is no selection box available at the WXSIM page.

If you prefer, you can also set 'multi_forecast' on or off in the forecast scripts themselves.

Weather Underground

These WeatherUnderground settings are used for a one page forecast in the forecast menu.

$SITE['wuPage']		= 'yes';   	 	// #####  WU forecastpage in menu

If you do not want a WU forecast set the first setting to false and you can skip the remaining WU settings.

$SITE['wuKey']		= 'x4a35d63826422341'; 	// ##### set to your (free) Wunderground API key 

If you want to use the one page WU forecast you have to Visit http://www.wunderground.com/weather/api/ to request a free key and modify with your key the $SITE['wuKey'] setting.

$SITE['wuIconsDir']	= $SITE['iconsDir'].'wu_icons/';	
$SITE['wuIconsOwn']	= false;  // use wu icons (true) or our template icons (false)
$SITE['wuIconsCache']	= true;	  // use wu icons from our cache (true) or our wu icons from wu url (false)

The template uses the same icons for all forecasts. But if you prefer the WU icons to be used in the WU forecast you can set 'wuIconsOwn' to true. You can than choose to use cached WU icons or retrieve them form the WU site.


This forecast is available worldwide and needs no special settings. Therefor this forecast is used as the default one forthe template and is available as soon as the template is uploaded to your site. You can swirtch off the Metno forecast only if you selected another default forecast.

If you want the extensive MetNo forecast to be accessible in the menu, leave this setting to true.

$SITE['metnoPage']	= true;	// #####  metno forecast page in menu

Again you can set the icons to be used at either the template wide icons or the yrno icons here also.

$SITE['yrnoIconsOwn']	= false; 	        // use yrno icons (true) or our template icons (false)
$SITE['yrnoIconsDir']	= 'wsyrnofct/img/yrno_icons/';      // location of the icons	


This setting is for the one-page forecast in the menu.

Even if you do not want that forecast in the menu you have to check and correctly set the other settings for YrNo

The YrNo forecast data is used for the mobile version of your website.

$SITE['yrnoPage']	= true;			// #####  yrno forecast page in menu
#$SITE['yrnoID']	= 'Canada/Alberta/Calgary/';	// #####   generic adres for .png forecast
$SITE['yrnoID']		= 'Sverige/Skåne/Råå/';		// #####   generic adres for .png forecast

To find the correct Country/region/City code visit http://www.yr.no/ and locate the nearest city to your place. In the browser address area you find the correct code. Example http://www.yr.no/place/Belgium/Flanders/Leuven/


The “Het Weer Actueel” weatherstations have their own forecast data. If you are not a member or the weatherstation is not in the Benelux region you set this setting to 'no' and skip the remainder of this group of settings.

$SITE['hwaPage']	= false'; 			// ##### hwa forecast page in menu
$SITE['hwaXmlId']	= '000';			// ##### your Het Weer Actueel ID to retreive xml info
$SITE['hwaXmlKey']	= 'x67f7fb873eaf29526a11a9b7ac33bfac';   // ##### your HWA key to retreive xml info

You retrieve your 'hwaXmlId' and 'hwaXmlKey' at the management page for your weather-station at the HWA site.

$SITE['hwaIconsDir']	= 'wsHwa/hwa_icons/';	
$SITE['hwaIconsOwn']	= false; // use hwa icons from cache (true) or our template icons (false)

As with the other forecast pages you can choose to use the default icons or the icons of the forecast.


If you want the Yahoo forecast to be accessible in the menu, leave this setting to 'yes'.

$SITE['yahooPage']	= true;	// here you specify if you want a separate page

Even if you do not want the Yahoo forecast in the menu as a separate page, you have to set the following settings correctly if you want to use Yahoo on the start page as the forecast provider or to retrieve the current conditions.

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

To find the correct city code visit http://weather.yahoo.com/ and find your city or one close to.
This is the result for my city: http://weather.yahoo.com/belgium/vlaams-brabant/leuven-973505/
The numerical code to use in the 'yaPlaceID' setting is 973505. For Calgary, CA it would be 8775.

$SITE['yahooIconsOwn']	= false;	// use yahoo icons (true) or our template icons (false)

As with the other forecast pages you can choose to use the default icons or the icons of the forecast.

World Weather

If you want the Wordl Weather forecast to be accessible in the menu, set this setting to true.

$SITE['worldPage']		= true; 

You have to get a free key from http://developer.worldweatheronline.com/
The forecast is reterieved from latitude/longitude settings so an ID is not needed

$SITE['worldKey']	= 'egdt5rnspg8ypk8zuwpnnbw8';           #####   Version 1 key 
$SITE['worldKey2']	= '75eab62b3e5296f0a77bc926af808';      #####   Version 2 key
$SITE['worldAPI']       = 2;                                    #####   Set to 1 if you use the api version 1 key 

If you currently request an API-key you get a type-2 key. You set the value at $SITE['worldKey2'].

If you already have a World Weather key it is probably a type-1 key which you set at $SITE['worldKey'].
You then have to set $SITE['worldAPI'] to 1.

$SITE['worldIconsOwn']	= false;	// use WW icons (true) or our template icons (false)

As with the other forecast pages you can choose to use the default icons or the icons of the forecast.


There are two full-page NOAA forecasts which can be used in region 'america' only. The settings for these forecasts are therefor at the region settings for 'america (line 82-108).

 $SITE['noaaPage']	= true;   // #####    noaa weather forecast page in menu
 $SITE['noaaIconsOwn']	= true;   //          use noaa icons (true) or our template icons (false)

Environment Canada

The forecast page for Environment Canada can be used for region 'canada' only. The settings for this forecast are therefor at the region settings for 'canada (line 114-138).

 $SITE['ecPage']	= true;   // #####    Environment Canada forecasts

The EC forecast can only use their own icons..

en/forecast_settings.txt · Last modified: 2015/05/23 14:37 by wvdkuil