Author Topic: How do I add the latest WeatherCat tags to the Saratoga Weather templates  (Read 2213 times)

nowait

  • Strong Breeze
  • ***
  • Posts: 133
  • Station Details: Davis Vantage Pro 2 Wireless (Heated) on a Snow Leopard Mac Mini
How do I update the Saratoga Weather templates to use the latest and greatest WeatherCat tags?

saratogaWX

  • Strong Breeze
  • ***
  • Posts: 156
  • Weather website programming enthusiast
    • Saratoga-Weather.org
  • Station Details: Davis VP1 +, iMAC 21, OSX 10.6.8
Re: How do I add the latest WeatherCat tags to the Saratoga Weather templates
« Reply #1 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
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis Vantage Pro Plus - FARS, Boltek-PCI/NexStorm, GRLevel3, WD, WL, VWS, Cumulus, Meteohub, WeatherSnoop, WeatherCat
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP