Diff: Help/PhpWeatherPlugin

Differences between current version and predecessor to the previous major change of Help/PhpWeatherPlugin.

Other diffs: Previous Revision, Previous Author

Newer page: version 5 Last edited on 17 January 2022 3:00 by harold
Older page: version 4 Last edited on 9 September 2007 0:16 by harold Revert
@@ -1,62 +1,72 @@
-!!! Synopsis  
-  
- The ~PhpWeatherPlugin is a Help:WikiPlugin that uses PhpWeather to display 
+The ** ~PhpWeather** [[ Help:WikiPlugin|plugin]] is a plugin that uses ~ PhpWeather to display 
 a block of text with the current weather for some airport in the 
 world. It looks like this: 
  
-<?plugin PhpWeather menu=true ?
+<< PhpWeather menu=true>
  
-!!! Plugin Arguments 
+== Arguments ==  
  
-__ menu__:  
- Set this to = true= 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>
+{| class="bordered"  
+|-  
+! Argument  
+! Description  
+! Default value  
+|-  
+| ** menu**  
+|  
+Set this to ## true## 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.  
+| false  
+|-  
+| **icao**  
+|  
+Use this to pre-select a specific airport instead of using the  
+default one which is ##EKAH##
  
-__icao__:  
- 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  
- <verbatim>  
- <?plugin PhpWeather menu=true icao||=EKYT ? >  
- </verbatim >  
- so that the value can be overwritten when the user submits the  
- form. If you just use  
- <verbatim>  
- <?plugin PhpWeather menu=true icao=EKYT ?>  
- </verbatim>  
- then nothing will happen when the user selects another station from  
- the list
+If you want the user to be able  
+to change the station using the menu, then you have to use this  
+as ## <~ <PhpWeather menu=true icao|~ |~ =EKYT>>##  
+so that the value can be overwritten when the user submits the form. 
  
-__ 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>
+If you just use ##<~<PhpWeather menu=true icao=EKYT>>##  
+then nothing will happen when the user selects another station from  
+the list.  
+|  
+|-  
+| ** cc**  
+|  
+Specify the country code. You can use this if you want pre-select a  
+different country than the one specified in the ICAO. 
  
-__language__:  
- The default language. When combining __language__ with __menu__ set  
- to <tt>true </tt> then remember to use the <code>language ||=xx</code >  
- form
+So using ## <~ <PhpWeather menu=true cc |~ |~ =GB icao|~|~=KTTS >>##  
+will show the current weather at the NASA Shuttle Facility, United  
+States (##KTTS##) and at the same time give the user a list of  
+stations in the United Kingdom
  
-__ 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. 
+As the example shows, then you  
+should use ##cc|~|~=XX## when combining it with **menu** set to ##true##.  
+|-  
+| **language**  
+|  
+The default language. When combining **language** with **menu** set  
+to ##true## then remember to use the ##language|~|~=xx## 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. 
+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.  
+|  
+|}  
  
+<noinclude>  
 ---- 
-  
- PhpWikiDocumentation Help:WikiPlugin  
+[[ PhpWikiDocumentation]] [[CategoryWikiPlugin]]  
+</noinclude>  

current version

The PhpWeather plugin is a plugin that uses PhpWeather to display a block of text with the current weather for some airport in the world. It looks like this:

Plugin “PhpWeather” does not exist.

Arguments

Argument

Description

Default value

menu

Set this to true 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.

false

icao

Use this to pre-select a specific airport instead of using the default one which is EKAH.

If you want the user to be able to change the station using the menu, then you have to use this as <<PhpWeather menu=true icao||=EKYT>> so that the value can be overwritten when the user submits the form.

If you just use <<PhpWeather menu=true icao=EKYT>> then nothing will happen when the user selects another station from the list.

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 <<PhpWeather menu=true cc||=GB icao||=KTTS>> will show the current weather at the NASA Shuttle Facility, United States (KTTS) and at the same time give the user a list of stations in the United Kingdom.

As the example shows, then you should use cc||=XX when combining it with menu set to true.

language

The default language. When combining language with menu set to true then remember to use the language||=xx 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.