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 Monday, 25-Jul-2011 1:15 PM

PHP/AJAX Website Template Set - Virtual Weather Station Setup

Overview

There are three needed setups required in VWS for the proper operation of your template set. Please follow the setup instructions in the sections below to have VWS upload your VWStags.php file, your AJAX update data files (wflash.txt, wflash2.txt) and your graph files for wxgraphs.php page. You may optionally generate a new VWStags.htx file from VWS to contain data for METAR stations you have selected.

The setup instructions for VWStags.php and the graphics files assume you are using VWS's built-in FTP to upload the files. If you are using a third-party FTP to upload the files instead, then omit the setup instructions to set an FTP schedule for the VWStags.php and graphics files and continue to have VWS just create, but not upload the files for you.

Setup to upload VWStags.php

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

Then place the chosen file in your c:\vws\templates directory

Use the VWS, Internet, HTML Settings panel

VWS tags

and place a new entry to process as:

Template: c:\vws\template\VWStags.htx
HTML filename: c:\vws\root\VWStags.php

Set Update Time to 5 minutes.

Press Update, then Close to exit the dialog.

Use the VWS, Internet, FTP Send(upload) File panel

VWS tags FTP

Set the From Location (local drive) to : c:\vws\root\VWStags.php
Set the To Location(server) to: /

so that the processed file VWStags.php is uploaded to your website.

Press the Calendar button to the far right and on that dialog

VWStags schedule

Set a schedule for uploading the VWStags.php file to 5 minutes.
Press Close to enable the schedule.
Press Close on the FTP Send dialog to save the setup.

Then you should be able to see the uploaded tags on your website as:

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

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

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

Enable WeatherFlash data uploads for AJAX updates

Note: Skip this section if you already have WeatherFlash installed

Inside the VWS-plugin.zip distribution file under the WXtags-template-files directory, you will find a wflash directory.
Upload the entire wflash directory structure to /wflash on your weather website.
When successful, you should have on your website (at the document root) these directories:

/wflash
/wflash/Config
/wflash/Data
/wflash/scripts

and their contents

Use VWS, Internet, WeatherFlash dialog

VWS realtime

Set the UserID to 'DEMO' (all caps)
Set the timer to 5 seconds

In the Active Server Page section:
put the full url in the text box for the wxf-submit.php script like

http://www.yourwebsite.com/wflash/scripts/wxf-submit.php

Tick: Activate

press Close to save the setting and close the dialog box.

You should now be able to see the updates happening at

http://www.yourwebsite.com/wflash/Data/wflash.txt and
http://www.yourwebsite.com/wflash/Data/wflash2.txt

you can also run the configuration test script provided in the wflash directory:

http://www.yourwebsite.com/wflash/wflash-filetest.php

which should show

"Test concluded .. no errors found. WeatherFlash data uploads should work correctly based on permissions."

Note: if you used the wflash/ name on your website, then no further changes are needed in the Settings-weather.php or the ajaxVWSwx.js AJAX script and you should have AJAX updates available on your website.
If you changed the name or location on your website, make sure you update both Settings-weather.php and ajaxVWSwx.js with the new directory name.

Setup graphs files for display on wxgraphs.php

Use the VWS, Modify Display, Graph dialog

VWS graphics

Set the checkboxes to those shown in the above image, and press Close to save the settings.

Use the VWS, Internet, FTP Jpeg Settings dialog

VWS graphics FTP

Press the Calendar button under FTP Automated Schedule

VWS Graphs FTP Schedule

Select Schedule, set Check Every 5 minutes, press Close to save settings.
Press Close on Jpeg FTP Settings dialog to save settings.

Now view http://www.yourwebsite.com/wxgraphs.php page and you should see all your graphs displayed.

Generate your own VWStags.php

This procedure is optional, but recommended if you have setup VWS to obtain nearby METAR station data for you. If that is the case, then you can generate a new VWStags.htx file which will contain the custom tags for the selected METAR stations so you can use that data in your custom wx....php pages.

Use the VWS, Internet, HTML tags dialog

VWS custom tags

Press the Save File icon next to the "Complete Tag List" legend.

That will open a tags.txt file in notepad. Save that file as 'tags.txt' to your document root of your website.

Press Close to exit the HTML Tags dialog.

Upload the new tags.txt file to your website.

To generate a new VWS-tags.htx file, use your browser to go to either:

http://www.yourwebsite.com/gen-VWStags.php?comments=yes (produces a larger file with comments)

http://www.yourwebsite.com/gen-VWStags.php?comments=no (produces a smaller file without comments)

In the browser, do a 'Save As...', select the type as 'Text', and save the file to your c:\VWS\templates directory to replace the VWStags.htx file there.

Comment: there is a problem with the tags.txt file generated by VWS that you should be aware of: the list doesn't contain the ^vzl###^ (Yesterday Low name-of-variable) entries. The gen-VWStags.php script adds those missing entries to the resulting VWStags.htx file.
The problem was reported to the VWS author.


deformed-offering