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 Sunday, 25-Nov-2012 4:59 PM

PHP/AJAX Website Template Set - Weather-Display Setup

Overview

There are three needed setups required in Weather-Display for the proper operation of your template set. Please follow the setup instructions in the sections below to have Weather-Display upload your testtags.php file, your AJAX update data file (clientraw.txtt) and your graph files for wxgraphs.php page.

Note: the translation features of the templates depend on having English as the language used by Weather-Display for uploads of data/pages to the website. If you are running Weather-Display in a language other than English, then make sure to set WD, Setup, Language, Use English for Reports and Scripts as Yes to enable the template set to run properly.

Setup to upload testtags.php WD tags file

Note: The name 'testtags.php' has been kept for historical reasons, even though the name rightly should be WDtags instead of testtags .. but a lot of WD folks using the existing WD/PHP/AJAX template sets are used to calling it testtags, so humor me and keep it testtags.php for now.

Copy testtags.txt file from the distribution WXtags-template-files/ directory to your c:\wdisplay\webfiles directory

For recent versions of Weather-Display, Brian has added an express setup to get this file processed and uploaded as testtags.php:

Open Weather-Display, Control Panel, Web Files/Web Page, Web Files Setup#1 TAB

WD setup 1

Tick: 'Create and upload testtags.txt as testtags.php'

and tick the checkboxes shown in the image above.

Select the Real Time Client FTP/AJAX/Weather Display Live Setup TAB

Clientraw Setup
Set the checkboxes as shown above. Particularly try to use the Rename the file as temporary file option which will make your clientraw.txt file more available on your website for use. Make sure your station name in Your weather station name... text box does NOT contain a hyphen (-) as that will cause the AJAX routine to be unable to parse the update time in your clientraw.txt.

Press OK to save the settings.

Now make sure your FTP uploads are configured and an overall schedule to upload is set by:

Click on the 'FTP & Connections/METAR/NOAA' button on the Control Panel and select the Connections TAB

WD FTP 1

Your checkboxes should match the ones shown above. Now select the Web Files Upload times and Avg/Ext TAB

WD FTP 5

Set an upload schedule of every 5 minutes, and tick all the checkboxes to the right

Press OK to save the settings.

Press OK to close the Control Panel.

Then you should now see the uploaded tags on your website as:

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

If you don't see the testtags.php file on your site (or it is still the sample testags.php included with the distribution of the WD-plugin, then you may be forced to do the next section "Manual setup of testtags.php upload".

Note: if you experience issues with your website showing PHP error messages like "unexpected end in testtags.php", it may be due to a slow FTP connection such that your browser is accessing the website as Weather-Display is uploading the testtags.php, and has not yet finished.
The best way to fix this is to have Weather-Display use 'Rename the file on the server after uploading' as the basic FTP mode as shown in the Connections TAB image above.
If your website doesn't support this mode, then to remedy this issue, you can upload your tags file to testtags-new.php, make sure that testtags.php is writable by PHP, and the V1.04 of top.php will automatically copy testtags-new.php to testtags.php to ensure you have a complete/fresh copy when your website is accessed.

Manual setup of testtags.php upload

Note: use this method if you are running an older version of Weather-Display which does not have the "Create and upload testtags.txt as testtags.php" option shown on the Web Files/Web Page, Web Files Setup#1 TAB illustrated above.

Copy testtags.txt file from the distribution WXtags-template-files/ directory to your c:\wdisplay\webfiles directory

Use the Weather-Display Control Panel,
Web Files/Web Page/Real Time FTP/WDL,
Custom Web Page Setup TAB

WD manual 1

In the 'Special file conversion' area

put: testtags.txt in Local File 1 (or 2 or 3)
put: testtags.php in Remote file name 1 (or 2 or 3 to match where testags.txt is placed)

Turn the switch to ON

Press Test

Press OK to save the settings.

You may also need to set an upload time schedule in
Weather-Display, Control Panel, Internet File Creation & Uploads, Setup Page#2 TAB

Select file#29 (Special custom file conversion) and press the SET button to open the setup dialog

Establish a file creation and file upload interval, and turn the Override switch to ON.

This procedure should work if you have also setup a routine HTML upload interval using the Web Files Upload times and Avg/Ext TAB shown in the first section.

Setup to use METAR (and Solar) for conditions reporting

Overview: you have to set Weather-Display to regularly get conditions data from a nearby METAR station, then have it use that data for your conditions. If you have a Solar sensor, you can also use it to override METAR cloud conditions based on current solar radiation value v.s. expected value.

METAR setup

Open Weather-Display, Control Panel, FTP & Connections, METAR/NOAA, METAR Download TAB

METAR setup

Select a metar from the Metar station list.
Ensure that selected Metar appears in the 'Use this metar...' text box, and check the 'Use this metar for local sky/icon conditions' box.
Check the 'Use the metar to update WD's main weather condition report'
Turn the METAR switch to ON
Press Test
Press OK to save and close the dialog.

Conditions icon setup

Open Weather-Display, Control Panel, Summary Images&Icons, METAR TAB

Icon 1

Check the boxes noted above.
Press OK to save and close the dialog.

Solar Sensor setup for daytime icon

Open Weather-Display, Control Panel, Solar Sensor, Max Solar Time of Day/Time Zone Lat/Long. Fudge offset TAB

WD Solar 1

Set up the latitude and longitude for your station.
Note: use the astronomical convention for longitude so if your station is -122.0 longitude (West of GMT) use +122 as the longitude.
if your longitude is East of GMT (like +22.0), then use -22.0 in the longitude box.
Do the same logic (astronomical) for the timezone offset (+8 = Pacific Time, -1=Central Europe)
Tick the "Update the solar value from this max reading for lat/long and time of day" checkbox
Set the main switch to ON

Switch to the Thresholds/Icon/Solar Description TAB

WD Solar 2

Make your settings correspond to the ones above. You don't have to enable Finetune Times or use the Minutes after/before sunrise/set if your Solar sensor is unshaded by trees or obstructions during the entire day. I have them set above because the neighbor's hedge trees to the west blocks the solar sensor about 60 minutes before civil sunset time.

Press OK to save the settings and exit the dialog.

Open Weather-Display, Control Panel, Summary Images&Icons, Icon/VP Forecast/Weather Description Setup TAB

ICON 2

Tick all the checkboxes in the "Icon/Conditions From Solar Data" section.

Press OK to save the setting and close the dialog box.

Press OK on the Control Panel to close the dialog box.

With the METAR and Solar both setup, you will have Daytime cloud cover estimated from your Solar Sensor, and Night time cloud cover from your nearby Metar. Weather-Display will override the icon/text description for your station's reports based on Rain, Fog or high Wind.


deformed-offering