Date: Sat, 11 Jan 2003 14:53:00 -0500
Mime-Version: 1.0 (Produced by PhpWiki 1.3.4)
X-Rcs-Id: $Id: PhpWeatherPlugin,v 1.1 2004/04/29 23:59:07 rurban Exp $
Content-Type: application/x-phpwiki;
  pagename=PhpWeatherPlugin;
  pgsrc_version="2 $Revision: 1.1 $";
  flags="";
  markup=2;
  charset=UTF-8
Content-Transfer-Encoding: binary

!!! Synopsis

~PhpWeatherPlugin 是個 WikiPlugin, 他使用 PhpWeather 來顯示目前世界上
某些機場的氣象. 它看起來像是這樣:

<?plugin PhpWeather menu=true ?>

!!! Plugin Arguments

__menu__:
  設定為 =true= 是讓 plugin 在報告之後產生選單. 使用者將可以從這個選單
  去挑選國家,機場或語言. 預設值為 <tt>false</tt>.

__icao__:
  使用這個引數來先行挑選機場,以替代預設機場 <tt>EKAH</tt>. 如果你想讓使
  用者能用選單改變地方,那麼你得使用這樣的語法
  <verbatim>
  <?plugin PhpWeather menu=true icao||=EKYT ?>
  </verbatim>
  然後當使用者送出表單時,值將會被覆寫.如果你只用了
  <verbatim>
  <?plugin PhpWeather menu=true icao=EKYT ?>
  </verbatim>
  那麼,當使用者從清單挑選其他地方的時候,將不會有任何事情產生.

__cc__:
  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
  <verbatim>
  <?plugin PhpWeather menu=true cc||=GB icao||=KTTS ?>
  </verbatim>
  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 __menu__ set to
  <tt>true</tt>.

__language__:
  The default language. When combining __language__ with __menu__ set
  to <tt>true</tt> then remember to use the <code>language||=xx</code>
  form.

__units__:
  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 __units__ to =both_metric= will print the metric value
  first and then the imperial value in parenthesis. Using
  =both_imperial= instead will do the opposite.

  If you only need the metric or imperial units to be shown, then
  setting __units__ to =only_metric= or =only_imperial= will do just
  that.
----
WikiPlugin
