Jump to content

ជំនួយ:ប្រអប់ព័ត៌មាន

ពីវិគីភីឌា
WikiProject Infoboxes
Style and help
បញ្ជី
T290062: Parameter onlyroot is deprecated. Use depth="0" instead.
ការសំអាត
Cleanup categories:T290062: Parameter onlyroot is deprecated. Use depth="0" instead.
រកមិនឃើញចំណាត់ថ្នាក់ក្រុម Wikipedia infobox cleanup ទេ

Talkpage templates:
{{Cleanup-infobox}}
{{Newinfobox}}
{{Reqinfobox}}
Article templates:
{{Missing-taxobox}}

ការបង្កើត

Meta template:
{{Infobox}}
Proposals:
List of infoboxes/Proposed

An infobox is a fixed-format table designed to be 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. The generalized infobox feature grew out of the original taxoboxes (taxonomy infoboxes) that editors developed to visually express the scientific classification of organisms.

What infoboxes do

[កែប្រែ]

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 not "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, which means readers using assistive technology may miss their presence entirely.

Many infoboxes also emit microformats—see the microformats project.

Sometimes infoboxes may contain abbreviations or other forms not included in the lead text. If so, then search engines may excerpt the infobox rather than the lead when searched with such text. So it's a good idea to have text in the infobox appear in the main page, but then such infoboxes have been accused of being less informative (see wikipedia:disinfoboxes).

What should an infobox contain?

[កែប្រែ]

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. Long bodies of text, or very detailed statistics, belong in the article body.
  • Materially relevant to the subject. A common problem is including material 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 detail which is trivial to the point that if it were placed in the article body it would be removed. Furthermore, as mentioned above, some users may not be able to access the contents of the infobox and so would not be able to access this material in that case.

Finding an appropriate infobox template

[កែប្រែ]

Infoboxes are an extension of MediaWiki's template feature, and as such their implementations are kept in the Template namespace. There are two ways that editors typically want to access the underlying details of an infobox:

  • First, editors can browse the set of all infoboxes via Category:Infobox templates.
  • Second (and more commonly), when an editor is inspired by an infobox in a particular article, he or she can map the infobox onto its template implementation in the Template namespace.

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

{{Infobox connector
...
}}

The start of the template identifies the markup between the enclosing braces as an infobox instance. While the next word identifies the specific kind of infobox (in this case the "connector" infobox), the underlying template is still located in the Template namespace under Template:Infobox connector.

Adding an infobox to an article

[កែប្រែ]

In accordance with Wikipedia's Manual of Style, editors should place an infobox at the top of an article after any and maintenance tags.

Infoboxes should have a documentation page that 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 = Casanova was a great lover, but a lousy painter
...
|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 or is not supported by the infobox implementation does not display at all.

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

Designing an infobox

[កែប្រែ]

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.

For detailed guidance on how to design infoboxes, see Help:Designing infoboxes.

Deleting an infobox

[កែប្រែ]

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.