Support Z Weather

Home Support ZWeather Introducing the Z Weather Plugin
Introducing the Z Weather Plugin PDF Print E-mail
Sunday, 05 October 2008 18:50

The Z Weather plugin (or mambot in Joomla 1.0) is a new way in version 6 of Z Weather to display weather information on your website, by directly displaying the weather information within your content articles or through a custom HTML module. The plugin has access to over 50 weather data items, including multiple period data in the forecast data items.At the end of this articleis a list of the Z Weather variables supported by the plugin, which is data directly from the XML dataof the National Weather Service.

 

The syntax for using the plugin is:

{zweather var=var_name,key=val,loc=id}

The "var" field is required, but the "key" and "loc" fields are optional. When specifying more than one field, separate them with the comma character, ",".  The "var" field specifies one of the plugin variables listed at the end of this article. The "key" field specifies a period value if a variable has more than one period (multi-day values, for example). The "loc" field is used to specify the location id if multiple Z Weather locations are being used. If the "loc" field is not specified, the default Z Weather location is used.

Examples

If you wish to display the currently observed weather conditions (i.e. sunny, cloudy) for the default weather location, for example, you would enter the following in your article:

{zweather var=o_weather}

If you wish to display the maximum and minimum temperatures for today's forecast, you would use the 24 hour forecast variables f24_maxtemp and f24_mintemp, respectively:

High temperature: {zweather var=f24_maxtemp}, Low temperature: {zweather var=f24_mintemp}

If you wish to display the weather forecast for today and tomorrow, you would use the "key" setting to set the period #:

Today's Forecast: {zweather var=f24_weather,key=0}, Tomorrow's forecast: {zweather var=f24_weather,key=1}

When no "key" setting is set, the first key value, "0", is used.

If you are working with multiple locations, use the "loc" setting to specify the specific location id instead of using the default location. For example, to display the weather forecast for location id=1:

Weather forecast for New York, NY: {zweather var=f24_weather,loc=1}

When no "loc" setting is specified, the default location is used. The default location is set in the administrator screen.

Look for more examples in the Z Weather plugin examples article, which includes the code from the examples that you can copy and modify for your own site.

Z Weather Plugin Variables

The variables described below are used in the "var" field for the plugin.  All plugin variables, except for the observation variables, support multiple keys.  The forecast variables use multiple keys for multiple weather periods. The alert variables use multiple keys when multiple alerts have been posted for the local region. 

 
Variable Name
Description
24 Hour Variables
f24_lastupdate last weather update time
f24_maxtemp maximum temperature
f24_mintemp maximum temperature
f24_tempunit temperature unit
f24_weather weather condition
f24_icon weather icon
f24_starttime period starting time
f24_endtime period ending time
f24_pop probability of precipitation in 12 hr incr.
12 Hour Variables
f12_lastupdate last weather update time
f12_maxtemp maximum temperature
f12_mintemp maximum temperature
f12_tempunit temperature unit
f12_weather weather condition
f12_icon weather icon
f12_starttime period starting time
f12_endtime period ending time
f12_pop probability of precipitation in 12 hr incr.
f12_periodname period name
3 Hour Variables
f3_lastupdate last weather update time
f3_temp hourly temperature
f3_tempunit temperature unit
f3_apptemp apparent temperature
f3_icon weather icon
f3_starttime period starting time
f3_weather weather condition
f3_weatheri weather intensity
f3_weatherq weather qualifier
f3_weathera additional weather condition
f3_weatherai additional weather intensity
f3_weatheraq additional weather qualifier
Observation Variables
o_location location
o_stationid station id
o_latitude station latitude
o_longitude station longitude
o_timestr observation time
o_time822 observation time in RF822 format
o_weather observation weather
o_tempf observation temperature in farenheit
o_tempc observation temperature in celcius
o_tempstr observation temperature string
o_heatindexf observation heat index in farenheit
o_heatindexc observation heat index in celcius
o_heatindexstr observation heat index string
o_windchillf wind chill in farenheit
o_windchillc wind chill in celcius
o_windchillstr wind chill string
o_pressuremb barometric pressure in mb
o_pressurein barometric pressure in in
o_pressurestr barometric pressure string
o_humidity relative humidity
o_windstr wind string
o_windir wind direction
o_visibility visibility in miles
o_iconbase icon path
o_iconname icon file name
Alert Variables
a_description alert description
a_title alert title
a_link alert link
Last Updated on Thursday, 09 October 2008 09:48