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.

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.

This page was updated Thursday, 29-Dec-2011 14:44

PHP/AJAX Website Template Set - WeatherLink Setup

Overview

There are two needed and one optional setup required in WeatherLink for the proper operation of your template set. Please follow the setup instructions in the sections below to have WeatherLink upload your WLtags.php file, your NOAA reports and station graphs, and optionally, your near-realtime AJAX update data file. In the examples below, I use three configuration entries to manage the WeatherLink files. Configuration 3 is used for the WLtags file, Configuration 2 is used for the graphics and NOAA reports, and Configuration 1 is used for the optional WLrealtime file uploads. You can choose ANY of the configuration numbers for your own WeatherLink setup.

Setup to upload WLtags.php

Select either the WLtags-comments.htx file (larger, but with comments) or the WLtags.htx (smaller, without comments) as the template file source from the distribution WXtags-template-files directory.

Then copy the chosen file in your weatherlink\[stationname]\templates directory and name it WLtags.htx

Configure WeatherLink for internet uploads by going to the WeatherLink, Setup, Internet Settings panel and press the Internet Connection Settings button

WeatherLink internet settings

Make sure to specify your FTP server name, your FTP userid and FTP password and tick the Internet Transfer Enabled checkbox. Press OK to save the settings.

Use the WeatherLink, Setup, Internet Settings... panel

WL Internet dialog

and select a new configuration entry and press Configure.

WLtags setup 1

On the Data Upload Profile (n), select Upload every 5 minutes and press Select Template Files.

WLtags setup 2
Press Add and select the WLtags.htx file in the file dialog.
Set the Extension of Converted ".htx" file to be php and press OK

Press OK on the Data Upload Profile to close it.

Then you can view the uploaded tags (after a WeatherLink upload cycle) on your website as:

http://www.yourwebsite.com/WLtags.php?sce=view (see the raw source after processing by WeatherLink)

http://www.yourwebsite.com/WLtags.php?sce=dump (see the contents of the resulting $WX[] array with WeatherLink tag names and data values

Note: if you experience issues with your website showing PHP error messages like "unexpected end in WLtags.php", it may be due to a slow FTP connection such that your browser is accessing the website as WeatherLink is uploading the WLtags.php, and has not yet finished.
To remedy this issue, you can upload your tags file to WLtags-new.php, make sure that WLtags.php is writable by PHP, and the V1.04 of top.php will automatically copy WLtags-new.php to WLtags.php to ensure you have a complete/fresh copy when your website is accessed.

Setup to upload graphs and NOAA reports

Use the WeatherLink, Setup, Internet Settings... panel

WL Internet dialog

select a new configuration entry and press Configure.

WLrealtime setup 1

On the Data Upload Profile (n), select Upload every 5 minutes.
Press Select Report Files

WLrealtime setup 2

Select the four NOAA report files. You can optionally specify a directory for the files to be uploaded into, and if you do, then change the Settings-weather.php entry $SITE['NOAACurDir'] to use that same directory.

Press OK to close the Report selection dialog, and press Select Images button on the Data Upload Profile dialog.

WL graphs

The graph selections shown above will be displayed in the wxgraphs.php page.
Uncheck the Solar Rad and/or UV graphs if your station does not have those sensors.
Press OK on the Historical Images dialog to close it.

Press OK on the Data Upload Profile to close it.
Press OK on the Internet Settings dialog to close it and save the settings.

Optional setup to upload WLrealtime.txt for AJAX updates

If you want to enable the near-realtime function (1 minute uploads) using the WLrealtime.htx file, then:

Select WLrealtime.htx as the template file source from the distribution WXtags-template-files directory.

Then copy the chosen file in your weatherlink\[stationname]\templates directory and name it WLrealtime.htx

Use the WeatherLink, Setup, Internet Settings... panel

WL Internet dialog

select a new configuration entry and press Configure.

WLrealtime setup 1

On the Data Upload Profile (n), select Upload every 1 minutes. Press Select Template Files

WLrealtime setup 2
In the Weather Template Files screen, press Add and select the WLrealtime.htx file in the file dialog.
Set the Extension of Converted ".htx" file to be txt and press OK

Press OK on the Data Upload Profile to close it.

You should be able to see this file as http://www.yourwebsite.com/WLrealtime.txt on your website

Then change the Settings-weather.php file to change the lines:

# $SITE['ajaxScript'] = 'ajaxWLwx.js'; // for AJAX enabled display
# $SITE['WLrealtime'] = 'WLrealtime.txt'; // directory and name of WeatherLink WLrealtime.txt file

to read as:

$SITE['ajaxScript'] = 'ajaxWLwx.js'; // for AJAX enabled display
$SITE['WLrealtime'] = 'WLrealtime.txt'; // directory and name of WeatherLink WLrealtime.txt file

and that will enable the AJAX function for updates.

CAUTION: Using 1-minute updates with WeatherLink may cause issues if you are using WeatherLink's built-in FTP.
If you're going to use this function, I strongly recommend you use Fling FTP Upload on automatic mode to upload all the needed WeatherLink files.

deformed-offering