All general settings as contained in _metric _us and ca_settings.php files | ||
---|---|---|
Setting and default value | Description | When to change |
$ws_errors = true; | Normally you should not change this until you are finished testing.
Then change it to false. |
It should be set to true Only when asked by support or when you change the php scripts yourself. |
$ws_fct_skip = true; | Some forecast are only refreshed once or twice during 24 hours. This setting skips forecast-data which is already in the past when displayed. | You can change this setting during testing |
$wsTempMultiClr = true; | Important temperatures are displayed bigger and coloured from a wide range of values, example: 27° or 10° |
Set to false if you want RED / BLUE values only, red for above freezing, blue for below 19°C or -5°C |
$wsTempMultiUom = false; | The C or F is not shown with the temps. 29° | Set to true if you prefer: 19°C |
$wsTempAppDiff = 2; | Minimum difference with normal temperature before "feels like" temperatures will be shown | -- |
$allTextsLower = false | All (translated) texts are shown as in the language files. | Set to true to convert all texts to lowercase |
$ws_dec_point = '.'; $ws_dec_point = ','; | Metric setting default uses a comma Temp = 15,5°C US setting uses a point before the decimals Temp = 70.5°F | -- |
$yourColors = 4; |
Select the color-scheme you want in the next settings There are three parts and four sets of colors | Choose one of the available sets or you can modify one set if you want to use the colors match the rest of your site. |
DECIMALS | For forecasts we normally do not want to "precise" amounts such as 14.56 C, in the following part of the settings you can modify the default wihich is set to "as few as possible decimals". | |
$wsTempDecimals = false; | No decimals for temps Temp = 15°C | set to true to get one decimal Temp = 15,5°C |
$wsRainDecimals = true; | Rain will always have decimals, 1 for metric (mm) and 2 for US (in) | Do not change |
$wsSnowDecimals = true; | Snow will always have decimals, 1 for metric (cm) and 2 for US (in) | Do not change |
$wsWindDecimals = false; | Wind values do not need decimals | but you can change this setting to true and 1 decimal will be used |
$wsBaroDecimals = true; | Baro/pressure can use 1 decimal for metric (hPa) , and 2 for US (in) | -- |
$wsDistDecimals = false; | No decimals are needed for distances such as KM or Miles | xx |
DATE / TIME formatting |
There are two groups of date/time settings, first one here. Further below an other group is either copied from your Saratoga/Leuven settings or set by yourself. | |
$dayTimeFormat = 'd-m H:i'; $dayTimeFormat = 'M j g:i a'; |
Example metric: 13-08 11:54 Example US: Aug 13 11:54 am | Check the PHP manual before changing. |
$hourOnlyFormat = 'H'; $hourOnlyFormat = 'ga'; |
Example metric: 23 Example US: 11pm | |
$dateLongFormat = 'l d F Y'; $dateLongFormat = 'l M j Y'; |
Example metric: Sunday 13 August 2017 Example US: Sunday Aug 13 2017 | |
$dateShortFormat = 'd-m'; $dateShortFormat = 'm-d'; |
Example metric: 13-08 Example US: 08-13 | |
Your station/website | WARNING: Those settings will be replaced with the settings from your Saratoga/Leuven settings if you use that template. | |
$yourArea = 'Some area'; | example: Leuven country side | Replace with a not too long description |
$yourStation = 'XYZ Weatherstation'; | example: Wilsele weather | Replace with a not too long description |
$yourLatitude = '50.904'; | WEST of the UK, example the US, needs a minus sign, $yourLatitude = '-99.904'; | Use a site such as http://www.latlong.net/ to find your coordinates |
$yourLongitude = '4.696'; | South of the equator needs a minus sign, $yourLongitude = '-4.696'; | |
$yourCharset = 'UTF-8'; | Leave as is in most cases | Only change when you include the forecast inside your own html |
$yourDisplayWidth = '99%'; | Use a % of the available width | or set to the exact width, such as $yourDisplayWidth= '1200px'; |
Units of measurement |
WARNING: Those settings will be replaced with the settings from your Saratoga/Leuven settings if you use that template.
Set them the same as used on your other webpages, but only choose the values used here, do no invent your own | |
Example: $wsTempUOM = '°C'; $wsTempUOM = '°F'; | C is default in the metric settings file | F is default set in the US settings file |
All other UOM's are self-explanatory, set a # at the first position for the ones you do not need | ||
Other date/time settings | WARNING: Those settings will be replaced with the settings from your Saratoga/Leuven settings if you use that template. | |
$timeFormat = 'd-m-Y H:i'; $timeFormat = 'M j Y g:i a'; |
Example metric: 13-08-2017 11:54 Example US: Aug 13 2017 11:54 am | Check the PHP manual before changing. |
$timeOnlyFormat = 'H:i'; $timeOnlyFormat = 'g:ia'; |
Example metric: 11:54 Example US: 11:54 am | |
$dateOnlyFormat = 'd-m-Y'; $dateOnlyFormat = 'M j Y'; |
Example metric: 13-08-2017 Example US: Aug 13 2017 | |
$timezone = Europe/Brussels | There are a few examples what type of specification you should use. | Check the PHP manual and DO NOT invent your own |
$lang = 'en' | Supported languages for now are 'en, 'de', 'fr', 'nl' | If you want to use your own, feel free to do it. If you sent me the language files, i can include them in the next release |
And no more changes are needed in _us_ or _metric_settings.php. | #-----------------------W A R N I N G ----------------------------------# if you want to change anything further down the settings script make sure you know what you are doing #-----------------------W A R N I N G ----------------------------------# |
All forecast scripts can be tailored in the same way.
This part describes in general term all settings to be found on the different forecast pages. In the examples below we will use the settings for the met.no forecast. Other forecasts use similar setting-names. | ||
---|---|---|
All forecast pages contain different parts. Those are all set to be displayed by default. You can select to not display one or more of them.
You select for every part either: 0=not used | 1=displayed separately | 2=used but in tabs | ||
For every part you should set the value to 0 1 or 2 This example where the icon parts will be used, but it will be in a tab, not separate: #----------------------------------------------- # the row of icons / day part $metno_icons = 2; # 0=not 1=separate 2=tabs | ||
Setting and default value | Description | When to change |
$metno_icons = 2; | A row of icons with the most important weather-values. Often used as a separate part on a startpage. | As the icons are displayed horizontally, do not set the number of icons to high, otherwise all texts will be cramped. |
$metno_icons_tab_text = 'Icons'; | When the icons are displayed in a tab, this text used in the tab to identify the icons
No need to change this value, use the translation file. | |
$metno_icons_col = 10; | Number of icons = number 6 hour day-parts to be displayed. Morning - Afternoon - Eveninmg - Night So the default setting of 10 icons displays 2½ days | |
$metno_chart = 1; | Default the meteogram / chart is directly below the optional header/times at the top of the page |
You can show the chart also in a tab with the other information / tables to get a very small area with a lot of information. WXSIM forecast have multiple charts, they are displayed in a separate tab-set. |
$metno_meteogram_count = 10; | Number of 24 hour days in the chart. May seem busy when there are a lot of icons in a day | |
$metno_chart_height = '340px'; | Set the height for the meteogram/graph. 340 px is a minimum | |
$metno_chart_tab_text = 'Graph'; | javascript graph with most important weaher values. | |
$metno_tbl_mos = 2; | Every colom contains the most important weather-values for a 12 hour day/night period. | Normal tables are horizontal. This table is verticale. The tab it is in is also the default one to be displayed. |
$metno_tbl_mos_col = 10; | Number of 12 hour day-parts. | |
$metno_tbl_mos_tab_text = 'Forecast'; | The text to be used in the tab | |
$metno_tbl = 2; | If provided by the forecast-agency, a table with 6 hour values | |
$metno_tbl_tab_text = 'some text'; | Based on the contents, often "'Forecast 6 hour interval';" | |
$metno_tbl_height = '500px'; | As tables can be very long, you can restrict the height here. Longer tables will get a vertical scrollbar. | |
$metno_tbl_dtl = 2; | If provided by the forecast-agency, a table with one-hour or sometimes three hour data. | |
$metno_tbl_dtl_tab_text = 'some text'; | Based on the contents, often "'Forecast details';" | |
$metno_tbl_dtl_height = '500px'; | As tables can be very long, you can restrict the height here. Longer tables will get a vertical scrollbar. | |
Now some yes / no settings | ||
$metno_times = false; | Generation time of this and next forecast | Not available for all forecasts |
$metno_header = true; | The header line with station name and times | Not available for all forecasts |
$metno_show_uv = true; | The UV values can be supplied by the forecasting agency.
Or can be loaded from another source. | If cloud coverage is available the UV values are displayed inside the forecast, with expected and theoretical values. Otherwise a separate tab is used to show a 6 day UV forecast. |
Settings for display of precipitation, Rain. & Snow if available | ||
$metno_rain_if_zero = true; | When set to true individual rain amounts are shown and a '-' or 'n/a' when there is no rain forecasted. When the whole period has no rain, the complete line / colom is shown but contains no real data, only '-' or 'n/a' values | When set to false, an empty ('-' or 'n/a') line will be replaced with one message, like 'no rain for this period', adaptable by the language translation files. |
$metno_rain_skip_zero = false; | Default set to false it shows the rain lines, even when there is no rain. | True removes the lines with "no rain" values completely, including a header line if present. |
Some remaining settings | ||
$your_settings = '_metric_settings.php'; $your_settings = '_us_settings.php'; $your_settings = '_ca_settings.php'; | Choose which settings file you want to use | They differ in the pre-selected UOM's: metric or USA The _ca version is for Canada |
$needs_html = true; | The extra html head body tags are generated if used stand-alone. | You can switch that oof by using "false;" and only the forecast data html is generated. When used inside a template this setting is set to "false;" automatically. |
And no more changes are needed any further in the pages. | #-----------------------------------------------------------------------# STOP making changes here #-----------------------------------------------------------------------# |
Before you can run the forecast scripts you have to modify the gnereal settings describing your station and environement.
Only continue here if you modified the settings as described in the first tab: "general settings".