Help:Infobox

From 2021pedia

<languages/> Template:ExtensionTypes

<templatestyles src="Template:TOC_right/styles.css" />

<translate> Extensions let you customize how MediaWiki looks and works. </translate>

  • <translate> Wiki users can [[<tvar name=cat>Special:MyLanguage/Category:Extensions by category</tvar>|browse through extensions]].</translate>
  • <translate> System administrators can [[<tvar name=1>#Installing an extension</tvar>|install]] (or remove) extensions on the MediaWiki installations that they manage.</translate>
  • <translate> Developers can [[<tvar name=man>Special:MyLanguage/Manual:Developing extensions</tvar>|write new extensions]] or [[<tvar name=cat>Special:MyLanguage/Category:Unmaintained extensions</tvar>|improve or maintain extensions]]. </translate>

<translate> While some extensions are maintained by MediaWiki developers, others were written by third-party developers.</translate> <translate> As a result, many have bugs, and they are not all guaranteed to be compatible with each other.</translate> <translate> Some are unmaintained; not all extensions work on all versions of MediaWiki.</translate> <translate> Use any extension, especially those tagged as insecure, at your own risk.</translate> <translate> If you are using an extension that requires patches to the core software, be sure to backup your database.</translate> <translate> This helps avoid the risk of breaking your wiki.</translate>

<translate>

Types of extensions[edit]

</translate> <templatestyles src="ContentGrid/styles.css" />

<translate>

Browsing extensions[edit]

</translate> <translate> You can browse <tvar name=cat>Lua error in package.lua at line 80: module 'Module:Lang/ISO 639 synonyms' not found.</tvar> to see the full range of extensions that have already been written.</translate> <translate> For information on installing these extensions or writing your own, see below.</translate>

<translate>

Checking installed extensions[edit]

</translate> <translate> Only someone with administration access to the filesystem (and often the database too) on a server can install extensions for MediaWiki, but anyone can check which extensions are active on an instance of MediaWiki by accessing the <tvar name=special>Special:Version</tvar> page.</translate> <translate> For example, these extensions are active in the English Wikipedia.</translate>

<translate>

Installing an extension[edit]

</translate> <translate> MediaWiki is ready to accept extensions just after [[<tvar name=man>Special:MyLanguage/Manual:Installation</tvar>|installation]] is finished.</translate> <translate> To add an extension follow these steps:</translate>

  1. <translate> Before you start</translate>
    <translate> Many extensions provide instructions designed for installation using unix commands.</translate> <translate> You require shell access (SSH) to enter these commands listed on the extension help pages.</translate>
  2. <translate> Download your extension.</translate>
    <translate> [[<tvar name=special>Special:ExtensionDistributor</tvar>|Extension Distributor]] helps you to select and download most of the popular extensions.</translate>
    <translate> Extensions are usually distributed as modular packages.</translate> <translate> They generally go in their own subdirectory of <tvar name=IP>Lua error in package.lua at line 80: module 'Module:Lang/ISO 639 synonyms' not found./extensions/</tvar>.</translate> <translate> A list of extensions stored in the Wikimedia [[<tvar name=gerrit>Special:MyLanguage/Gerrit</tvar>|Git repository]] is located at <tvar name=extensions>git:mediawiki/extensions</tvar>.</translate> <translate> Some extensions [[<tvar name=cat>Special:MyLanguage/Category:Extensions which host their code in-wiki</tvar>|don't use version control]] and are not recommended.</translate>
    <translate> Some extensions are also available in [[<tvar name=1>Special:MyLanguage/Software bundles</tvar>|bundles]], <tvar name=composer>Lua error in package.lua at line 80: module 'Module:Lang/ISO 639 synonyms' not found.</tvar> or [[<tvar name=2>Special:MyLanguage/Comparison of extensions in distributions</tvar>|package repositories]].</translate>
  3. <translate> Install your extension.</translate>.
    <translate> At the end of the <tvar name=LocalSettings>Lua error in package.lua at line 80: module 'Module:Lang/ISO 639 synonyms' not found.</tvar> file, add:</translate>
    wfLoadExtension( 'ExtensionName' );
    
    <translate> This line forces the PHP interpreter to read the extension file, and thereby make it accessible to MediaWiki.</translate>
    <translate> Some extensions can conflict with maintenance scripts, for example if they directly access $_SERVER (not recommended).</translate>
    <translate> In this case they can be wrapped in the conditional so maintenance scripts can still run.</translate>
if ( !$wgCommandLineMode ) {
   wfLoadExtension ( 'ExtensionName' );
}

<translate> : The maintenance script <tvar name=ImportDump>Lua error in package.lua at line 80: module 'Module:Lang/ISO 639 synonyms' not found.</tvar> will fail for any extension which requires customized namespaces which is included inside the conditional above such as <tvar name=1>Lua error in package.lua at line 80: module 'Module:Lang/ISO 639 synonyms' not found.</tvar>, <tvar name=2>Lua error in package.lua at line 80: module 'Module:Lang/ISO 639 synonyms' not found.</tvar>.</translate>

<templatestyles src="Citation/styles.css"/><span class="citation wikicite" id="endnote_<translate> Ensure that required permissions are set for extensions!</translate>">^
<templatestyles src="Citation/styles.css"/><span class="citation wikicite" id="endnote_<translate> While this installation procedure is sufficient for most extensions, some require a different installation procedure.</translate> <translate> Check your extension's documentation for details.</translate>">^
<templatestyles src="Citation/styles.css"/><span class="citation wikicite" id="endnote_<translate> If you want to alter configuration variables in LocalSettings.php, you have to do this typically after including the extension.</translate> <translate> Otherwise defaults defined in the extension will overwrite your settings.</translate>">^

<translate>

Upgrading an extension[edit]

</translate> <translate> Some extensions require to be updated whenever you update MediaWiki, while others work with multiple versions.</translate> <translate> To upgrade to a new version of an extension:</translate>

<translate>

  1. Download the new version of the extension</translate>

<translate>

  1. Replace all the extension files in the extension/ExtensionName directory with the new files.</translate> <translate> Do not remove the extension configuration present in LocalSettings.php</translate>

<translate>

  1. If the extension requires changes to the MediaWiki database, you will need to run the Update.php maintenance script.</translate> <translate> Most extensions will mention if this script needs to be run or not.</translate> <translate> (Perform backup of your data before executing the script).</translate> <translate> If you don't have command line access, you can also use the [[<tvar name=man>Special:MyLanguage/Manual:Upgrading#Web_updater</tvar>|web updater]].</translate>

<templatestyles src="Citation/styles.css"/><span class="citation wikicite" id="endnote_<translate> These instructions cover 99% of extensions.</translate> <translate> If the specific extension you are upgrading has instructions that differ from these, you should probably follow the specific extension's instructions</translate>">^

<translate>

Uninstalling an extension[edit]

Remove the line from LocalSettings.php with the extension name to uninstall it: </translate>

wfLoadExtension( 'ExtensionName' );

<translate>

  • You must remove any lines pertaining to the configuration of the extension.

See also[edit]

</translate>

  • Lua error in package.lua at line 80: module 'Module:Lang/ISO 639 synonyms' not found.
  • Lua error in package.lua at line 80: module 'Module:Lang/ISO 639 synonyms' not found.
  • Lua error in package.lua at line 80: module 'Module:Lang/ISO 639 synonyms' not found.
  • Lua error in package.lua at line 80: module 'Module:Lang/ISO 639 synonyms' not found. - <translate> Information about translating extensions.</translate>

Template:Extensions

[[Category:Customization techniques{{#translation:}}|Infobox]] [[Category:Extension creation{{#translation:}}]]

The ShortDescription extension allows wikis to add short descriptions to wikitext pages, similar to the implementation on Wikipedia and Wikibase. On top of that, it replaces the site tagline with short description on pages with short description.

Installation[edit]

Note that the latest version is located in the GitHub repo instead of Gerrit. Template:ExtensionInstall

Features[edit]

  • Define short description on the page with the magic word {{SHORTDESC}}, same as the implementation on Wikipedia
  • Retrieve short description on any wiki pages with the magic word {{GETSHORTDESC}}
  • Add short description underneath the page title on most skins, if the skin supports site tagline (#siteSub)
    • Note that the short description with replace the default site tagline message on pages with short description
    • Does not apply to Skin:Citizen and Skin:Minerva Neue, as they have native support
  • Allow short description to be accessed through the Action API
  • Provide description to the REST API search endpoint
  • Add short description to page information (&action=info)
  • Provide description for extensions such as MobileFrontend, RelatedArticles

Configurations[edit]

The extension works out of the box without any configurations. The config flags allow more customization on the specific features in the extension.

Name Description Values Default
Template:Phpi Enables short descritption in site tagline Template:Phpi - enable; Template:Phpi - disable Template:Phpi
Template:Phpi Provide short description to the Opensearch API module Template:Phpi - enable; Template:Phpi - disable Template:Phpi

Usage[edit]

Add short description[edit]

To add Bacon ipsum dolor amet turkey as short description, simply add {{SHORTDESC:Bacon ipsum dolor amet turkey}} on the page.

Retrive short description on wikipage[edit]

To retrive the short description on the page Bacon, simply add {{GETSHORTDESC:Bacon}} on the page. If you are retrieving the short description on the same page (e.g. getting the short description of Bacon on the Bacon page), simply add {{GETSHORTDESC:}}.

Retrieve short description through Action API[edit]

The short description can be called through the description property in query action in the Action API (e.g.api.php?action=query&prop=description). It is also accessible through the shortdesc property inside pageprops.

Retrieve short description through REST API[edit]

The short description can be accessed through the description property in the search endpoint in the REST API.

Screenshots[edit]

See also[edit]

Template:About Template:Wikipedia how to

Example of an infobox

Lua error in package.lua at line 80: module 'Module:Sidebar/configuration' not found.

An infobox is a fixed-format table usually added to the top right-hand corner of articles to consistently present a summary of some unifying aspect that the articles share and sometimes to improve navigation to other interrelated articles. Many infoboxes also emit structured metadata which is sourced by DBpedia and other third party re-users. The generalized infobox feature grew out of the original taxoboxes (taxonomy infoboxes) that editors developed to visually express the scientific classification of organisms.

The use of infoboxes is neither required nor prohibited for any article. Whether to include an infobox, which infobox to include, and which parts of the infobox to use, is determined through discussion and consensus among the editors at each individual article.

What infoboxes do[edit]

Infobox templates contain important facts and statistics of a type which are common to related articles. For instance, all animals have a scientific classification (species, family and so on), as well as a conservation status. Adding a {{taxobox}} to articles on animals therefore makes it easier to quickly find such information and to compare it with that of other articles.

Infobox templates are like fact sheets, or sidebars, in magazine articles. They quickly summarize important points in an easy-to-read format. However, they are Template:Em "statistics" tables in that they (generally) only summarize material from an article—the information should still be present in the main text, partly because it may not be possible for some readers to access the contents of the infobox. In particular, if infobox templates hide long columns of data inside collapsing tables, then readers using assistive technology may miss their presence entirely.

Many infoboxes also emit metadata such as microformats Template:Crossref.

What should an infobox contain?[edit]

In general, data in infobox templates should be:

  • Comparable. If a lot of different subjects all share a common attribute (for instance, all people have a name and a date of birth), then it is useful to be able to compare these across different pages. This also implies that where possible, material should be presented in a standard format.
  • Concise. Infobox templates are "at-a-glance", and used for quickly checking facts.
  • Materially relevant to the subject.
  • Already cited elsewhere in the article. Infoboxes, like the introduction to the article, should primarily contain material that is expanded on and supported by citations to reliable sources elsewhere in the article. However, if necessary (e.g., because the article is currently incomplete), it is possible to include footnotes in infoboxes.

What should an infobox not contain?[edit]

In general, data in infobox templates should not have:

  • Excessive length. Long bodies of text, or very detailed statistics, belong in the article body.
  • Trivial details. A common problem is including material in the infobox which is trivial and would not otherwise be included in the article body: for example, a fictional character's blood type may be referenced in passing in a work, but it is not especially useful to understanding the subject. Infobox templates should not be used for details that are too trivial to include in the article body (there are some exceptions, such as chemical properties).
  • Flags. Flag icons should generally not be used in infoboxes, even when there is a "country", "nationality" or equivalent field: they are unnecessarily distracting and give undue prominence to one field among many.

Adding an infobox to an article[edit]

There are two steps required to add an infobox to an article:

  1. Finding the infobox
  2. Editing the article

Finding the infobox[edit]

In order to use an infobox in an article, an editor must know its name, parameters, and how those parameters are intended to be used. Because infoboxes are kept in a namespace separate from articles, it takes some effort to identify an infobox by name. Once the editor has the name, however, it is straightforward to look up the infobox's documentation.

There are two ways in which an editor typically locates which infobox they want to use:

  • By browsing the set of all infoboxes via Wikipedia:List of infoboxes.
  • By determining the name of a particular infobox used in a similar article.

For example, the article D-Terminal contains an infobox. To determine which one, simply edit the article:

{{Infobox connector
...
}}

The "{{Infobox connector" identifies the markup between the enclosing braces as a use of the "connector" infobox. The editor can look up the documentation for the template, including a list of parameters, in the Template namespace under Template:Infobox connector.

Editing the target article[edit]

In accordance with Wikipedia's Manual of Style, infoboxes should be placed at the top of an article after any disambiguation links and maintenance tags.

The infobox documentation page usually contains a convenient "blank" template that can be copied directly into the target article. The template consists of opening ({{) and closing (}}) double braces that contain the name of the infobox and a list of parameters without values. An editor then fills in the value for each of the parameters to the right of the corresponding equals sign.

For example:

{{Infobox person
|name    =
|image   =
|caption =
...
|website =
}}

might be filled out like this:

{{Infobox person
|name    = Casanova
|image   = Casanova_self_portrait.jpg
|caption = A self portrait of Casanova
...
|website =
}}

In this example, the names of the parameters ("name", "image", "caption", "website") are fixed in the design of the infobox and described in its documentation. A parameter that is misspelled, falsely capitalized, or is not supported by the infobox implementation does not display at all. To find out exactly which parameters are functional, look at the infobox's template page. Anything not listed there will be ignored, even if it works in some other infobox. If you believe that another parameter needs to be added to a given infobox template, then suggest that on the infobox's talk page.

The infobox documentation describes which parameters are required and which are optional. Required parameters display between triple braces (for example, {{{requiredparametername}}}) when previewed or published. Optional parameters may be left empty or omitted entirely.

Troubleshooting[edit]

If you added an infobox and it didn't display correctly, here are the common errors:

  • You used a made-up or invalid parameter. You can only use parameters that have been pre-programmed into this infobox template.
  • You misspelled the parameter name or omitted necessary punctuation (e.g., leaving out the underscore in birth_place).
  • You capitalized the parameter name. Parameters are case sensitive. Nearly all infoboxes use lowercase parameter labels.
  • You included the prefix File: before the image name (or you didn't, and it's one of the templates that requires it).
  • You used the parameter name more than once: only the final instance displays.

Adding an image to an infobox[edit]

Template:Main Images are generally specified using the image and caption parameters. However, the template may use a different name for this parameter. For example, Template:Tp uses "Cover" instead of "image" and "Caption" instead of "caption".

The image parameter sometimes requires the Wikipedia:Extended image syntax; other times it requires only the image file name depending on the tastes of the editor who created the infobox. An editor can determine this either by experimenting (using the "preview" function) or by consulting the infobox template documentation.

Many images in infoboxes should have a special text alternative for people who cannot see the image.

Combining multiple infoboxes[edit]

Template:Main If an article requires two or more infoboxes it is often possible to combine them into one, by including the others as a module (or child-, or sub-template) of the first. See the linked page for instructions.

Designing an infobox[edit]

Lua error in package.lua at line 80: module 'Module:Hatnote list' not found. It is a good idea to seek the opinions of other editors before embarking on a design of a new infobox or redesign of an existing one. Most requirements are already met by an existing infobox and most of the remainder can be met with a tweak. Unnecessary duplication leads to clutter and article divergence. Prototype your new design in your own user space. Once prototyped, propose the infobox changes to the appropriate WikiProject and gain consensus before deploying your new design in the template namespace.

Deleting an infobox[edit]

Requests to delete an infobox should be brought to the attention of Wikipedia:Templates for discussion and any WikiProjects associated with the infobox. A template may be merged with another rather than deleted outright. Help:Infobox/user style

See also[edit]

<templatestyles src="Module:Side box/styles.css"></templatestyles>

Template:Offer help