Jeroen De Dauw/Describe test
listerrors
Description: $1
Implemented as both parser function and as tag extension.
Parameters
| # | Parameter | Aliases | Type | Default | Description |
|---|---|---|---|---|---|
| 1 | minseverity | - | Text | minor | The minimum severity of an issue for it to be listed. |
Syntax
Tag extension with only the required parameters.
<listerrors />
Tag extension with all parameters.
<listerrors minseverity="{Text}" />
Tag extension with all parameters using the default parameter notation.
<listerrors>{minseverity, Text}</listerrors>
Parser function with only the required parameters.
{{#listerrors:}}
Parser function with all parameters.
{{#listerrors:minseverity={Text}}}
Parser function with all parameters using the default parameter notation.
{{#listerrors:{minseverity, Text}}}
describe
Description: Generates documentation for one or more parser hooks defined via Validator.
Implemented as both parser function and as tag extension.
Parameters
| # | Parameter | Aliases | Type | Default | Description |
|---|---|---|---|---|---|
| 1 | hooks | hook | List of text items | listerrors, describe, smwdoc, info, coordinates, display_map, display_point, distance, finddestination, geocode, geodistance, mapsdoc, subpages, subpagecount | The parser hooks for which to display documentation. |
| - | pre | - | Yes/no | off | Allows you to get the actual wikitext for the documentation, without it being rendered on the page. |
| - | language | - | Text | en | The language to display the descriptions in |
Syntax
Tag extension with only the required parameters.
<describe />
Tag extension with all parameters.
<describe hooks="{List of text items}" pre="{Yes/no}" language="{Text}" />
Tag extension with all parameters using the default parameter notation.
<describe pre="{Yes/no}" language="{Text}">{hooks, List of text items}</describe>
Parser function with only the required parameters.
{{#describe:}}
Parser function with all parameters.
{{#describe:hooks={List of text items}|pre={Yes/no}|language={Text}}}
Parser function with all parameters using the default parameter notation.
{{#describe:{hooks, List of text items}|pre=Yes/no|language=Text}}
smwdoc
Description: Shows a table of all parameters that can be used for the specified result format together with default values and descriptions.
Implemented as both parser function and as tag extension.
Parameters
| # | Parameter | Aliases | Type | Default | Description |
|---|---|---|---|---|---|
| 1 | format | - | Text | required | The result format to display parameter documentation for. |
| 2 | language | - | Text | en | <smw-smwdoc-par-language> |
| 3 | parameters | - | Text | specific | Which parameters to show. "specific" for those added by the format, "base" for those available in all formats, and "all" for both. |
Syntax
Tag extension with only the required parameters.
<smwdoc format="{Text}" />
Tag extension with all parameters.
<smwdoc format="{Text}" language="{Text}" parameters="{Text}" />
Tag extension with all parameters using the default parameter notation.
<smwdoc language="{Text}" parameters="{Text}">{format, Text}</smwdoc>
Parser function with only the required parameters.
{{#smwdoc:format={Text}}}
Parser function with all parameters.
{{#smwdoc:format={Text}|language={Text}|parameters={Text}}}
Parser function with all parameters using the default parameter notation.
{{#smwdoc:{format, Text}|{language, Text}|{parameters, Text}}}
info
Implemented as both parser function and as tag extension.
Parameters
| # | Parameter | Aliases | Type | Default | Description |
|---|---|---|---|---|---|
| 1 | message | - | Text | required | Message to display. |
| 2 | icon | - | Text | info | Icon to show, either "info" or "warning". |
Syntax
Tag extension with only the required parameters.
<info message="{Text}" />
Tag extension with all parameters.
<info message="{Text}" icon="{Text}" />
Tag extension with all parameters using the default parameter notation.
<info icon="{Text}">{message, Text}</info>
Parser function with only the required parameters.
{{#info:message={Text}}}
Parser function with all parameters.
{{#info:message={Text}|icon={Text}}}
Parser function with all parameters using the default parameter notation.
{{#info:{message, Text}|{icon, Text}}}
coordinates
Description: Parser hook to format coordinates, from and to any of the supported formats.
Implemented as both parser function and as tag extension.
Parameters
| # | Parameter | Aliases | Type | Default | Description |
|---|---|---|---|---|---|
| 1 | location | - | Text | required | The coordinates you want to format. |
| 2 | format | notation | Text | dms | The target format for the coordinates. |
| 3 | directional | - | Yes/no | yes | Indicates if the coordinates should be outputted directional or not. |
Syntax
Tag extension with only the required parameters.
<coordinates location="{Text}" />
Tag extension with all parameters.
<coordinates location="{Text}" format="{Text}" directional="{Yes/no}" />
Tag extension with all parameters using the default parameter notation.
<coordinates format="{Text}" directional="{Yes/no}">{location, Text}</coordinates>
Parser function with only the required parameters.
{{#coordinates:location={Text}}}
Parser function with all parameters.
{{#coordinates:location={Text}|format={Text}|directional={Yes/no}}}
Parser function with all parameters using the default parameter notation.
{{#coordinates:{location, Text}|{format, Text}|{directional, Yes/no}}}
display_map
Description: Display geographical maps without any wiki-defined markers on them.
Implemented as both parser function and as tag extension.
Parameters
| # | Parameter | Aliases | Type | Default | Description |
|---|---|---|---|---|---|
| 1 | coordinates | coords, location, address | Text | required | The location the map will initially be centred on. |
| - | mappingservice | service | Text | googlemaps3 | Allows setting the mapping service that will be used to generate the map. |
| - | geoservice | - | Text | geonames | The geocoding service to use to make translations between addresses and coordinates. |
| - | zoom | - | Whole number | required | The zoom level for the map. For maps with markers this will default to the most zoomed in level that still shows all markers. |
| - | width | - | Text | auto | Allows setting the width of the map. By default pixels will be assumed as unit, but you can explicitly specify one of these units: px, ex, em, %. |
| - | height | - | Text | 350 | Allows setting the height of the map. By default pixels will be assumed as unit, but you can explicitly specify one of these units: px, ex, em, %. |
Syntax
Tag extension with only the required parameters.
<display_map coordinates="{Text}" zoom="{Whole number}" />
Tag extension with all parameters.
<display_map coordinates="{Text}" mappingservice="{Text}" geoservice="{Text}" zoom="{Whole number}" width="{Text}" height="{Text}" />
Tag extension with all parameters using the default parameter notation.
<display_map mappingservice="{Text}" geoservice="{Text}" zoom="{Whole number}" width="{Text}" height="{Text}">{coordinates, Text}</display_map>
Parser function with only the required parameters.
{{#display_map:coordinates={Text}|zoom={Whole number}}}
Parser function with all parameters.
{{#display_map:
coordinates={Text}
| mappingservice={Text}
| geoservice={Text}
| zoom={Whole number}
| width={Text}
| height={Text}
}}
Parser function with all parameters using the default parameter notation.
{{#display_map:
{coordinates, Text}
| mappingservice=Text
| geoservice=Text
| zoom=Whole number
| width=Text
| height=Text
}}
display_point
Description: Display geographical maps with one or more wiki-defined markers on them.
Aliases: display_points
Implemented as both parser function and as tag extension.
Parameters
| # | Parameter | Aliases | Type | Default | Description |
|---|---|---|---|---|---|
| 1 | coordinates | coords, location, address, addresses, locations | List of text items | required | One or more locations to display on the map. They will be indicated with a marker. |
| - | mappingservice | service | Text | googlemaps3 | Allows setting the mapping service that will be used to generate the map. |
| - | geoservice | - | Text | geonames | The geocoding service to use to make translations between addresses and coordinates. |
| - | zoom | - | Whole number | required | Allows setting the zoom level of the map.
When not provided and multiple markers are present on the map, the best fitting zoom will be taken, not the configurable default. |
| - | width | - | Text | auto | Allows setting the width of the map. By default pixels will be assumed as unit, but you can explicitly specify one of these units: px, ex, em, %. |
| - | height | - | Text | 350 | Allows setting the height of the map. By default pixels will be assumed as unit, but you can explicitly specify one of these units: px, ex, em, %. |
| - | centre | center | Text | no | Allows setting the coordinates of the map's centre for display_point(s).
Accepts both addresses and coordinates. When this property is not provided, the map will centre itself on the provided marker, or between the provided markers. |
| - | title | - | Text | empty | Allows setting text that will be displayed in the pop-ups of all markers that do not have a specific title.
When used together with label, the title will be bold and underlined. |
| - | label | text | Text | empty | Allows setting text that will be displayed in the pop-ups of all markers that do not have a specific label. |
| - | icon | - | Text | empty | Allows setting the icon used for all markers. |
Syntax
Tag extension with only the required parameters.
<display_point coordinates="{List of text items}" zoom="{Whole number}" />
Tag extension with all parameters.
<display_point coordinates="{List of text items}" mappingservice="{Text}" geoservice="{Text}" zoom="{Whole number}" width="{Text}" height="{Text}" centre="{Text}" title="{Text}" label="{Text}" icon="{Text}" />
Tag extension with all parameters using the default parameter notation.
<display_point mappingservice="{Text}" geoservice="{Text}" zoom="{Whole number}" width="{Text}" height="{Text}" centre="{Text}" title="{Text}" label="{Text}" icon="{Text}">{coordinates, List of text items}</display_point>
Parser function with only the required parameters.
{{#display_point:coordinates={List of text items}|zoom={Whole number}}}
Parser function with all parameters.
{{#display_point:
coordinates={List of text items}
| mappingservice={Text}
| geoservice={Text}
| zoom={Whole number}
| width={Text}
| height={Text}
| centre={Text}
| title={Text}
| label={Text}
| icon={Text}
}}
Parser function with all parameters using the default parameter notation.
{{#display_point:
{coordinates, List of text items}
| mappingservice=Text
| geoservice=Text
| zoom=Whole number
| width=Text
| height=Text
| centre=Text
| title=Text
| label=Text
| icon=Text
}}
distance
Description: Convert a distance using a certain supported unit to its equivalent using another unit.
Implemented as both parser function and as tag extension.
Parameters
| # | Parameter | Aliases | Type | Default | Description |
|---|---|---|---|---|---|
| 1 | distance | - | Text | required | The distance to convert to its equivalent with a specified unit. |
| 2 | unit | - | Text | m | The unit to output the distance in. |
| 3 | decimals | - | Whole number | 2 | The maximum number of fractional digits to use in the resulting value. |
Syntax
Tag extension with only the required parameters.
<distance distance="{Text}" />
Tag extension with all parameters.
<distance distance="{Text}" unit="{Text}" decimals="{Whole number}" />
Tag extension with all parameters using the default parameter notation.
<distance unit="{Text}" decimals="{Whole number}">{distance, Text}</distance>
Parser function with only the required parameters.
{{#distance:distance={Text}}}
Parser function with all parameters.
{{#distance:distance={Text}|unit={Text}|decimals={Whole number}}}
Parser function with all parameters using the default parameter notation.
{{#distance:{distance, Text}|{unit, Text}|{decimals, Whole number}}}
finddestination
Description: Find a destination given a starting point (that can be in any of the supported formats), an initial bearing and a distance.
Implemented as both parser function and as tag extension.
Parameters
| # | Parameter | Aliases | Type | Default | Description |
|---|---|---|---|---|---|
| 1 | location | - | Text | required | The initial location. |
| 2 | bearing | - | Number | required | The initial bearing. |
| 3 | distance | - | Text | required | The distance to travel. |
| - | mappingservice | - | Text | empty | Parameter to indicate the mapping service to use with this function.
This will allow maps to override the default value of the service parameter by the one that is optimal for the mapping service. (Example: In case of Google Maps, the Google geocoder will be used.) |
| - | geoservice | service | Text | geonames | The geocoding service to use to geocode the value in case it is an address. |
| - | allowcoordinates | - | Yes/no | yes | Indicates if coordinates should be allowed. If set to no, only addresses will be accepted. |
| - | format | notation | Text | dms | The format in which to output the destination. |
| - | directional | - | Yes/no | yes | Indicates if the format of the destination should be directional or not. |
Syntax
Tag extension with only the required parameters.
<finddestination location="{Text}" bearing="{Number}" distance="{Text}" />
Tag extension with all parameters.
<finddestination location="{Text}" bearing="{Number}" distance="{Text}" mappingservice="{Text}" geoservice="{Text}" allowcoordinates="{Yes/no}" format="{Text}" directional="{Yes/no}" />
Tag extension with all parameters using the default parameter notation.
<finddestination bearing="{Number}" distance="{Text}" mappingservice="{Text}" geoservice="{Text}" allowcoordinates="{Yes/no}" format="{Text}" directional="{Yes/no}">{location, Text}</finddestination>
Parser function with only the required parameters.
{{#finddestination:location={Text}|bearing={Number}|distance={Text}}}
Parser function with all parameters.
{{#finddestination:
location={Text}
| bearing={Number}
| distance={Text}
| mappingservice={Text}
| geoservice={Text}
| allowcoordinates={Yes/no}
| format={Text}
| directional={Yes/no}
}}
Parser function with all parameters using the default parameter notation.
{{#finddestination:
{location, Text}
| {bearing, Number}
| {distance, Text}
| mappingservice=Text
| geoservice=Text
| allowcoordinates=Yes/no
| format=Text
| directional=Yes/no
}}
geocode
Description: Enables the geocoding of addresses, in other words, turning human readable locations into sets of coordinates. There is support for several geocoding services, which should not be confused with mapping services.
Implemented as both parser function and as tag extension.
Parameters
| # | Parameter | Aliases | Type | Default | Description |
|---|---|---|---|---|---|
| 1 | location | - | Text | required | The address you want to geocode. |
| 2 | geoservice | service | Text | geonames | This parameter allows you to indicate you are using this geocoding request in combination with a specific mapping service.
Each mapping service can have overrides over the default value for the geocoding service. This is for legal considerations, since you can not use the Google Geocoding service except together with Google Maps. Setting this parameter and not the parameter for the service, will ensure you are not using an invalid combination. |
| 3 | mappingservice | - | Text | empty | The geocoding service you want to use. See the available geocoding services. |
| - | allowcoordinates | - | Yes/no | yes | Allows disabling the support for coordinates in this function. Must be either yes or no.
When no, every value will be geocoded, even valid coordinates. |
| - | format | notation | Text | dms | The format for the resulting coordinates. |
| - | directional | - | Yes/no | yes | Indicates if the coordinates should be outputted directional or not. |
Syntax
Tag extension with only the required parameters.
<geocode location="{Text}" />
Tag extension with all parameters.
<geocode location="{Text}" geoservice="{Text}" mappingservice="{Text}" allowcoordinates="{Yes/no}" format="{Text}" directional="{Yes/no}" />
Tag extension with all parameters using the default parameter notation.
<geocode geoservice="{Text}" mappingservice="{Text}" allowcoordinates="{Yes/no}" format="{Text}" directional="{Yes/no}">{location, Text}</geocode>
Parser function with only the required parameters.
{{#geocode:location={Text}}}
Parser function with all parameters.
{{#geocode:
location={Text}
| geoservice={Text}
| mappingservice={Text}
| allowcoordinates={Yes/no}
| format={Text}
| directional={Yes/no}
}}
Parser function with all parameters using the default parameter notation.
{{#geocode:
{location, Text}
| {geoservice, Text}
| {mappingservice, Text}
| allowcoordinates=Yes/no
| format=Text
| directional=Yes/no
}}
geodistance
Description: Calculate the geographical distance between two points, from and to any of the supported formats.
Implemented as both parser function and as tag extension.
Parameters
| # | Parameter | Aliases | Type | Default | Description |
|---|---|---|---|---|---|
| 1 | location1 | from | Text | required | The first point in the set to calculate the distance between. |
| 2 | location2 | to | Text | required | The second point in the set to calculate the distance between. |
| 3 | unit | - | Text | m | The unit to output the distance in. |
| 4 | decimals | - | Whole number | 2 | The maximum number of fractional digits to use in the resulting value. |
| - | mappingservice | - | Text | empty | The geocoding service to use to geocode any addresses. |
| - | geoservice | service | Text | geonames | The mapping service this is used together with.
This can affect the default geocoding service value. |
Syntax
Tag extension with only the required parameters.
<geodistance location1="{Text}" location2="{Text}" />
Tag extension with all parameters.
<geodistance location1="{Text}" location2="{Text}" unit="{Text}" decimals="{Whole number}" mappingservice="{Text}" geoservice="{Text}" />
Tag extension with all parameters using the default parameter notation.
<geodistance location2="{Text}" unit="{Text}" decimals="{Whole number}" mappingservice="{Text}" geoservice="{Text}">{location1, Text}</geodistance>
Parser function with only the required parameters.
{{#geodistance:location1={Text}|location2={Text}}}
Parser function with all parameters.
{{#geodistance:
location1={Text}
| location2={Text}
| unit={Text}
| decimals={Whole number}
| mappingservice={Text}
| geoservice={Text}
}}
Parser function with all parameters using the default parameter notation.
{{#geodistance:
{location1, Text}
| {location2, Text}
| {unit, Text}
| {decimals, Whole number}
| mappingservice=Text
| geoservice=Text
}}
mapsdoc
Description: Display a table with the parameters for a specified mapping service together with their default values and descriptions.
Implemented as both parser function and as tag extension.
Parameters
| # | Parameter | Aliases | Type | Default | Description |
|---|---|---|---|---|---|
| 1 | service | - | Text | required | The mapping service to display parameter documentation for. |
| 2 | language | - | Text | en | The language in which to display the documentation. If no such translation is available, English will be used instead. |
Syntax
Tag extension with only the required parameters.
<mapsdoc service="{Text}" />
Tag extension with all parameters.
<mapsdoc service="{Text}" language="{Text}" />
Tag extension with all parameters using the default parameter notation.
<mapsdoc language="{Text}">{service, Text}</mapsdoc>
Parser function with only the required parameters.
{{#mapsdoc:service={Text}}}
Parser function with all parameters.
{{#mapsdoc:service={Text}|language={Text}}}
Parser function with all parameters using the default parameter notation.
{{#mapsdoc:{service, Text}|{language, Text}}}
subpages
Aliases: splist and subpagelist
Implemented as both parser function and as tag extension.
Parameters
| # | Parameter | Aliases | Type | Default | Description |
|---|---|---|---|---|---|
| 1 | page | parent | Text | empty | The page to show the subpages for, or namespace name (including trailing colon) to show pages in. Defaults to the current page. |
| 2 | format | liststyle | Text | ul | The subpage list can be displayed in several formats. Allowed values: "ol" — ordered (numbered) list, "ul" — unordered (bulleted) lists, "list" — plain lists (for example comma-separated list). |
| 3 | pathstyle | showpath | Text | none | The style of the path for subpages in the list. Allowed values: "fullpagename" — full page name (including namespace), "pagename" — page name (without namespace), "subpagename" — relative page name starting from the page we list subpages for, "none" — just the trailing part of the name after last slash. |
| 4 | sortby | - | Text | title | What to sort the subpages by. Allowed values: "title" or "lastedit". |
| 5 | sort | order | Text | asc | The direction to sort in. Allowed values: "asc" and "desc". |
| - | showpage | showparent | Yes/no | no | Indicates if the page itself should be shown in the list or not. |
| - | kidsonly | - | Yes/no | no | Allows showing only direct subpages. |
| - | limit | - | Whole number | 200 | The maximum number of pages to list. |
| - | element | - | Text | div | The HTML element enclosing the list (including "intro" and "outro" or "default" texts). Allowed values: "div", "p", "span". |
| - | class | - | Text | subpagelist | The value for "class" attribute of HTML element enclosing the list. |
| - | intro | - | Text | empty | The text to output before the list, if the list is not empty. |
| - | outro | - | Text | empty | The text to output after the list, if the list is not empty. |
| - | default | - | Text | empty | The text to output instead of the list, if the list is empty. If empty, error message will rendered (such as "Page has no subpages to list"). If dash ("-"), result will be completely empty. |
| - | separator | sep | Text | · | The text to output between two list items in case of "list" (and its alias "bar") format. Has no effect in other formats. |
| - | template | - | Text | empty | The name of template. The template is applied to every item of the list. An item is passed as the first (unnamed) argument. Note that template does not cancel list formatting. Formatting ("ul", "ol", "list") is applied to the template's result. |
| - | links | link | Yes/no | yes | If true, list items are rendered as links. If false, list items are rendered as plain text. The latter is especially helpful for passing items into templates for further processing. |
Syntax
Tag extension with only the required parameters.
<subpages />
Tag extension with all parameters.
<subpages page="{Text}" format="{Text}" pathstyle="{Text}" sortby="{Text}" sort="{Text}" showpage="{Yes/no}" kidsonly="{Yes/no}" limit="{Whole number}" element="{Text}" class="{Text}" intro="{Text}" outro="{Text}" default="{Text}" separator="{Text}" template="{Text}" links="{Yes/no}" />
Tag extension with all parameters using the default parameter notation.
<subpages format="{Text}" pathstyle="{Text}" sortby="{Text}" sort="{Text}" showpage="{Yes/no}" kidsonly="{Yes/no}" limit="{Whole number}" element="{Text}" class="{Text}" intro="{Text}" outro="{Text}" default="{Text}" separator="{Text}" template="{Text}" links="{Yes/no}">{page, Text}</subpages>
Parser function with only the required parameters.
{{#subpages:}}
Parser function with all parameters.
{{#subpages:
page={Text}
| format={Text}
| pathstyle={Text}
| sortby={Text}
| sort={Text}
| showpage={Yes/no}
| kidsonly={Yes/no}
| limit={Whole number}
| element={Text}
| class={Text}
| intro={Text}
| outro={Text}
| default={Text}
| separator={Text}
| template={Text}
| links={Yes/no}
}}
Parser function with all parameters using the default parameter notation.
{{#subpages:
{page, Text}
| {format, Text}
| {pathstyle, Text}
| {sortby, Text}
| {sort, Text}
| showpage=Yes/no
| kidsonly=Yes/no
| limit=Whole number
| element=Text
| class=Text
| intro=Text
| outro=Text
| default=Text
| separator=Text
| template=Text
| links=Yes/no
}}
subpagecount
Implemented as both parser function and as tag extension.
Parameters
| # | Parameter | Aliases | Type | Default | Description |
|---|---|---|---|---|---|
| 1 | page | parent | Text | empty | The page to show the subpages for, or namespace name (including trailing colon) to show pages in. Defaults to the current page. |
| - | kidsonly | - | Yes/no | no | Allows showing only direct subpages. |
Syntax
Tag extension with only the required parameters.
<subpagecount />
Tag extension with all parameters.
<subpagecount page="{Text}" kidsonly="{Yes/no}" />
Tag extension with all parameters using the default parameter notation.
<subpagecount kidsonly="{Yes/no}">{page, Text}</subpagecount>
Parser function with only the required parameters.
{{#subpagecount:}}
Parser function with all parameters.
{{#subpagecount:page={Text}|kidsonly={Yes/no}}}
Parser function with all parameters using the default parameter notation.
{{#subpagecount:{page, Text}|kidsonly=Yes/no}}