Customization: User Defined Variables

Once you have installed HAMweather and started using it, you will then want to begin customizing it to you specific needs.  Customization of HAMweather comes in several forms.   You can customize the various weather icons, templates, create themes and even allow for multiple  users to have their own customized weather sites.  The following sections review the various aspects of this customization process so that you can perform the customization yourself, but if you prefer, HAMweather, LLC offers customization services.  These services can include custom template and icon design or even the creation of custom themes.  For more information or request customization services refer to the HAMweather, LLC customization page.

Customization : Templates

Customizing the HAMweather templates is probably the most common and easiest way to customize HAMweather to match you needs.  The templates that come with the HAMweather distribution are in the template directory of the HAMweather CGI path. (Yes these templates do belong with the cgi scripts, for web visitors will not be viewing them directly.)  In this directory you will find several templates that came with the HAMweather distribution or from the Pro .

You may now be wondering, "How do I know what each template is used for?"   The  following table reviews what each template in the distribution is used for. You can actually modify what templates are used by using the HAMweather web administration.

HAMweather Templates
Template Name Description
ccinternational.html Used to display the international countries that metar observations are available for..
ccus.html Used to display the states that metar observations are available for.
hourly.html Used to display the hourly conditions or the metar observations
metarlist.html Used when displaying all the locations in a country or state that the metar observations are available for.
noforecast.html Used when the forecast for a city could not be found.
other.html Generic template used when displaying state level text based reports, warnings, watches, state forecasts, etc...
otherinfo.html Used to display the other national weather information that is available.
statemap.html Used when displaying a regional or state image map.. which is clickable for individual zone forecasts
usother.html Generic template used when displaying national level text based reports, warnings,  etc..
zandh.html Used when displaying both the zone forecast and hourly conditions.
zone.html Used when displaying zone forecast.
HAMweather Pro   Templates
NOTE: The HAMweather Pro  uses modified versions of the normal HAMweather templates plus the following.
nf.html Used when displaying the National Forecast Map.
ns.html Used when displaying the National Summary Map.
radar.html Used when displaying the National Radar Map.
uswarning.html Used when displaying the National Warning Map.

These template can be designed using most any web authoring utility.  The difference between making an html page and the template is that the templates are a "basic" design with variable names inserted where HAMweather is to insert data.

The variables used by HAMweather use the following format:  %%variablename%%

Thus, If you want the current state to be outputted in the template then add %%state%% to the template where you would like the current state name to be placed.

There are many variables that can be used in your HAMweather templates.   The following table lists them.  Some variables are only available for certain forecast types.  This is indicated as well.

Variable Name Description
Standard Variables
%%scripturl%% The URL to the hamweather.cgi script
%%getstateurl%% The URL to the getstate.cgi script
%%metarlisterurl%% The URL to the metarlister.cgi script
%%emailstorerurl%% The URL to the hw2email_storer.cgi script
%%mapimagesurl%% The URL to the HAMweather Pro national maps
%%place%% Current Place needing forecast for
%%lcplace%% Current Place needing forecast for with proper casing
%%lplace%% Current place with proper html encoding (spaces turned to "+", etc)
%%state%% Current State needing forecast for. (abbreviation) Note: Even is user types in the full state name this variable will only be the two letter abbreviation.
%%lcstate%% Current State needing forecast for with proper casing and full name.
%%zone%% The weather zone number supplied by user. (Only available is supplied)
%%zforecast%% The text based portion of the forecast
%%forecastdate%% Date of the needed forecast
%%forecastneeded%% The actual forecast type requested.
%%lcforecastneeded%% The actual forecast type needed with proper casing
%%user%% The current user name
%%theme%% The current theme
Variables for use with the Zone Forecasts Only
%%iconrow%% The table row that holds all the weather icon coding for the zone forecast
%%daytitlerow%% The table row that holds the corresponding day titles for the weather icon row
%%weatherrow%% The table row that holds the corresponding weather conditions for the weather icon row
%%temprow%% The table row that holds the corresponding temperatures for the weather icon row.
Variables for use with the Hourly and Metar Observations Only
%%hicon%% URL to the icon for current weather condition
%%hname%% The name of the current place
%%hsky%% The  sky condition (weather condition)
%%htempf%% The temperature in Fahrenheit
%%htempc%% The temperature in Celcius
%%hdewptf%% The dew point in Fahrenheit
%%hdewptc%% The dew point in Celcius
%%hrh%% The relative humidity
%%hwind%% The wind speed and direction
%%hpressure%% The barometric pressure
%%hremarks%% Possible additional Hourly remarks
%%hforecastdate%% The Hourly forecast date and time
Variable for use with the hwgetstate.cgi Script Only
%%getstateimagesurl%% This provides the URL to the proper state image when displaying a state image map that can be clicked to get a zone forecast
%%imagemap%% This is the actual image map coding for the above map
%%placestable%% This is a table of the places in a state that the forecast can be retrieved for.. in Text format (This is not fully implemented as of HW2 Beta 1)
Variables for use with the metarlister.cgi Script Only
%%list%% This is the actual list of places either in a state or country that the metar observations are available for.
Variables for use with the hw2email_storer.cgi Only
%%address%% This is the email address that is being subscribed or unsubscribed
Variables for use with HAMweather Pro  Only
%%nationalsummary%% Table containing the current condition summary for requested cities. Includes City Name, Weather condition and temp on each row.  Used with the national summary.
%%nationalforecast%% Table containing the weather forecast for requested cities. Includes City Name, Weather condition and temp on each row.  Used with the national forecast.
%%warningtable%% Table of the states that have an active warning.  Each state is a hyperlink to the individual state warnings page.  Used with the National warning (uswarnings) report.
%%usradar%% The URL to the national Radar image
%%radarzoneimg%% The URL to the regional radar image
Used Defined Variables
%%hwvxxxx%% HAMweather allows user defined variables to be passed and inserted into the output.   Refer to the User Defined Variables page for more info.
HAMweather Include
%%hwi=xxxx%% HAMweather allows you to include files in the output. This can be used to have a custom header or footer for all the templates.  Thus allowing you so simply edit a couple files for the entire weather site.

Now to customization of the icons.