Trixology

WeatherCat => WeatherCat Web Templates => Topic started by: nowait on September 18, 2016, 10:36:03 PM

Title: How do I add the latest WeatherCat tags to the Saratoga Weather templates
Post by: nowait on September 18, 2016, 10:36:03 PM
How do I update the Saratoga Weather templates to use the latest and greatest WeatherCat tags?
Title: Re: How do I add the latest WeatherCat tags to the Saratoga Weather templates
Post by: saratogaWX on September 20, 2016, 04:11:05 AM
The easy way (which will generate $WX[] variables) is:
1) edit WeatherCat-webtags.txt   (it's in the WCT-plugin.zip distribution).
It is TAB delimited like
Code: [Select]
# 71392 bytes in WeatherCat_all_tags.html read in.
# WeatherCat-tags.txt generated by gen-wct-alltags.php
wvar CT$ Current temperature, temperature units and hourly change in brackets.
wvar CD$ Current dew point, dew point units and hourly change in brackets.
wvar CWC$ Current wind chill, wind chill units and hourly change in brackets.
wvar CX$ Current wind direction and units.
wvar CW$ Current average wind speed and units.
Add new lines to the file (near the beginning if you like) that have
wvar <tab> <WeatherCat-variable-name> <tab> <description of the variable>

Save the file and upload to your site.

2) run gen-WCTtags.php on your site.  Save the output file to replace your current template for WCTtags.php in WeatherCat.

3) use the newly defined variables as $WX['<variable-name-minus-trailing-$>'] in your PHP site on any wx....php page.

See http://saratoga-weather.org/wxtemplates/maint.php for additional info.

Best regards,
Ken