User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
en:forecast_settings [2015/05/23 14:37]
wvdkuil [Forecast on start page]
en:forecast_settings [2015/05/23 14:37] (current)
wvdkuil [What are the different parts on a forecast page]
Line 1: Line 1:
 +====== Install the Leuven-Template step 4 of 7  ======
 +<WRAP tabs>
 +  * [[how_to_install|1]]
 +  * [[folder_contents|2]]
 +  * [[test_program|3]]
 +  * [[settings|Manually change the settings files]]
 +  * [[upload|5]]
 +  * [[menu|6]]
 +  * [[how_to_install7|7]]
 +<WRAP important>​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.</​WRAP>​
 +<WRAP tabs>
 +  * [[settings|Introduction]]
 +  * [[check these first|Check these first]]
 +  * [[check these also|Check these also]]
 +  * **[[forecast settings|You are here]]**
 +  * [[optinal settings|Optional]]
 +===== 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     ^
 +| ​        ​|no ​       |latitude/​longitude ​   |worldwide ​        |
 +|Yahoo ​         |no        |their own code        |worldwide, also current conditions ​ |
 +|WeatherUnderground|yes ​   |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 =====
 +{{ :​fct-parts.jpg?​nolink|}}
 +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.
 +  - 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
 +  - The"​icons"​ with the **day-parts** with some text and arrows
 +  - A meteogram with a longer period and shorter intervals compare to the icons 
 +  - 1 or more tables ​ with detailed information. If there are more tables the can be used in tabs also.
 +  - 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 ^
 +| ​  ​|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 ​         |
 +| ​   |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 |
 +|:::  |:::  |usa/​noaafct/​noaa_plain_page.php ​   |                        ​
 +===== Forecast on start page =====
 +On the startpage there is a compressed forecast displayed with a link to the full page forecast. ​
 +{{ :​dash_fct.jpg?​nolink |}}
 +First we have to decide which forecast will be used as default on the start-page. ​
 +  * 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 </​code>​
 +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 is changed to NOAA in the region settings. If you prefer you can set the selection there to comment. ​
 +<​code># ​      ​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 ​
 +<​code># ​      ​select your default forecast organisation
 + $SITE['​ecPage'​] = true;                 // #####    Environment Canada forecasts
 +</​code>​The members of HWA in europe/​Benelux can set the forecast to HWA by removing the comment mark in their  '​europe'​ regional settings.
 +<​code># ​      ​select ​ your default forecast organisation
 +#        $SITE['​fctOrg'​] ​        = '​hwa'; ​               //  only for members of  HetWeerActueel,​ needs a key and id</​code>​
 +===== 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 ====
 +WXSIM is a program developed by **Tom Ehrensperger** [[http://​​]].
 +You need to have a Windows-PC to run that program and you have to buy a licence. ​
 +<​code>​$SITE['​wxsimPage'​] = false; // ##### 
 +$SITE['​wxsimData'​] = '​../';​ //​ root folder</​code>​
 +If you are using this nice program you specify here some the needed settings:\\
 +  - wxsimPage ​ should be set to **true** to display the full-page wxsim forecast\\ ​
 +  - 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|wxsim]]
 +==== Multiple city / area selection for forecasts ====
 +<​code>​$SITE['​multi_forecast'​] = true;  // ##### make forecast available for multiple city's in your area</​code>​
 +{{ :​selection_box.jpg?​nolink|}}
 +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.
 +<​code>​$SITE['​wuPage'​] = '​yes'; ​   // #####  WU forecastpage in menu</​code>​
 +If you do not want a WU forecast set the first setting to **false** and you can skip the remaining WU settings.
 +<​code>​$SITE['​wuKey'​] = '​x4a35d63826422341';​ // ##### set to your (free) Wunderground API key </​code>​
 + If you want to use the one page WU forecast you have to Visit [[http://​​weather/​api/​]] ​ to request a free key and modify with your key the $SITE['​wuKey'​] setting.
 +<​code>​$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)</​code>​
 +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.
 +==== MetNo ====
 +<WRAP important>​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.</​WRAP>​
 +If you want the extensive MetNo forecast to be accessible in the menu, leave this setting to **true**.
 +<​code>​$SITE['​metnoPage'​] = true; // #####  metno forecast page in menu
 +</​code>​Again you can set the icons to be used at  either the template wide icons or the yrno icons here also.
 +<​code>​$SITE['​yrnoIconsOwn'​] = false;         // use yrno icons (true) or our template icons (false)
 +$SITE['​yrnoIconsDir'​] = '​wsyrnofct/​img/​yrno_icons/'; ​     // location of the icons
 +==== YrNo ====
 +This setting is for the one-page forecast in the menu.
 +<WRAP important >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.</​WRAP>​
 +<​code>​$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</​code>​
 +To find the correct Country/​region/​City code visit [[http://​​]] and locate the nearest city to your place. In the browser address area you find the correct code. Example %%http://​​place/​%%**Belgium/​Flanders/​Leuven/​**\\ ​
 +==== HWA ====
 +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.
 +<​code>​$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</​code>​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)
 +</​code>​As with the other forecast pages you can choose to use the default icons or the icons of the forecast.
 +==== Yahoo ====
 +If you want the Yahoo forecast to be accessible in the menu, leave this setting to '​yes'​.
 +<​code>​$SITE['​yahooPage'​] = true; // here you specify if you want a separate page</​code>​
 +<WRAP important>​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**.</​WRAP>​
 +<​code>​$SITE['​yaPlaceID'​] = '​973505';​ //​ #####  </​code>​
 +To find the correct city code visit [[http://​​]] and find your city or one close to.\\ 
 +This is the result for my city:  **%%http://​​belgium/​vlaams-brabant/​leuven-973505/​%%**\\ ​
 +The numerical code to use in the '​yaPlaceID'​ setting is 973505. For Calgary, CA it would be 8775.
 +<​code>​$SITE['​yahooIconsOwn'​] = false; // use yahoo icons (true) or our template icons (false)</​code>​
 +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**.
 +<​code>​$SITE['​worldPage'​] = true; </​code>​
 +You have to get a free key from [[http://​​]]\\ ​
 +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**. ​
 +<​code>​$SITE['​worldIconsOwn'​] = false; // use WW icons (true) or our template icons (false)</​code>​
 +As with the other forecast pages you can choose to use the default icons or the icons of the forecast.
 +==== NOAA ====
 +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)</​code> ​
 +==== 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).
 +<​code>​ $SITE['​ecPage'​] = true;   // #####    Environment Canada forecasts</​code>​
 +The EC forecast can only use their own icons..
en/forecast_settings.txt · Last modified: 2015/05/23 14:37 by wvdkuil