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 Tuesday, 20-Mar-2012 11:59

PHP/AJAX Website Template Set - WeatherCat Setup

Overview

Note: WeatherCat is the successor software to LWC (Lightsoft Weather Center) software. The template set will NOT work with LWC as it is missing tags used by the templates. You will need to be running WeatherCat V0.95, Build 152 (or later) to run the template correctly.

There is one needed and one optional setup required in WeatherCat for the proper operation of your template set. Please follow the setup instructions in the sections below to have WeatherCat upload your WCTtags.php file and generated station graphs, and optionally, your near-realtime AJAX update data file (WCT_realtime.txt)..

Copy distribution tag files/directories

Use Finder to open the WCT-plugin.zip and the WXtags-template-files/ folder inside to find two sub-folders:

templates/ (containing WCTtags.php ) and
realtime/ (containing WCT_realtime.txt)

Use the Finder to copy the templates/ and realtime/ directories to convenient locations on your system.
You can use ~/public/ (as I do), or to the default templates area for WeatherCat.
It is important to copy the directories with contents for both, and do not to merge the contents to a single directory.
You can use:~/public/templates for one and ~/public/realtime for the second one.

If you already have WeatherCat configured to process and upload templates to your website, then simply copy the WCTtags.php file to your existing template directory instead of using the templates/ directory shown above, then skip to the setup to upload the realtime file.
Do create a new unique directory for the realtime/ directory that is not in the tree for your existing template directory -- this will prevent double-processing of the realtime/WCT_realtime.txt file.


After setup is complete, WeatherCat will process all the files in templates/ for tags, and upload to your website. The files in realtime/ will be processed separately, and at a more rapid frequency to provide the realtime information for the AJAX script (ajaxWCT.js) to update the pages between reloads of the PHP page in the browser.

Setup to upload WCTtags.php

Configure WeatherCat for internet uploads by going to the WeatherCat, Preferences, Online, Custom Web, Main panel .

WeatherCat internet settings

Press the Set HTML Source button, and use the popup dialog to navigate to the templates folder you created (from above) that contains the WCTtags.php template file.

Optional: Press the Set Save Path to select a different path for WeatherCat to save the processed WCTtags.php and generated graphics. You can use the default folder if you like, or respecify it here.
Note: If you respecify, DO NOT select either the templates/ or realtime/ folder as the new destination. WeatherCat would overwrite the WCTtags.php and/or WCT_realtime.txt files and so stop reporting 'current' weather conditions.

Set the Update Web Pages to 5 minutes, and tick the Sync. to Weather Fetch checkbox.

Now press the Edit FTP Details button to show the FTP dialog:

WeatherCat FTP setup

Enter your FTP user name, FTP Password, and the URL to your weather website in the appropriate places.

Press the Test button to have WeatherCat try out the entered credentials on your website. If successful, close the dialog.

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

http://your.weather.website.com/WCTtags.php?sce=view (see the raw source after processing by WeatherCat)

http://your.weather.website.com/WCTtags.php?sce=dump (see the contents of the resulting $WX[] array with WeatherCat tag names and data values

Note: if you experience issues with your website showing PHP error messages like "unexpected end in WCTtags.php", it may be due to a slow FTP connection such that your browser is accessing the website as WeatherCat is uploading the WCTtags.php, and has not yet finished.
To remedy this issue, you can rename templates/WCTtags.php to templates/WCTtags-new.php. Make sure that WCTtags.php on your website is writable by PHP (permissions 666), and the V1.04+ of top.php will automatically copy WCTtags-new.php to WCTtags.php to ensure you have a complete/fresh copy when your website is accessed.

Optional setup to upload WCT_realtime.txt for AJAX updates

If you want to enable the near-realtime function using the WCT_realtime.php file, then:

Use the WeatherCat, Preferences, Custom Web, Additional Files. panel

WL Internet dialog

Press the Add button to show the selection panel:

WeatherCat Realtime config

Press the Set Path button to open a Finder dialog. Navigate to the templates/WCT_realtime.txt file, and close the finder dialog.
Tick both the Enabled and FTP dialog boxes, and set a period (example of 0.25 means uploads every 15 seconds).
Press OK to save the setting. You should now see an entry in the Preferences panel similar to that shown above.

You should be able to see the realtime file as http://your.weather.website.com/WCT_realtime.txt on your website


deformed-offering