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, 13-May-2020 1:30 PM

PHP/AJAX Website Template Set - Settings-weather.php - Cumulus-Plugin

The configuration for Settings-weather.php discussed here is for the Cumulus-Plugin for use with Cumulus 1.9 and CumulusMX (3.x).

<?php
#---------------------------------------------------------------------------
#  required settings for Cumulus software
#---------------------------------------------------------------------------
$SITE['WXtags']        = 'CUtags.php';    // for weather variables
$SITE['ajaxScript']     = 'ajaxCUwx.js';   // for AJAX enabled display
$SITE['realtimefile']   = './realtime.txt';  // directory and name of Cumulus realtime.txt file
$SITE['graphImageDir']  = './images/';     // directory location for graph images with trailing /
#---------------------------------------------------------------------------
# For NOAA reports
$SITE['NOAAdir']        = './Reports/';   // relative location of the NOAA report files
# Weather Station sensors and options for dashboard
$SITE['conditionsMETAR'] = 'KSJC';  // set to nearby METAR for current conditions icon/text
#   comment out conditionsMETAR if no nearby METAR.. conditions icon/text will not be displayed
$SITE['overrideRain']   = true// =true then rain rate will set rain words instead of METAR rain words
#                               // =false - no change to METAR rain words (station rain rate not used)
#
#
$SITE['feelslike']      = 0;     // =0 use HeatIndex, =1 use Humidex, =2 use Apparent Temperature
$SITE['DavisVP']    = true;  // set to false if not a Davis VP weather station
$SITE['UV']        = true;  // set to false if no UV sensor
$SITE['SOLAR']        = true;  // set to false if no Solar sensor
#
##########################################################################
# end of configurable settings
?>

Cumulus Configuration settings in Settings-weather.php

$SITE['WXtags'] = 'CUtags.php';
This setting specifies the filename of the Cumulus weather tags file. This file is uploaded through Cumulus and contains the current weather data associated with Cumulus HTML tags. The data is loaded in a $WX[] array with the Cumulus tag names used as the key to access the data in the associative array.
$SITE['ajaxScript'] = 'ajaxCUwx.js';
This setting specifies the filename of the AJAX JavaScript that will read the realtime.txt file and update your pages with new data.
Comment out this setting (by placing either # or // in the front of this line) if you do not want AJAX updates active on your website pages.
$SITE['realtimefile'] = './realtime.txt';
This setting specifies the relative file location for the Cumulus realtime.txt file. It is used by the thermometer.php for display of current/high/low temperature graphic.
$SITE['graphImageDir'] = './images/';
This setting specifies the relative file location of the directory containing the Cumulus graph images (used by the wxgraphs.php page)
$SITE['NOAAdir'] = './Reports/';
This setting specifies the relative file location of the NOAA reports files. It is used by the wxnoaaclimatereports.php page.
Note: you will need to configure Cumulus (or your separate FTP software) to update this directory from the c:\Cumulus\\Reports directory with recently changed files.(Note: Cumulus 1.9.2-b1007 or higher required for the NOAA-style reports).
$SITE['conditionsMETAR'] = 'KSJC';
This setting specifies the ICAO/name of the near-by METAR station that will be used to provide current conditions (weather/sky cover) for the ajax-dashboard and ajax-gizmo.
A list of nearby METAR names can be found using the find METAR query script.
Comment out this setting if you do not want a conditions icon and conditions text to display in the ajax-dashboard and ajax-gizmo.
$SITE['overrideRain'] = true;
This setting specifies whether the weather station rain-rate should display the rain words based on the current rain rate.
=false : METAR rain words (if any) will be displayed as current condition.
=true : current station rain rate will set words (as shown below) and rain words direct from METAR are removed. Icon is also set appropriately.
Words and selection criteria:
"Moderate Drizzle" when rain rate is = 0.0 per hour and <#LastRainTipISO> is < 30 minutes ago.
"Light Rain" when rain rate is > 0.0 and < 2.5 mm (0.098 in) per hour
"Moderate Rain" when rain rate is >= 2.5 mm (0.098 in) and < 7.6 mm (0.30 in) per hour
"Heavy Rain" when rain rate is >= 7.6 mm (0.30 in) per hour and < 50 mm (2.0 in) per hour
"Violent Rain" when rain rate is >= 50 mm (2.0 in) per hour
If this setting is ommitted from Settings-weather.php, the default will be assumed as 'true' to enable the function.
If enabled, the rain words from the METAR will be removed, and the above words used based on the current rain rate.
$SITE['feelslike'] = 0;
This setting specifies which temperature will be used for the upper value in the 'Feels Like' display on the dashboard.
=0; will use Heat-Index as the upper temperature (default)
=1; will use Humidex as the upper 'temperature'
=2; will use Apparent Temperature (Australian BOM) as the upper temperature.
The upper temperature will be shown if the current temperature is >= 27C.
Note: the ajaxCUwx.js script must have var useFeelslike = N; with the same value as specified in $SITE['feelslike'] above.
$SITE['DavisVP'] = true;
This setting specifies whether you have a Davis VP/Vue station.
= true means you have a Davis VP/Vue station
= false means you do not have a Davis VW/Vue station and the display of the VP forecast on the ajax-dashboard is suppressed.
$SITE['UV'] = true;
This setting specifies whether your station has a UV sensor.
= true means your station has a UV sensor.
= false means your station does not have a UV sensor which will result in the ajax-dashboard displaying a UV forecast in that area instead of the UV sensor value.
$SITE['SOLAR'] = true;
This setting specifies whether your station has a Solar sensor.
= true means your station has a Solar Radiation sensor.
= false means your station does not have a Solar Radiation sensor which will result in the ajax-dashboard displaying a UV forecast in that area instead of the Solar sensor value.

CumulusMX language translation additions

If you're using CumulusMX, the wxgraphs.php page will need some additional translation entries in language-LL.txt to complete the display of the CumulusMX graphs/legends in the selected language. The entries needed are for:

langlookup|Trend Graphs|Trend Graphs|
langlookup|Wind Chill|Wind Chill|
langlookup|Heat Index|Heat Index|
langlookup|Indoor|Indoor|
langlookup|Daily Temperature|Daily Temperature|
langlookup|Daily Temp|Daily Temp|
langlookup|Wind Direction|Wind Direction|
langlookup|Bearing|Bearing|
langlookup|Avg Bearing|Avg Bearing|
langlookup|/hr|/hr|
langlookup|Theoretical Max|Theoretical Max|
langlookup|Sunshine Hours|Sunshine Hours|
langlookup|Graphs generated by|Graphs generated by|
langlookup|Click on a button to show the corresponding graph below.|Click on a button to show the corresponding graph below.|

The other entries used by the CumulusMX wxgraphs.php page should already be in the default language files. You can always run wxgraphs.php?show=missing on your site, then view-source the page. The missing entries will be shown at the bottom of the view-source page.

deformed-offering