User:Tomdo08/doc/howto

From Wikipedia, the free encyclopedia

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:…

Help:Magic words#Paths

Wikipedia:Please use fullurl

Formatting[edit]

General formatting[edit]

Symbols[edit]

Formatting references and footnotes[edit]

Wikipedia:Manual of Style (footnotes)

Reference converter

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]

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]

Template:Navbox

Formatting links to special pages[edit]

[[special:pagename/first argument]]

Formatting external links[edit]

Wikipedia:Template messages/Links#External links

{{dead link|date=April 2024}}
{{dead link|url=wayback-machine history|date=April 2024}}

{{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]

{{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]

Template:Otheruses templates

{{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]

Help:Table

Infoboxes[edit]

{{Infobox settlement|...}}

Rendering problems[edit]

Wikipedia:How to fix bunched-up edit links

Mikroformatting[edit]

Wikipedia:Microformats

{{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]

Help:URL

Percent-encoding

Linking intra- and inter-project[edit]

Anchor[edit]

{{anchor|name|…}}

Linking TOC[edit]

linking to TOC: [[#toc|Contents]]/ makes Contents

Edit templates[edit]

[] Compare different edit templates:
  • {{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}}

{{R from alternative name}}

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]

Category:Redirect templates

Un-shortpage-ing[edit]

{{subst:long comment}}

Item separation[edit]

<nowiki></nowiki>

Transclusions and templates[edit]

Wikipedia:Transclusion

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}}

subst:

Template programming[edit]

Help:Template

Message templates[edit]

Wikipedia:Template messages

Template:Multiple issues

{{Citation needed|date=April 2024}}

{{Lead too long|date=April 2024}}

{{Merge|…|discuss={{sectionlink|…}}|date=April 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