User:Tomdo08/doc/howto
Quicklinks: Tomdo08 | subpages | statistics | search | extra | howto | style | heap | articles&themes | ideas&bugs | workshop | books | sandbox
What can be done?
Switches, variables and functions
[edit]Useful switches
[edit]__NEWSECTIONLINK__
__FORCETOC__
{{DISPLAYTITLE|title}}
Useful variables
[edit]{{TALKPAGENAME}}
{{SUBJECTPAGENAME}}
Useful functions
[edit]string string string String formatted num date xyz
Fullurl
[edit]not "{{thisurl|…
",
but {{fullurl:…
Formatting
[edit]General formatting
[edit]Symbols
[edit]…
Formatting references and footnotes
[edit]Wikipedia:Manual of Style (footnotes)
Formatting citations
[edit]citation templates: {{cite book}}
{{cite journal}}
{{cite news}}
{{cite web}}
old/other citation template: {{citation}}
HTML: <cite>…</cite>
{{CIA World Factbook link|COUNTRY_CODE|COUNTRY_NAME}}
Citation Tool semi-bot (useful?test it!)
Formatting dates
[edit]{{dts|date|format=dmy|nowrap=off}}
{{dts|year|month|day|bc|format=dmy|nowrap=off}}
- deprecated?:
{{date sortable|date}}
}{{date sortable|v=2|date}}
} {{date|date|style}}
{{start date|year|month|day|HH|MM|SS|TimeZone}}
{{end date|…}}
{{birth date|year|month|day|df=yes}}
{{death date|…}}
{{start-date|date|…}}
{{end-date|…}}
{{birth-date|date|…}}
{{death-date|…}}
{{start date and age|yyyy|mm|dd|df=yes|br=yes}}
Formatting wikilinks
[edit]Wikipedia:Template messages/Links#Internal links
Pipe trick
[edit]The Pipe trick:
- autoformatting with symbol "
|
" - example:
[[somewikilink|]]
- works as a
subst
- works also for templates
Slash trick
[edit][[/tools/]]
will give the same as [[/tools|tools]]
Reverse pipe trick
[edit][[|
A]]
in page B (C)
links to
to page A (C)
Sectionlink
[edit]{{Sectionlink|section}}
gives a link to {{SUBJECTPAGE}}#Section
{{Sectionlink|page|section}}
gives a link to page#Section
Both versions look like [[…|section]]
Formatting diffs
[edit]{{diff|page=PAGENAME|diff=NEWID|oldid=OLDID|label=LABEL}}
Formatting navigation links
[edit]Formatting links to special pages
[edit][[special:pagename/first argument]]
Formatting external links
[edit]Wikipedia:Template messages/Links#External links
{{soft redirect|target}}
{{wi}}
(add a {{subst:long comment}}
afterwards)
Formatting translations
[edit]{{lang-de|item}}
{{lang-en|item}}
Formatting and creating TOC
[edit]{{toc left}}
{{toc right}}
{{toc right|clear=left,right,both|width=width}}
{{toc nest right}}
Formatting boxes and thingies
[edit]{{clear}}
{{clearleft}}
{{clearright}}
Line manipulation
[edit]- A semicolon at the start of a line …
… is rendering the line as bold paragraph.
- A colon at the start of a line …
… is rendering the line as an indented paragraph.
Formatting code
[edit]<code>…</code>
<syntaxhighlight lang="…">…</syntaxhighlight>
{{var|variable}}
instead of {{var|variable}}
-> both rendering variable -> do not forget <code>
)
Formatting templates and wikicode
[edit]{{tlx|…}}
{{wikivar|WIKIWORD|WIKIVARIABLE}}
{{tlx|template|date{{=}}
{{CURRENTMONTHNAME}}
{{CURRENTYEAR}}
}}
see Pipe trick
Formatting disambiguation
[edit]Hatnotes
[edit]{{about}}
{{about|use1|use2|page2}}
is about
{{redirect|redirterm|use1|page1|use2|page2|and|page3}}
is redirect from ...
Disambiguation pages
[edit]{{disambig|…}}
{{refer|alternatename1|alternatename2|type=also,stand,name}}
Formatting Tables
[edit]Infoboxes
[edit]{{Infobox settlement|...}}
Rendering problems
[edit]Wikipedia:How to fix bunched-up edit links
Mikroformatting
[edit]{{as of|YEAR|MONTH|DAY|alt=ALTTEXT|lc=on|url=CHECKURL}}
Formatting examples
[edit]{{lorem ipsum|number of pragraphs|prefix|suffix}}
Talkpage formatting
[edit]Talkback message:
{{talkback|Tomdo08|section}}
{{subst:mytalk|section|ts=~~~~~}}
{{subst:Please see|location|topic=topic}}
Talkpage intro:
{{usertalkback|you=notify|me=notify|small=no|icon=none}}
Linking
[edit]General linking
[edit]Category:Internal link templates
Linking URL
[edit]Linking intra- and inter-project
[edit]Anchor
[edit]{{anchor|name|…}}
Linking TOC
[edit]linking to TOC: [[#toc|Contents]]/
makes Contents
Edit templates
[edit]- {{Ed}} — plain-style edit link surrounded by <small> tags, specifically for templates only
- {{Ed right}} — plain-style edit link surrounded by <small> tags and aligned to right of page, specifically for templates only
- {{Edit}} — plain-style edit link, applicable to all Wikipedia namespaces
- {{Edit section}} — edit link surrounded by <div> tags by default which can specify which section to edit on a page, applicable to all Wikipedia namespaces
- {{Vedit}} — plain-style edit link which edit with the Wikipedia:VisualEditor, applicable to all Wikipedia namespaces
Templates with view, talk and edit links:
- {{Navbar}} — navigation bar with configurable caption and view·talk·edit links, specifically for templates only
- {{View}} — navbar-style view·talk·edit links, specifically for templates only
- {{VTE}} & {{V}} — navbar-style V·T·E links (i.e. view·talk·edit links in short forms), specifically for templates only
Linking disambiguation and redirection
[edit]always link to "something (disambiguation)
" or "[[something (disambiguation)|replacetext]]
"
for (disambiguation)-redirects to a disambiguation page: {{R to disambiguation page}}
for redirects to a disambiguation page which should not be linked to {{R from ambiguous page}}
Wikipedia:Template messages/General#Disambiguation and redirection
Linking Categories
[edit]- … do autolinking to containing page from category pages.
- … are invisible.
- … use the parameter as Sortkey
Linking Wikipedia Books
[edit]{{Wikipedia-Books link|book name|link text}}
Linking and including images
[edit]To make a simple link, a special syntax is necessary:
Wikipedia:Picture tutorial#Linking without displaying
The simple link is misused for a special template action (thereby completely obscuring name, content and usage):
Help:Files#Using files
Tagging
[edit]Tagging for deletion
[edit]{{subst:proposed deletion|reason}}
Tags for redirects
[edit]Un-shortpage-ing
[edit]{{subst:long comment}}
Item separation
[edit]<nowiki></nowiki>
Transclusions and templates
[edit]good for multiple inclusion of same things, special things, templates
examples:
{{Talk:Pussycat/Let's delete Pussycat}}
{{Special:Prefixindex/General}}
{{Special:Recentchangeslinked/General}}
, see also Related changes
<noinclude> … </noinclude>
<includeonly> … </includeonly>
<onlyinclude> … </onlyinclude>
(see Help:Template#Noinclude, includeonly, and onlyinclude )
{{User:Tomdo08/workpanel above}}
{{User:Tomdo08/workpanel below}}
Template programming
[edit]Message templates
[edit]{{Citation needed|date=September 2024}}
{{Lead too long|date=September 2024}}
{{Merge|…|discuss=
{{sectionlink|…}}
|date=September 2024}}
link[disambiguation needed] is made by [[link]]
{{dn}}
Quicklinks: Tomdo08 | subpages | statistics | search | extra | howto | style | heap | articles&themes | ideas&bugs | workshop | books | sandbox