<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="home" title="HomePage" href="HomePage.html" />
<link rel="help" title="HowToUseWiki" href="HowToUseWiki.html" />
<link rel="copyright" title="GNU General Public License" href="http://www.gnu.org/copyleft/gpl.html#SEC1" />
<link rel="author" title="The PhpWiki Programming Team" href="http://phpwiki.org/ThePhpWikiProgrammingTeam" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="en" />
<meta name="robots" content="noindex,nofollow" />
<meta name="language" content="en" />
<meta name="document-type" content="Public" />
<meta name="document-rating" content="General" />
<meta name="generator" content="PhpWiki" />
<meta name="PHPWIKI_VERSION" content="1.3.14" />

<link rel="stylesheet" type="text/css" charset="iso-8859-1" href="phpwiki-printer.css" />
<title>PhpWiki - Php Weather Plugin</title>
</head>
<body>

<div id="header">
  
<!-- Page title -->
<h1>Php Weather Plugin</h1>
</div>
<div id="content">



<div class="wikitext"><h2>Synopsis</h2>
<p class="tightenable">The PhpWeatherPlugin is a <a href="WikiPlugin.html" class="wiki">WikiPlugin</a> that uses <u title="Empty link to: PhpWeather" onmouseover="window.status=&quot;Empty link to: PhpWeather&quot;; return true;" onmouseout="window.status='';return true;" class="wikiunknown">PhpWeather</u> to display
a block of text with the current weather for some airport in the
world. It looks like this:</p>
<div class="plugin tightenable" id="PhpWeatherPlugin2"><div class="errors"><strong>Plugin PhpWeather failed.</strong> You have to define PHPWEATHER_BASE_DIR before use. (config/config.ini)</div>
</div>
<h2>Plugin Arguments</h2>
<dl><dt class="tightenable bottom"><strong>menu</strong></dt>
<dd class="tightenable top">Set this to <tt>true</tt> to have the plugin generate a menu after the
report. The user will able to select a country from this menu, and
after that, an airport and a language. The default value is
<tt>false</tt>.</dd>
<dt class="tightenable bottom"><strong>icao</strong></dt>
<dd class="tightenable top"><p class="tightenable top bottom">Use this to pre-select a specific airport instead of using the
default one which is <tt>EKAH</tt>. If you want the user to be able
to change the station using the menu, then you have to use this as</p>
<pre class="tightenable top bottom">
&lt;?plugin PhpWeather menu=true icao||=EKYT ?&gt;</pre>
<p class="tightenable top bottom">so that the value can be overwritten when the user submits the
form. If you just use</p>
<pre class="tightenable top bottom">
&lt;?plugin PhpWeather menu=true icao=EKYT ?&gt;</pre>
<p class="tightenable top bottom">then nothing will happen when the user selects another station from
the list.</p>
</dd>
<dt class="tightenable bottom"><strong>cc</strong></dt>
<dd class="tightenable top"><p class="tightenable top bottom">Specify the country code. You can use this if you want pre-select a
different country than the one specified in the ICAO. So using</p>
<pre class="tightenable top bottom">
&lt;?plugin PhpWeather menu=true cc||=GB icao||=KTTS ?&gt;</pre>
<p class="tightenable top bottom">will show the current weather at the NASA Shuttle Facility, United
States (<tt>KTTS</tt>) and at the same time give the user a list of
stations in the United Kingdom. As the example shows, then you
should use <tt>cc||=XX</tt> when combining it with <strong>menu</strong> set to
<tt>true</tt>.</p>
</dd>
<dt class="tightenable bottom"><strong>language</strong></dt>
<dd class="tightenable top">The default language. When combining <strong>language</strong> with <strong>menu</strong> set
to <tt>true</tt> then remember to use the <code>language||=xx</code>
form.</dd>
<dt class="tightenable bottom"><strong>units</strong></dt>
<dd class="tightenable top bottom"><p class="tightenable top">You can specify the way the units are printed. The choice is between
having both metric and imperial units printed, or just one of
them. Setting <strong>units</strong> to <tt>both_metric</tt> will print the metric value
first and then the imperial value in parenthesis. Using
<tt>both_imperial</tt> instead will do the opposite.</p>
<p class="tightenable bottom">If you only need the metric or imperial units to be shown, then
setting <strong>units</strong> to <tt>only_metric</tt> or <tt>only_imperial</tt> will do just
that.</p>
</dd>
</dl>
<hr />
<p class="tightenable top bottom"><a href="WikiPlugin.html" class="wiki">WikiPlugin</a></p>
</div>

<div id="footer">  <hr class="printer" noshade="noshade" />
<p class="editdate">Owner: &quot;admin&quot;  Last edited on January 9, 2004 10:34 am by &quot;The PhpWiki programming team&quot;</p>
</div>

</div>
<!-- Add your Disclaimer here -->
</body>
</html>
