HAMweather 3 - US Threat Advisory Version 1.0 Plug-in
Contents:
The Threat Advisory plug-in has the same requirements as the core distribution.
You can download the US Threat Advisory plug-in from the HAMweather Plug-ins area at:
http://www.hamweather.net/hw3/hw3plugins?search=USThreatAdvisory
Installation of the threat advisory plug-in is fairly simple per the following steps:
| Step | Description |
| 1 | Confirm
that HAMweather 3.02 or newer is installed and working correctly. |
| 2 | Decompressing the Distribution:
The first step is to download the
"zip" distribution of HW3image from the HAMweather
Download Site and decompress the software package. You can use
Winzip or something similar. Once
unzipped you should have three directories and the files "readme.txt" and "license.txt". |
| 4 |
Upload the Files: The Installation requires the uploading of files to your server, specifically to the corresponding script side directories of the HW3 installation. You will need to upload the following files to your current HW3 installation:
|
There are two main ways to use the US Threat Advisory plug-in. The first is to call the HW3 script file telling it to fetch the advisory and display it using the default template.
PERL:
hw3.cgi?forecast=usthreatadvisoryASP:
hw3.asp?forecast=usthreatadvisoryPHP:
hw3.php?forecast=usthreatadvisory
With the above method you can edit the usthreatadvisory.html template to change the display you like.
The second way to use this plug-in is to call it with in a template. For instance if you want to add the current US Threat advisory to your main forecast page you could edit the zandh.html template and put the following in it:
%%FORECAST forecast=usthreatadvisory FORECAST%%
After the above line you could then use the plug-ins template variables (such as %%threat_advisory_level%%) to output the current advisory.
This plug-in has no additional parameters which can be passed to it besides the default HAMweather parameters.
The threat advisory plug-in offers the following template variables:
| Template Variable |
Description |
|---|---|
| %%threat_advisory_level%% | The current advisory level text: LOW, GUARDED, ELEVATED, HIGH, SEVERE |
| %%threat_advisory_color%% | The corresponding advisory levels color text name: Green, Blue, Yellow, Orange, Red |
| %%threat_advisory_color_hex%% | The corresponding advisory levels color in hex format. This is useful in HW3image or when setting a color in html. |
The threat advisory plug-in is pre-configured upon installation and should work with out error. But does include the following configuration settings in the fc_usthreatadvisory.ini (PHP users: fc_usthreatadvisory.ini.php) file:
| INI Line | Description |
| [ForecastTypes] | Begin the ForecastTypes section: This is the section where the information on HW3 should use the plug-in is stored. |
| usthreatadvisory=... | The Plug-in information line. See the HW3 Standard plug-in docs for more info.
NOTE: that the "15" in this
line corresponds with the max cache age in minutes. HW3 will fetch the
current level and then cache it for the 15 minutes before re-fetching.
This helps speed the plug-in and save bandwidth. Though when the level
does change this means your site could take up to 15 minutes to change to
the new value. |
| [URLs] | Begin the URLs section: This is the section where the information on the URLs HW3 should use to fetch the ASUS data is stored. |
| usthreatadvisory_url=www.dhs.gov | The domain name. |
| usthreatadvisory_prefix=/dhspublic/getAdvisoryCondition | The path to the data on the domain indicated by the usthreatadvisory_url |
You can find support for this plug-in via the online support forums, specifically the HW3plug-ins forum: