Jump to content

Module:Sandbox/Innesw/Infobox Australian place-upgrade/doc

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Innesw (talk | contribs) at 12:06, 14 August 2024 (minor corrections). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.


This module is the existing Infobox Australian place template (as of March 2024) transferred from normal template syntax to a Lua module, and then further modified.

The original transfer from template to module syntax is here.

This upgrade version of the module includes more substantive changes to the behaviour of the template, together with a few additional parameters. It is still in development, and further changes are likely.

General Changes

  • both error messages for the non-existence of (or unsupported values for) |type= and |state= are at the top of the infobox
  • removes the difference between |type=protected and other types in the call to {{coords}}
  • fixes the response to 'flag' parameters (local_map, force_national_map, use_lga_map, relief, _noautocat) so 'no' = <blank>, any other value = 'yes'
  • the following values for |map_type= now have priority over the deprecated (but still implemented) parameters |force_national_map=, |use_lga_map= and |alternative_location_map=
    • |map_type=nomap - suppresses any location map
    • |map_type=national or |map_type=australia - force the location map to be a map of Australia
    • |map_type=state - force the location map to be the state map
    • |map_type=lga - force the location map to be the map of the lga (as specified in |lga=)
    • |map_type=(any other value) - assumes the provided value is the name of a specific map to use as the location map
  • the local_map (if shown) can have a caption, by setting |local_map_caption=
  • if |pop=<blank>, and therefore replaced by wikidata population data:
    • a value for |pop2= (with |pop2_year and |pop2_footnotes) is still shown
    • a value for |poprank= is still shown
  • the logo, if shown, can have a caption, by setting |logo_caption=
  • the sub-table headers (climate, places-near) now have the same colour as the 'above' text (the infobox header) and the labels column

Changes to Categories

  • obsolete parameters (alt, alt2, image_alt2, imagesize, image_size, imagesize2, image_size2, logo_alt, logosize) are now simply ignored. Any use of them will add the page to
  • when adding to the [[Category:Populated places established in /year/]]
    • |established= is now treated the same as |est=
    • a place is put in the category no matter what the {{para]type}} value (instead of only for |type=lga)

Usage

This module can be tested with a call to {{Sandbox/Innesw/Infobox_Australian_place-upgrade}}, in general with any of the same parameters as the existing template.

There are some additional parameters implemented:

Optional parameters
Parameter Available for |type= Description Notes Potential sources Values
local_map_caption all Caption for the local map If not present or blank, the local map will not have a caption. Plain text or wikitext.
logo_caption all Caption for the logo image If not present or blank, the logo image will not have a caption. Plain text or wikitext.

Testcases

There is a testcases page, comparing this module with the existing template.