2,141
edits
mNo edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
This article will explain the basics of wikicode, giving examples of the various techniques used to make the many pages on Bulbapedia. While this may be helpful, however, the best way to learn is to look at the coding on a page to see how it is done | This article will explain the basics of '''wikicode''' (also known as '''wikitext''' or '''wiki markup'''), giving examples of the various techniques used to make the many pages on Bulbapedia. While this may be helpful, however, the best way to learn is to look at the coding on a page to see how it is done and modify it to see how it changes. Just make sure to use the preview button! | ||
== | ==Layout== | ||
{| class="roundy | ===Sections=== | ||
! style=" | Sections break an article down into more manageable chunks and are created using <code>=</code> to <code>======</code>. | ||
| | {| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | ||
| <pre> | |- | ||
! Markup | |||
! style="width: 300px;" | Result | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>==Level 2== | |||
===Level 3=== | |||
| | ====Level 4==== | ||
=====Level 5===== | |||
======Level 6======</pre> | |||
| style="padding: 5px; {{roundybr|6px}};" | <div style="font-size: 150%; font-family: sans-serif; margin-top: 1em; margin-bottom: 0.25em; line-height: 1.3; padding: 0; border-bottom: 1px solid #AAAAAA;">Level 2</div> | |||
<div style="font-size: 128%; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.5; padding-top: 0.5em; padding-bottom: 0;">Level 3</div> | |||
<div style="font-size: 116%; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.6; padding-top: 0.5em; padding-bottom: 0;">Level 4</div> | |||
| | <div style="font-size: 108%; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.6; padding-top: 0.5em; padding-bottom: 0;">Level 5</div> | ||
<div style="font-size: 100%; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.6; padding-top: 0.5em; padding-bottom: 0;">Level 6</div> | |||
: | |||
:: | |||
::::::::::: | |||
: | |||
:: | |||
::::::::::: | |||
|} | |} | ||
= | * A single <code>=</code> is styled as the article title and should not be used within an article. | ||
* Headings are styled through CSS and add an <code>[edit]</code> link. | |||
* Four or more headings cause a [[#Table of contents|table of contents]] to be generated automatically. | |||
* Do not use <em>any</em> markup after the final <code>=</code> – this will either break the heading, or will cause the heading to not be included in an edit summary. | |||
'''HTML''' | |||
< | Headings can also be created by using HTML elements. | ||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! style="width: 300px;" | Result | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre><h2>Level 2</h2> | |||
<h3>Level 3</h3> | |||
<h4>Level 4</h4> | |||
<h5>Level 5</h5> | |||
<h6>Level 6</h6></pre> | |||
| style="padding: 5px; {{roundybr|6px}};" | <div style="font-size: 150%; font-family: sans-serif; margin-top: 1em; margin-bottom: 0.25em; line-height: 1.3; padding: 0; border-bottom: 1px solid #AAAAAA;">Level 2</div> | |||
<div style="font-size: 128%; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.5; padding-top: 0.5em; padding-bottom: 0;">Level 3</div> | |||
<div style="font-size: 116%; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.6; padding-top: 0.5em; padding-bottom: 0;">Level 4</div> | |||
<div style="font-size: 108%; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.6; padding-top: 0.5em; padding-bottom: 0;">Level 5</div> | |||
<div style="font-size: 100%; font-weight: bold; margin-top: 0.3em; margin-bottom: 0; line-height: 1.6; padding-top: 0.5em; padding-bottom: 0;">Level 6</div> | |||
|} | |||
These should not normally be used on articles, and are instead used within [[Help:Templates|templates]], as they do not include <code>[edit]</code> links. | |||
===Horizontal rule=== | |||
The horizontal rule represents a paragraph-level thematic break. Do not use in article content, as rules are used only after main sections, and this is automatic. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! style="width: 300px;" | Result | |||
|- style="background: #FFF;" | |||
| style="text-align: center;" | <pre>----</pre> | |||
| | |||
---- | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre><hr /></pre> | |||
| style="{{roundybr|6px}};" | <hr /> | |||
|} | |||
Horizontal rules are achieved with wikicode or HTML. However, <code>----</code> must always be at the start of a line, whereas <code><nowiki><hr /></nowiki></code> can be used anywhere. | |||
===Table of contents=== | |||
{{shortcut|1|H:TOC}} | |||
When a page has at least four headings, a table of contents (TOC) will automatically appear after the lead and before the first heading. The TOC can be controlled by magic words: | |||
* <code><nowiki>__FORCETOC__</nowiki></code> forces the TOC to appear at the normal location regardless of the number of headings. | |||
* <code><nowiki>__TOC__</nowiki></code> forces the TOC to appear at the point where the magic word is inserted instead of the normal location. | |||
* <code><nowiki>__NOTOC__</nowiki></code> disables the TOC entirely. | |||
===Line breaks=== | |||
Line breaks or newlines are used to add whitespace between lines, such as separating paragraphs. | |||
* A line break that is visible in the content is inserted by pressing Enter twice. | |||
* Pressing Enter once will place a line break in the markup, but it will not show in the rendered content, except when using list markup. | |||
* Markup such as bold or italics will be terminated at a line break. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>A single newline here | |||
has no effect on the layout. | |||
But an empty line starts a new paragraph, | |||
or ends a list or an indented part.</pre> | |||
| style="padding: 5px; {{roundybr|6px}};" | | |||
A single newline here | |||
has no effect on the layout. | |||
But an empty line starts a new paragraph, | |||
or ends a list or an indented part. | |||
|} | |||
Line breaks can also be created with <code><nowiki><br /></nowiki></code> and {{template|-}}. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| <pre>Here is some text about Pokémon.<br /> Here is some more text about Pokémon.</pre> | |||
| style="padding: 5px;" | Here is some text about Pokémon.<br /> Here is some more text about Pokémon. | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>Here is some text about Pokémon.{{-}} Here is some more text about Pokémon.</pre> | |||
| style="padding: 5px; {{roundybr|6px}};" | Here is some text about Pokémon.{{-}} Here is some more text about Pokémon. | |||
|} | |||
{{template|-}} adds a break with styling, to clear floating elements. This is often used to prevent text from flowing next to unrelated tables, images or templates. | |||
===Indented text=== | |||
Indented text is most commonly used on talk pages to help keep track of replies. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>Indentation as used on talk pages: | |||
:Each colon at the start of a line | |||
::causes the line to be indented by three more character positions. | |||
:::(The indentation persists | |||
so long as no carriage return or line break is used.) | |||
:::Repeat the indentation at any line break. | |||
::::Use an extra colon for each response. | |||
:::::And so forth... | |||
::::::And so on...</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | Indentation as used on talk pages: | |||
:Each colon at the start of a line | |||
::causes the line to be indented by three more character positions. | |||
:::(The indentation persists | |||
so long as no carriage return or line break is used.) | |||
:::Repeat the indentation at any line break. | |||
::::Use an extra colon for each response. | |||
:::::And so forth... | |||
::::::And so on... | |||
|} | |||
{{p| | ===Blockquote=== | ||
Blockquotes are useful when there is a need to separate a block of text, such as (as the name suggests) inserting a large quote into an article. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>Text before | |||
<blockquote> | |||
<p>Quoted paragraph</p> | |||
<p>Name, Source, Reference</p> | |||
</blockquote> | |||
Text after</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | Text before | |||
<blockquote> | |||
<p>Quoted paragraph</p> | |||
<p>Name, Source, Reference</p> | |||
</blockquote> | |||
Text after | |||
|} | |||
===Lists=== | |||
{{shortcut|1|H:LIST}} | |||
Do not leave blank lines between items in a list unless there is a reason to do so, since this causes the MediaWiki software to interpret each item as beginning a new list. | |||
====Unordered lists==== | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>* Item 1 | |||
* Item 2 | |||
* Item 3 | |||
* Item 4 | |||
** Sub-item 1 | |||
*** Sub-sub-item | |||
**** Sub-sub-sub-item | |||
** Sub-item 2 | |||
* Item 5</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | | |||
* Item 1 | |||
* Item 2 | |||
* Item 3 | |||
* Item 4 | |||
** Sub-item 1 | |||
*** Sub-sub-item | |||
**** Sub-sub-sub-item | |||
** Sub-item 2 | |||
* Item 5 | |||
|} | |||
====Ordered lists==== | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre># Item 1 | |||
# Item 2 | |||
# Item 3 | |||
# Item 4 | |||
## Sub-item 1 | |||
### Sub-sub-item | |||
#### Sub-sub-sub-item | |||
## Sub-item 2 | |||
# Item 5</pre> | |||
| style="{{roundybr|6px}}; padding-right: 5px;" | | |||
# Item 1 | |||
# Item 2 | |||
# Item 3 | |||
# Item 4 | |||
## Sub-item 1 | |||
### Sub-sub-item | |||
#### Sub-sub-sub-item | |||
## Sub-item 2 | |||
# Item 5 | |||
|} | |||
=== | It is also possible to set a starting value of an ordered list: | ||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre># <li value="7">Item 1</li> | |||
# Item 2 | |||
# Item 3 | |||
# Item 4</pre> | |||
| style="{{roundybr|6px}}; padding-right: 5px;" | | |||
# <li value="7">Item 1</li> | |||
# Item 2 | |||
# Item 3 | |||
# Item 4 | |||
|} | |||
====Mixed lists==== | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre># Item 1 | |||
# Item 2 | |||
#* Sub-item 1 | |||
#* Sub-item 2 | |||
#*# Sub-sub-item 1 | |||
#*# Sub-sub-item 2 | |||
#* Sub-item 3 | |||
#** Sub-sub-item | |||
# Item 3</pre> | |||
| style="{{roundybr|6px}}; padding-right: 5px;" | | |||
# Item 1 | |||
# Item 2 | |||
#* Sub-item 1 | |||
#* Sub-item 2 | |||
#*# Sub-sub-item 1 | |||
#*# Sub-sub-item 2 | |||
#* Sub-item 3 | |||
#** Sub-sub-item | |||
# Item 3 | |||
|} | |||
====Description lists==== | |||
To list terms and definitions, start a new line with a semicolon <code>;</code> followed by the term. Then, type a colon <code>:</code> followed by a definition. The format can also be used for other purposes, such as make and models of vehicles, etc. | |||
<code>< | Description lists consist of group names corresponding to values. Group names (terms) are in bold. Values (definitions) are indented. Each group '''must''' include one or more definitions. For a single or first value, the <code>:</code> can be placed on the same line after <code>;</code>, but subsequent values must be placed on separate lines. | ||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! style="width: 300px;" | Result | |||
|- style="background: #FFF;" | |||
| <pre>; Term : Definition 1</pre> | |||
| style="padding: 5px;" | | |||
; Term : Definition 1 | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>; Term | |||
: Definition 1 | |||
: Definition 2 | |||
: Definition 3 | |||
: Definition 4</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | | |||
; Term | |||
: Definition 1 | |||
: Definition 2 | |||
: Definition 3 | |||
: Definition 4 | |||
|} | |||
===Retaining newlines=== | |||
The MediaWiki software suppresses single newlines and converts lines starting with a space to preformatted text in a dashed box. It is often desirable to retain these elements for poems and lyrics. <code><nowiki><ab>...</ab></nowiki></code> tags maintain newlines. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | | |||
<pre><ab>''I wanna be the very best | |||
Like no one ever was | |||
To catch them is my real test | |||
To train them is my cause | |||
I will travel across the land | |||
Searching far and wide | |||
Teach Pokémon to understand | |||
The power that's inside''</ab></pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | | |||
<ab>''I wanna be the very best | |||
Like no one ever was | |||
To catch them is my real test | |||
To train them is my cause | |||
''' | I will travel across the land | ||
Searching far and wide | |||
Teach Pokémon to understand | |||
The power that's inside''</ab> | |||
|} | |||
== | ==Text formatting== | ||
{| {| class="roundy | {{shortcut|1|H:TEXT}} | ||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |- | ||
| | ! Description | ||
! Markup | |||
|- style="background: #{{bulba color}};" | ! Result | ||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | Italics, bold, and both | |||
| <pre>''italics'', '''bold''', and '''''both'''''</pre> | |||
| style= "padding: 5px;" | ''italics'', '''bold''', and '''''both''''' | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | Strikethrough text | |||
| <pre>Use <s>on articles</s> only on talk pages</pre> | |||
| style= "padding: 5px;" | Use <s>on articles</s> only on talk pages | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | Subscript and superscript | |||
| <pre>Make text <sub>subscript</sub> or <sup>superscript</sup> easily</pre> | |||
| style= "padding: 5px;" | Make text <sub>subscript</sub> or <sup>superscript</sup> easily | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | Small text | |||
| <pre>Use <small>small text</small> only when necessary</pre> | |||
| style= "padding: 5px;" | Use <small>small text</small> only when necessary | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | Big text | |||
| <pre>Avoid using <big>big text</big> where possible</pre> | |||
| style= "padding: 5px;" | Avoid using <big>big text</big> where possible | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | {{wp|Ruby character|Ruby characters}} | |||
| <pre>{{ruby|株式会社|かぶしきがいしゃ}}ジュピター</pre> | |||
| style= "padding: 5px;" | {{ruby|株式会社|かぶしきがいしゃ}}ジュピター | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | Color text | |||
| <pre><span style="color:#FF00FF">Magenta text</span></pre> | |||
| style= "padding: 5px;" | <span style="color:#FF00FF">Magenta text</span> | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | Highlight text | |||
| <pre><mark>Highlighted text</mark> | |||
<mark style="background:lightblue;">Highlighted text</mark></pre> | |||
| style= "padding: 5px;" | <mark>Highlighted text</mark><br /> | |||
<mark style="background:lightblue;">Highlighted text</mark> | |||
|- style="background: #FFF;" | |||
| style="padding: 5px; {{roundybl|6px}};" | Show code in text | |||
| <pre>Use a <code>:</code> to indent text | |||
Use a <code><nowiki><nowiki></nowiki><br /><nowiki></nowiki></nowiki></code> to create a new line</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | Use a <code>:</code> to indent text <br /> | |||
Use a <code><nowiki><br /></nowiki></code> to create a new line | |||
|} | |||
==Links== | |||
===Wikilinks=== | |||
{{shortcut|1|H:LINK}} | |||
Wikilinks are used in wikicode markup to produce internal links between pages. You create wikilinks by putting double square brackets <code><nowiki>[[ ]]</nowiki></code> around text designating the title of the page you want to link to. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |- | ||
|[[ | ! Markup | ||
|a | ! Result | ||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>[[Pokémon Trainer]]</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | [[Pokémon Trainer]] | |||
|} | |||
<span style="color:#CC2200">A red link</span> is a page that doesn't exist yet; it can be created by clicking on the link. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |- | ||
|[[ | ! Markup | ||
| | ! Result | ||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>[[Ash's Mudkip]]</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | {{red link|Ash's Mudkip}} | |||
|} | |||
A self link (a link to the page on which the link appears) will appear only as bold text. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |- | ||
|[[ | ! Markup | ||
|: | ! Result | ||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>[[Help:Editing]]</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | [[Help:Editing]] | |||
|} | |||
====Renamed links==== | |||
Links can be renamed by adding a <code>|</code> after the target page's name and before the final <code>]]</code>. A replacement name can then be typed between them. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |- | ||
|[[ | ! Markup | ||
| | ! Result | ||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>[[Pokémon Trainer|Trainer]]</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | [[Pokémon Trainer|Trainer]] | |||
|} | |||
=====Automatically renamed links===== | |||
In certain circumstances, it is possible to have a link be automatically renamed by typing the <code>|</code> character before the final <code>]]</code> and saving the page. The links will be automatically extended according to the following rules: | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |- | ||
|[[ | ! Description | ||
|: | ! Markup | ||
! Result | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | Automatically hide text in parentheses | |||
| <pre>[[Bulbasaur (Pokémon)|]]</pre> | |||
| style= "padding: 5px;" | [[Bulbasaur (Pokémon)|Bulbasaur]] | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | Automatically hide namespace | |||
| <pre>[[Bulbapedia:Editor's Hub|]]</pre> | |||
| style= "padding: 5px;" | [[Bulbapedia:Editor's Hub|Editor's Hub]] | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | Or both | |||
| <pre>[[Talk:Pikachu (Pokémon)|]]</pre> | |||
| style= "padding: 5px;" | [[Talk:Pikachu (Pokémon)|Pikachu]] | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | Text after commas are hidden too | |||
| <pre>[[Get Fired Up, Spiky-eared Pichu!|]]</pre> | |||
| style= "padding: 5px;" | [[Get Fired Up, Spiky-eared Pichu!|Get Fired Up]] | |||
|- style="background: #FFF;" | |||
| style="padding: 5px; {{roundybl|6px}};" | But this doesn't work for section links | |||
| <pre>[[Bulbapedia:Manual of Style#Links|]]</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | [[Bulbapedia:Manual of Style#Links|]] | |||
|} | |||
When previewing your edits, you will not see the expanded form until you press '''Save''' and '''Edit''' again. For this reason, and because of the limitations outlined above, it is almost ''always'' preferable to use a [[#Other link templates|link template]] instead. | |||
====Blended links==== | |||
Endings are automatically blended into the link, which can be useful when discussing plurals, rather than having to rename the link itself. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |- | ||
|[[ | ! Markup | ||
| | ! Result | ||
|- style="background: #FFF;" | |||
| <pre>[[Pokémon Trainer]]s</pre> | |||
| style="padding: 5px;" | [[Pokémon Trainer]]s | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>[[Move]]ment</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | [[Move]]ment | |||
|} | |||
This behaviour can be suppressed by adding <code><nowiki /></code> directly after the link. | |||
====Linking to page sections==== | |||
It is also possible to link directly to page [[#Sections|sections]] by including their title the link, separated by a <code>#</code>. These links can also be renamed. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |- | ||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| <pre>[[Pokémon Trading Card Game#Japanese sets]]</pre> | |||
| style="padding: 5px;" | [[Pokémon Trading Card Game#Japanese sets]] | |||
|- | |- style="background: #FFF;" | ||
|[[Pokémon | | style="{{roundybl|6px}};" | <pre>[[Pokémon Trading Card Game#Japanese sets|Japanese sets]]</pre> | ||
|: | | style="{{roundybr|6px}}; padding: 5px;" | [[Pokémon Trading Card Game#Japanese sets|Japanese sets]] | ||
|[[Pokémon | |||
|: | |||
| | |||
| | |||
|[[ | |||
| | |||
| | |||
|: | |||
|[[ | |||
| | |||
|} | |} | ||
It is also possible to link directly to other points on a page, by including the {{template|anchor}} template at the point you want to link to. | |||
====Interlanguage links==== | |||
{{shortcut|1|H:INTERLANG}} | |||
Bulbagarden is a member of [[Encyclopædiæ Pokémonis]], a group of seven Pokémon wikis in different languages. | |||
{| class="roundy" style="background: #000; padding: 2px;" cell-padding="5px" | |||
|- style="color: #FFF;" | |||
! Wiki | |||
! Language | |||
! Code | |||
! Template | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[PokéWiki]] | |||
| style= "padding: 5px;" | German | |||
| style= "padding: 5px;" | de | |||
| style= "padding: 5px;" | {{template|de}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[WikiDex]] | |||
| style= "padding: 5px;" | Spanish | |||
| style= "padding: 5px;" | es | |||
| style= "padding: 5px;" | {{template|es}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Poképédia]] | |||
| style= "padding: 5px;" | French | |||
| style= "padding: 5px;" | fr | |||
| style= "padding: 5px;" | {{template|fr}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Pokémon Central Wiki]] | |||
| style= "padding: 5px;" | Italian | |||
| style= "padding: 5px;" | it | |||
| style= "padding: 5px;" | {{template|it}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Pokémon Wiki]] | |||
| style= "padding: 5px;" | Japanese | |||
| style= "padding: 5px;" | ja | |||
| style= "padding: 5px;" | {{template|ja}} | |||
|- style="background: #FFF;" | |||
| style= "{{roundybl|6px}}; padding: 5px;" | [[52Poké Wiki]] | |||
| style= "padding: 5px;" | Chinese | |||
| style= "padding: 5px;" | zh | |||
| style= "{{roundybr|6px}}; padding: 5px;" | {{template|zh}} | |||
|} | |||
[[Pokéteca]], [[LANDpedia]] and [[Wikinezka]] are former members of Encyclopædiæ Pokémonis, and their interlanguage links have been removed. | |||
=====Links in the sidebar===== | |||
Links to the same article at another Encyclopædiæ Pokémonis wiki can be added to the sidebar, by including an interlanguage link at the bottom of an article, below [[#Categories|categories]]. It is also possible to link to a section of an article where more appropriate. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre> | |||
[[de:Hilfe:Bearbeitungshilfe]] | |||
[[es:Ayuda:Guía de edición]] | |||
[[it:Aiuto:Manuale di stile#Principi base del codice wiki (wikicode)]] | |||
[[ja:ポケモンWiki:編集例]] | |||
[[zh:Help:编辑页面]] | |||
</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | ''Links will appear in the sidebar.'' | |||
|} | |||
<code>< | =====Inline links===== | ||
It is also possible to add links to these wikis within the text of an article. To do this, begin the link with a <code>:</code>. However, while this is allowed, it is preferred that a [[#Other link templates|link template]] is used wherever possible. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| <pre>[[:ja:ピカチュウ]]</pre> | |||
| style="padding: 5px;" | [[:ja:ピカチュウ]] | |||
|- style="background: #FFF;" | |||
| <pre>{{ja|ピカチュウ}}</pre> | |||
| style="padding: 5px;" | {{ja|ピカチュウ}} | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>{{ja|ピカチュウ|Pikachu on Pokémon Wiki}}</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | {{ja|ピカチュウ|Pikachu on Pokémon Wiki}} | |||
|} | |||
Be aware that invalid interlanguage links will not appear as redlinks. Therefore, it is important to preview your edits before saving. | |||
[[ | ====Interwiki links==== | ||
{{shortcut|1|H:INTERWIKI}} | |||
Interwiki links are used to link to a page on a different wiki. Invalid interwiki links will not appear as redlinks and so it is important to preview your edits before saving. For a full list of interwiki codes, see [[Special:Interwiki]]. | |||
=====Bulbagarden===== | |||
It is possible to link to pages or files on [[Bulbagarden Archives]] and articles on the retired [[Bulbanews]] wiki using interwiki links or associated link templates. | |||
{| class="roundy" style="background: #000; padding: 2px;" cell-padding="5px" | |||
|- style="color: #FFF;" | |||
! Wiki | |||
! Code | |||
! Template | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Bulbagarden Archives]] | |||
| style= "padding: 5px;" | a | |||
| style= "padding: 5px;" | {{template|file}} | |||
==== | |- style="background: #FFF;" | ||
| style= "{{roundybl|6px}}; padding: 5px;" | [[Bulbanews]] | |||
| style= "padding: 5px;" | n | |||
| style= "{{roundybr|6px}}; padding: 5px;" | {{template|n}} | |||
|} | |||
Unlike [[#Inline links|inline interlanguage links]], there is no need to proceed the link with a <code>:</code>. Where possible, use a link template, rather than a plain link. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| <pre>{{file|Bulbapedia logo.png}}</pre> | |||
| style="padding: 5px;" | {{file|Bulbapedia logo.png}} | |||
|- style="background: #FFF;" | |||
| <pre>[[a:Category:Pikachu|Images of Pikachu]]</pre> | |||
| style="padding: 5px;" | [[a:Category:Pikachu|Images of Pikachu]] | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>{{n|Farfetch'd evolution Sirfetch'd revealed}}</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | {{n|Farfetch'd evolution Sirfetch'd revealed}} | |||
|} | |||
=====NIWA===== | |||
Bulbapedia is a member of the [[Nintendo Independent Wiki Alliance]], a group of 25 wikis each dedicated to a different [[Nintendo]] franchise or game. | |||
{| class="mw-collapsible mw-collapsed roundy" style="background: #000; padding: 2px; width: 400px;" cell-padding="5px" | |||
|+ NIWA wikis | |||
|- style="color: #FFF;" | |||
! Wiki | |||
! Code | |||
! Template | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Zelda Wiki]] | |||
| style= "padding: 5px;" | zw | |||
| style= "padding: 5px;" | {{template|zw}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Super Mario Wiki]] | |||
| style= "padding: 5px;" | smw | |||
| style= "padding: 5px;" | {{template|smw}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Ukikipedia]] | |||
| style= "padding: 5px;" | uki | |||
| style= "padding: 5px;" | {{template|uki}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Metroid Wiki]] | |||
| style= "padding: 5px;" | met | |||
| style= "padding: 5px;" | {{template|met}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[WiKirby]] | |||
| style= "padding: 5px;" | wk | |||
| style= "padding: 5px;" | {{template|wk}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Wars Wiki]] | |||
| style= "padding: 5px;" | ww | |||
| style= "padding: 5px;" | {{template|ww}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Lylat Wiki]] | |||
| style= "padding: 5px;" | lw | |||
| style= "padding: 5px;" | {{template|lw}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Pikipedia]] | |||
| style= "padding: 5px;" | pk | |||
| style= "padding: 5px;" | {{template|pk}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Pikmin Fanon]] | |||
| style= "padding: 5px;" | pkf | |||
| style= "padding: 5px;" | {{template|pkf}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[StrategyWiki]] | |||
| style= "padding: 5px;" | strategy | |||
| style= "padding: 5px;" | {{template|sw}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[SmashWiki]] | |||
| style= "padding: 5px;" | sbw | |||
| style= "padding: 5px;" | {{template|sbw}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[WikiBound]] | |||
| style= "padding: 5px;" | wb | |||
| style= "padding: 5px;" | {{template|wb}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Nookipedia]] | |||
| style= "padding: 5px;" | np | |||
| style= "padding: 5px;" | {{template|np}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Golden Sun Universe]] | |||
| style= "padding: 5px;" | gsu | |||
| style= "padding: 5px;" | {{template|gsu}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[NintendoWiki]] | |||
| style= "padding: 5px;" | nw | |||
| style= "padding: 5px;" | {{template|nw}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Fire Emblem Wiki]] | |||
| style= "padding: 5px;" | few | |||
| style= "padding: 5px;" | {{template|few}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Starfy Wiki]] | |||
| style= "padding: 5px;" | lsw | |||
| style= "padding: 5px;" | {{template|lsw}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[F-Zero Wiki]] | |||
| style= "padding: 5px;" | fzw | |||
| style= "padding: 5px;" | {{template|fzw}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Icaruspedia]] | |||
| style= "padding: 5px;" | ip | |||
| style= "padding: 5px;" | {{template|ip}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Dragon Quest Wiki]] | |||
| style= "padding: 5px;" | dqw | |||
| style= "padding: 5px;" | {{template|dqw}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Hard Drop Tetris Wiki]] | |||
| style= "padding: 5px;" | hdt | |||
| style= "padding: 5px;" | {{template|hdt}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Inkipedia]] | |||
| style= "padding: 5px;" | ink | |||
| style= "padding: 5px;" | {{template|ink}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[ARMS Institute]] | |||
| style= "padding: 5px;" | ai | |||
| style= "padding: 5px;" | {{template|ai}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Xeno Series Wiki]] | |||
| style= "padding: 5px;" | xsw | |||
| style= "padding: 5px;" | {{template|xsw}} | |||
|- style="background: #FFF;" | |||
| style= "{{roundybl|6px}}; padding: 5px;" | [[Dragalia Lost Wiki]] | |||
| style= "padding: 5px;" | dlw | |||
| style= "{{roundybr|6px}}; padding: 5px;" | {{template|dlw}} | |||
|} | |||
It is possible to link to these wikis using interwiki links or their associated link template. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| <pre>[[strategy:Super Smash Bros. Ultimate]]</pre> | |||
| style="padding: 5px;" | [[strategy:Super Smash Bros. Ultimate]] | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>{{sw|Super Smash Bros. Ultimate}}</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | {{sw|Super Smash Bros. Ultimate}} | |||
|} | |||
=====Wikimedia===== | |||
The {{wp|Wikimedia Foundation}} offers a series of free wikis, the most famous being {{wp|Wikipedia}}. | |||
{| class="mw-collapsible mw-collapsed roundy" style="background: #000; padding: 2px; width: 400px;" cell-padding="5px" | |||
|+ Wikimedia wikis | |||
|- style="color: #FFF;" | |||
! Wiki | |||
! Code | |||
! Template | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | {{wp|Main Page|Wikipedia}} (English) | |||
| style= "padding: 5px;" | wp | |||
| style= "padding: 5px;" | {{template|wp}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | {{dewp|Main Page|Wikipedia}} (German) | |||
| style= "padding: 5px;" | dewp | |||
| style= "padding: 5px;" | {{template|dewp}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | {{jwp|Main Page|Wikipedia}} (Japanese) | |||
| style= "padding: 5px;" | jwp | |||
| style= "padding: 5px;" | {{template|jwp}} | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[Wiktionary:Main Page|Wiktionary]] | |||
| style= "padding: 5px;" | Wiktionary | |||
| style= "padding: 5px;" | - | |||
|- style="background: #FFF;" | |||
| style= "padding: 5px;" | [[WikiBooks:Main Page|Wikibooks]] | |||
| style= "padding: 5px;" | WikiBooks | |||
| style= "padding: 5px;" | - | |||
|- style="background: #FFF;" | |||
| style= "{{roundybl|6px}}; padding: 5px;" | [[mw:Main Page|MediaWiki]] | |||
| style= "padding: 5px;" | mw | |||
| style= "{{roundybr|6px}}; padding: 5px;" | - | |||
|} | |||
It is possible to link to these wikis using interwiki links or (where available) their associated link template. | |||
[[ | {| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | ||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| <pre>[[wp:Pokémon]]</pre> | |||
| style="padding: 5px;" | [[wp:Pokémon]] | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>{{wp|Pokémon}}</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | {{wp|Pokémon}} | |||
|} | |||
===Other link templates=== | |||
{{main|Bulbapedia:List of link templates}} | |||
A link template is a type of [[Help:Templates|template]] that produces a standardised format of link. Because the wiki has thousands of pages, these standardised links are helpful because they create consistency across the wiki and mean that changes need only be made to one page, rather than hundreds. Because of this, it is an [[Bulbapedia:Link templates|official guideline]] that link templates should be used whenever possible. | |||
=== | ===Redirects=== | ||
{{shortcut|1|H:REDIRECT}} | |||
A redirect is a page created so that navigating to a given title takes the reader directly to a different page. It is also possible to redirect to a particular section on a page. Redirects are usually created because readers may search for an article under different names, but it is not necessary to create redirects from every title an editor may conceivably wish to link to a given page. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| <pre>#REDIRECT [[Bulbasaur (Pokémon)]]</pre> | |||
| style="padding: 5px;" | [[File:Redirect.png|30px|link=]] [[Bulbasaur (Pokémon)]] | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>#REDIRECT [[Bulbasaur (Pokémon)#Game data]]</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | [[File:Redirect.png|30px|link=]] [[Bulbasaur (Pokémon)#Game data]] | |||
|} | |||
Redirects will only work if the very first thing on the page is <code>#REDIRECT</code>, followed by a valid wikilink. | |||
===Categories=== | |||
{{shortcut|1|H:CAT}} | |||
Categories, a software feature of MediaWiki, provide automatic indexes that are useful as tables of contents. You can categorize pages and files by adding one or more Category tags to the wikicode. These tags create links at the bottom of the page that take you to the list of all pages in that category, which makes it easy to browse related articles. | |||
< | {| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | ||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>[[Category:Help]]</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | ''Links will appear in a bar at the bottom of the page.'' | |||
|} | |||
Categories are usually added at the bottom of the wikicode. However, some templates will add pages to categories when used. | |||
It is also possible to link to a category page within the text of an article. To do this, begin the link with a <code>:</code>. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| <pre>[[:Category:Help]]</pre> | |||
| style="padding: 5px;" | [[:Category:Help]] | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>[[:Category:Help|More help pages]]</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | [[:Category:Help|More help pages]] | |||
|} | |||
===External links=== | |||
{{shortcut|1|H:EXT}} | |||
It is possible to link to external websites within wikicode. However, external links normally should not be placed in the body of an article, and instead should be placed within a dedicated section, within an infobox template, or as part of a [[#References|reference]]. Acceptable external links are websites containing further relevant information to the topic at hand, and no page should be linked to unless it meets this criterion. You must '''never''' link to illegally obtained material such as ROMs and hacks. | |||
It is possible to link to external websites in three ways: | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| <pre>https://www.pokemon.com/</pre> | |||
| style="padding: 5px;" | https://www.pokemon.com/ | |||
|- style="background: #FFF;" | |||
| <pre>[https://www.pokemon.com/]</pre> | |||
| style="padding: 5px;" | [https://www.pokemon.com/] | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>[https://www.pokemon.com/ Pokémon website]</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | [https://www.pokemon.com/ Pokémon website] | |||
|} | |||
The third option is usually the preferred choice, but the text used must be descriptive, and never misleading. | |||
It is also possible to link to external images: | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>http://www.bulbagarden.net/gateway/banner-pikachu.png</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | http://www.bulbagarden.net/gateway/banner-pikachu.png | |||
|} | |||
However, this is not normally allowed on content namespaces. Instead, images should be uploaded to [[Bulbagarden Archives]]. | |||
==Images== | |||
{{main|Help:Images}} | |||
== | ==Tables== | ||
{{main|Help:Tables}} | |||
==Referencing== | |||
:''See also: [[Bulbapedia:Referencing]]'' | |||
Inline citations allow users of Bulbapedia see the sources used to create the articles they read on the wiki. | |||
< | References are added directly after a fact they support, or at the end of the sentence they support. The reference includes the web page the information comes from, and the date the information was found. | ||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! style="width: 500px;" | Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>Hello World!<ref>[https://www.nintendo.com/whatsnew/ ''News'' - Nintendo.com] (retrieved October 15, 2022)</ref></pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | Hello World!<ref>[https://www.nintendo.com/whatsnew/ ''News'' - Nintendo.com] (retrieved October 15, 2022)</ref> | |||
|} | |||
References can be named, so that they can be used again within the same article. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! style="width: 500px;" | Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>Hello World!<ref name="Poké">[https://www.pokemon.com/us/pokemon-news/ ''Pokémon News'' - Pokémon.com] (retrieved October 15, 2022)</ref> | |||
[ | Hello again!<ref name="Poké" /></pre> | ||
| style="{{roundybr|6px}}; padding: 5px;" | Hello World!<ref name="Poké">[https://www.pokemon.com/us/pokemon-news/ ''Pokémon News'' - Pokémon.com] (retrieved October 15, 2022)</ref> | |||
Hello again!<ref name="Poké" /> | |||
|} | |||
References are displayed at the bottom of the article, in their own dedicated section. | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- | |||
! Markup | |||
! Result | |||
|- style="background: #FFF;" | |||
| style="{{roundybl|6px}};" | <pre>==References== | |||
{{reflist}}</pre> | |||
| style="{{roundybr|6px}}; padding: 5px;" | | |||
<div style="font-size: 150%; font-family: sans-serif; margin-top: 1em; margin-bottom: 0.25em; line-height: 1.3; padding: 0; border-bottom: 1px solid #AAAAAA;">References</div> | |||
{{reflist}} | |||
|} | |||
==Templates== | |||
{{main|Help:Templates}} | |||
==Magic words== | |||
{{shortcut|1|H:MAGIC}} | |||
:''For a full list, see [[mw:Help:Magic words]]'' | |||
Magic words (including parser functions, variables and behavior switches) are features of wikicode that give instructions to Bulbapedia's underlying MediaWiki software and are especially useful for templates. | |||
* Behavior switches (e.g. <code><nowiki>__NOTOC__</nowiki></code>) will change the behavior of a page, rather than return a value. | |||
* Parser functions (e.g. <code><nowiki>{{#ifexpr:Y|Yes|No}}</nowiki></code>) will take a value and return a value. | |||
* Variables (e.g. <code><nowiki>{{PAGENAME}}</nowiki></code>) will return a value in their place. | |||
== | ===Behaviour switches=== | ||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- style="color: #000;" | |||
! Word | |||
! Description | |||
|- style="background: #FFF;" | |||
| <pre>__NOTOC__</pre> | |||
| style= "padding: 5px;" | Hides the [[#Table of contents|table of contents]]. | |||
|- style="background: #FFF;" | |||
| <pre>__FORCETOC__</pre> | |||
| style= "padding: 5px;" | Forces the TOC to appear at the normal location regardless of the number of headings. | |||
|- style="background: #FFF;" | |||
| <pre>__TOC__</pre> | |||
| style= "padding: 5px;" | Forces the TOC to appear at the point where the magic word is inserted instead of the normal location. | |||
|- style="background: #FFF;" | |||
| <pre>__NOEDITSECTION__</pre> | |||
| style= "padding: 5px;" | Hides the section edit links beside headings. | |||
|- style="background: #FFF;" | |||
| <pre>__NEWSECTIONLINK__</pre> | |||
| style= "padding: 5px;" | Adds a link beside the "Edit" tab for adding a new section on a non-talk page. | |||
|- style="background: #FFF;" | |||
| <pre>__NONEWSECTIONLINK__</pre> | |||
| style= "padding: 5px;" | Removes the link beside the "Edit" tab on pages in talk namespaces. | |||
|- style="background: #FFF;" | |||
| <pre>__HIDDENCAT__</pre> | |||
| style= "padding: 5px;" | Used on a category page, hides the category from the lists of categories in its members and parent categories. | |||
|- style="background: #FFF;" | |||
| <pre>__EXPECTUNUSEDCATEGORY__</pre> | |||
| style= "padding: 5px;" | Used on a category page, removes the category from [[Special:UnusedCategories]]. | |||
|- style="background: #FFF;" | |||
| style= "{{roundybl|6px}}" | <pre>__DISAMBIG__</pre> | |||
| style= "{{roundybr|6px}}; padding: 5px;" | Identifies a disambiguation page. | |||
|} | |||
===Parser functions=== | |||
Parser functions can have an impact on system resources, and thus should be used sparingly, and only when strictly necessary. Typically, parser functions are only used in templates. See [[mw:Help:Extension:ParserFunctions]] for a list of available parser functions, and [[Help:Templates]] for how they can be used on Bulbapedia. | |||
< | ===Variables=== | ||
| | ====Date & time==== | ||
| | The following variables return the current date and time in UTC. Due to MediaWiki and browser caching, these variables frequently show when the page was cached rather than the current time. | ||
|- | {| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | ||
| | |- style="color: #000;" | ||
| | ! Word | ||
|- | ! Output | ||
| | ! Description | ||
| | |- style="background: #FFF;" | ||
|}</ | | <pre>{{CURRENTYEAR}}</pre> | ||
| style= "padding: 5px;" | {{CURRENTYEAR}} | |||
| style= "padding: 5px;" | Year. | |||
|- style="background: #FFF;" | |||
| <pre>{{CURRENTMONTH}}</pre> | |||
| style= "padding: 5px;" | {{CURRENTMONTH}} | |||
| style= "padding: 5px;" | Month (zero-padded number). | |||
|- style="background: #FFF;" | |||
| <pre>{{CURRENTMONTH1}}</pre> | |||
| style= "padding: 5px;" | {{CURRENTMONTH1}} | |||
| style= "padding: 5px;" | Month (unpadded number). | |||
|- style="background: #FFF;" | |||
| <pre>{{CURRENTMONTHNAME}}</pre> | |||
| style= "padding: 5px;" | {{CURRENTMONTHNAME}} | |||
| style= "padding: 5px;" | Month (name). | |||
|- style="background: #FFF;" | |||
| <pre>{{CURRENTMONTHABBREV}}</pre> | |||
| style= "padding: 5px;" | {{CURRENTMONTHABBREV}} | |||
| style= "padding: 5px;" | Month (abbreviation). | |||
|- style="background: #FFF;" | |||
| <pre>{{CURRENTDAY}}</pre> | |||
| style= "padding: 5px;" | {{CURRENTDAY}} | |||
| style= "padding: 5px;" | Day of the month (unpadded number). | |||
|- style="background: #FFF;" | |||
| <pre>{{CURRENTDAY2}}</pre> | |||
| style= "padding: 5px;" | {{CURRENTDAY2}} | |||
| style= "padding: 5px;" | Day of the month (zero-padded number). | |||
|- style="background: #FFF;" | |||
| <pre>{{CURRENTDAYNAME}}</pre> | |||
| style= "padding: 5px;" | {{CURRENTDAYNAME}} | |||
| style= "padding: 5px;" | Day of the week (name). | |||
|- style="background: #FFF;" | |||
| style= "{{roundybl|6px}}" | <pre>{{CURRENTTIME}}</pre> | |||
| style= "padding: 5px;" | {{CURRENTTIME}} | |||
| style= "{{roundybr|6px}}; padding: 5px;" | Time (24-hour HH:mm format). | |||
|} | |||
====Technical metadata==== | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- style="color: #000;" | |||
! Word | |||
! Output | |||
! Description | |||
|- style="background: #FFF;" | |||
| <pre>{{SITENAME}}</pre> | |||
| style= "padding: 5px;" | {{SITENAME}} | |||
| style= "padding: 5px;" | The wiki's site name. | |||
|- style="background: #FFF;" | |||
| <pre>{{SERVERNAME}}</pre> | |||
| style= "padding: 5px;" | {{SERVERNAME}} | |||
| style= "padding: 5px;" | Subdomain and domain name. | |||
|- style="background: #FFF;" | |||
| <pre>{{REVISIONDAY}}</pre> | |||
| style= "padding: 5px;" | {{REVISIONDAY}} | |||
| style= "padding: 5px;" | Day latest revision to current page was made (unpadded number). | |||
|- style="background: #FFF;" | |||
| <pre>{{REVISIONDAY2}}</pre> | |||
| style= "padding: 5px;" | {{REVISIONDAY2}} | |||
| style= "padding: 5px;" | Day latest revision to current page was made (zero-padded number). | |||
|- style="background: #FFF;" | |||
| <pre>{{REVISIONMONTH}}</pre> | |||
| style= "padding: 5px;" | {{REVISIONMONTH}} | |||
| style= "padding: 5px;" | Month latest revision to current page was made (zero-padded number). | |||
|- style="background: #FFF;" | |||
| <pre>{{REVISIONMONTH1}}</pre> | |||
| style= "padding: 5px;" | {{REVISIONMONTH1}} | |||
| style= "padding: 5px;" | Month latest revision to current page was made (unpadded number). | |||
|- style="background: #FFF;" | |||
| <pre>{{REVISIONYEAR}}</pre> | |||
| style= "padding: 5px;" | {{REVISIONYEAR}} | |||
| style= "padding: 5px;" | Year latest revision to current page was made. | |||
|- style="background: #FFF;" | |||
| style= "{{roundybl|6px}}" | <pre>{{REVISIONUSER}}</pre> | |||
| style= "padding: 5px;" | {{REVISIONUSER}} | |||
| style= "{{roundybr|6px}}; padding: 5px;" | The username of the user who made the most recent edit to the page (or the current user when previewing an edit). | |||
|} | |||
{| | ====Statistics==== | ||
| | Numbers returned by these variables normally contain commas but can return raw numbers with the ":R" flag (for example, <code><nowiki>{{NUMBEROFPAGES}}</nowiki></code> → {{NUMBEROFPAGES}} and <code><nowiki>{{NUMBEROFPAGES:R}}</nowiki></code> → {{NUMBEROFPAGES:R}}). | ||
| | {| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | ||
|- | |- style="color: #000;" | ||
| | ! Word | ||
| | ! Output | ||
|- | ! Description | ||
| | |- style="background: #FFF;" | ||
| | | <pre>{{NUMBEROFPAGES}}</pre> | ||
| style= "padding: 5px;" | {{NUMBEROFPAGES}} | |||
| style= "padding: 5px;" | Number of wiki pages. | |||
|- style="background: #FFF;" | |||
| <pre>{{NUMBEROFARTICLES}}</pre> | |||
| style= "padding: 5px;" | {{NUMBEROFARTICLES}} | |||
| style= "padding: 5px;" | Number of pages in content namespaces that qualify as articles. | |||
|- style="background: #FFF;" | |||
| <pre>{{NUMBEROFEDITS}}</pre> | |||
| style= "padding: 5px;" | {{NUMBEROFEDITS}} | |||
| style= "padding: 5px;" | Number of wiki edits. | |||
|- style="background: #FFF;" | |||
| <pre>{{NUMBEROFFILES}}</pre> | |||
| style= "padding: 5px;" | {{NUMBEROFFILES}} | |||
| style= "padding: 5px;" | Number of uploaded files (only useful on [[Bulbagarden Archives]]). | |||
|- style="background: #FFF;" | |||
| <pre>{{NUMBEROFUSERS}}</pre> | |||
| style= "padding: 5px;" | {{NUMBEROFUSERS}} | |||
| style= "padding: 5px;" | Number of registered users. | |||
|- style="background: #FFF;" | |||
| <pre>{{NUMBEROFADMINS}}</pre> | |||
| style= "padding: 5px;" | {{NUMBEROFADMINS}} | |||
| style= "padding: 5px;" | Number of users in the [[Bulbapedia:Staff|''sysop'' group]]. | |||
|- style="background: #FFF;" | |||
| style= "{{roundybl|6px}}" | <pre>{{NUMBEROFACTIVEUSERS}}</pre> | |||
| style= "padding: 5px;" | {{NUMBEROFACTIVEUSERS}} | |||
| style= "{{roundybr|6px}}; padding: 5px;" | Number of active users, based on the criteria used in [[Special:Statistics]]. | |||
|} | |} | ||
== | ====Page modifiers==== | ||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- style="color: #000;" | |||
! Word | |||
! Description | |||
|- style="background: #FFF;" | |||
| style= "padding: 15px 5px 15px 5px;" | <code><nowiki>{{DISPLAYTITLE:</nowiki>''title''}}</code> | |||
| style= "padding: 5px;" | Format the current page's title header. <br />The value must be equivalent to the default title: only capitalization changes to certain parts of the title (not all), adding italics, and replacing spaces with underscores are allowed. | |||
|- style="background: #FFF;" | |||
| style= "padding: 15px 5px 15px 5px; {{roundybl|6px}}" | <code><nowiki>{{DEFAULTSORT:</nowiki>''sortkey''}}</code> | |||
| style= "{{roundybr|6px}}; padding: 5px;" | Used for categorizing pages, sets a default category sort key. <br />For example, if you put <code><nowiki>{{DEFAULTSORT:Underground, The}}</nowiki></code> at the end of [[The Underground]], the page would be sorted under "U" by default in categories. | |||
|} | |||
====Page names==== | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- style="color: #000;" | |||
! Word | |||
! Output | |||
! Description | |||
|- style="background: #FFF;" | |||
| <pre>{{FULLPAGENAME}}</pre> | |||
| style= "padding: 5px;" | {{FULLPAGENAME}} | |||
| style= "padding: 5px;" | Namespace and full page title (including all subpage levels). | |||
|- style="background: #FFF;" | |||
| <pre>{{PAGENAME}}</pre> | |||
| style= "padding: 5px;" | {{PAGENAME}} | |||
| style= "padding: 5px;" | Full page title (including all subpage levels) without the namespace. | |||
|- style="background: #FFF;" | |||
| <pre>{{BASEPAGENAME}}</pre> | |||
| style= "padding: 5px;" | {{BASEPAGENAME}} | |||
| style= "padding: 5px;" | Page title of the page in the immediately superior subpage level without the namespace. <br />For example, it would return <code>Title/Foo</code> on page <code>Help:Title/Foo/Bar</code>. | |||
|- style="background: #FFF;" | |||
| <pre>{{ROOTPAGENAME}}</pre> | |||
| style= "padding: 5px;" | {{ROOTPAGENAME}} | |||
| style= "padding: 5px;" | Name of the root of the current page. Would return <code>Title</code> on page <code>Help:Title/Foo/Bar</code>. | |||
|- style="background: #FFF;" | |||
| <pre>{{SUBPAGENAME}}</pre> | |||
| style= "padding: 5px;" | {{SUBPAGENAME}} | |||
| style= "padding: 5px;" | The subpage title. Would return <code>Bar</code> on page <code>Help:Title/Foo/Bar</code>. <br />If no subpage exists the value of <code><nowiki>{{PAGENAME}}</nowiki></code> is returned. | |||
|- style="background: #FFF;" | |||
| <pre>{{SUBJECTPAGENAME}}</pre> | |||
| style= "padding: 5px;" | {{SUBJECTPAGENAME}} | |||
| style= "padding: 5px;" | Full page name of the associated subject (e.g. article or file). Useful on talk pages. | |||
|- style="background: #FFF;" | |||
| style= "{{roundybl|6px}}" | <pre>{{TALKPAGENAME}}</pre> | |||
| style= "padding: 5px;" | {{TALKPAGENAME}} | |||
| style= "{{roundybr|6px}}; padding: 5px;" | Full page name of the associated talk page. | |||
|} | |||
====Namespaces==== | |||
{| class="roundy" style="background: #{{bulba color}}; padding: 2px;" | |||
|- style="color: #000;" | |||
! Word | |||
! Output | |||
! Description | |||
|- style="background: #FFF;" | |||
| <pre>{{NAMESPACE}}</pre> | |||
| style= "padding: 5px;" | {{NAMESPACE}} | |||
| style= "padding: 5px;" | Name of the page's namespace (except for main space). | |||
|- style="background: #FFF;" | |||
| <pre>{{NAMESPACENUMBER}}</pre> | |||
| style= "padding: 5px;" | {{NAMESPACENUMBER}} | |||
| style= "padding: 5px;" | ID of the page's namespace. | |||
|- style="background: #FFF;" | |||
| <pre>{{SUBJECTSPACE}}</pre> | |||
| style= "padding: 5px;" | {{SUBJECTSPACE}} | |||
| style= "padding: 5px;" | Name of the associated content namespace. Useful on talk pages. | |||
|- style="background: #FFF;" | |||
| style= "{{roundybl|6px}}" | <pre>{{TALKSPACE}}</pre> | |||
| style= "padding: 5px;" | {{TALKSPACE}} | |||
| style= "{{roundybr|6px}}; padding: 5px;" | Name of the associated talk namespace. | |||
|} | |||
== | ==See also== | ||
* [[Help:Cheatsheet]] | |||
[[Category:Help]] | |||
[[de:Hilfe:Bearbeitungshilfe]] | |||
[[es:Ayuda:Guía de edición]] | |||
[[it:Aiuto:Manuale di stile#Principi base del codice wiki (wikicode)]] | |||
[[ja:ポケモンWiki:編集例]] | |||
[[zh:Help:编辑页面]] | |||
[ |