Safer Nicotine Wiki:Namespace: Difference between revisions

Jump to navigation Jump to search
no edit summary
m (1 revision imported)
No edit summary
Line 1: Line 1:
{{redirect-distinguish|WP:NS|Wikipedia:WikiProject Nova Scotia}}
{{dablink|"WP:NS" redirects here. You may be looking for [[Wikipedia:WikiProject Nova Scotia]].}}
{{pp-semi-vandalism|small=yes}}{{pp-move-indef}}
{{pp-semi-vandalism|small=yes}}{{pp-move-indef}}
{{Infopage|WP:NS|WP:NSPACE|style=margin:1.0em auto;}}
{{Infopage|WP:NS|WP:NSPACE|style=margin:1.0em auto;}}
Line 6: Line 6:
A Wikipedia '''namespace''' is a set of Wikipedia pages whose [[Help:page name|names]] begin with a particular reserved word recognized by the [[MediaWiki]] software (followed by a colon). For example, in the ''user namespace'' all titles begin with the prefix ''User:''. In the case of the article (or main) namespace, in which encyclopedia articles appear, the reserved word and colon are absent. (Note: main space articles can optionally include a colon at the beginning with no reserved word, so <code>[<nowiki/>[Article]]</code> and <code>[<nowiki/>[:Article]]</code> are equivalent. This is usually only necessary for the advanced technique of [[WP:Transclusion|transcluding]] a main space article into another page.)
A Wikipedia '''namespace''' is a set of Wikipedia pages whose [[Help:page name|names]] begin with a particular reserved word recognized by the [[MediaWiki]] software (followed by a colon). For example, in the ''user namespace'' all titles begin with the prefix ''User:''. In the case of the article (or main) namespace, in which encyclopedia articles appear, the reserved word and colon are absent. (Note: main space articles can optionally include a colon at the beginning with no reserved word, so <code>[<nowiki/>[Article]]</code> and <code>[<nowiki/>[:Article]]</code> are equivalent. This is usually only necessary for the advanced technique of [[WP:Transclusion|transcluding]] a main space article into another page.)


Wikipedia has 34 current namespaces: 16 subject namespaces, 16 corresponding talk namespaces, and 2 virtual namespaces. These are all listed in the box to the right. While surfing Wikipedia, a list of namespaces is available in two clicks: do an empty search, then click ''Advanced'' under the search box. The list also makes itself available where needed in the dropdown menus of, for example, [[Special:Prefixindex]], [[Special:Allpages]], [[Special:Recentchanges]], and [[Special:Contributions]].
Wikipedia has 30 current namespaces: 14 subject namespaces, 14 corresponding talk namespaces, and 2 virtual namespaces. These are all listed in the box to the right. While surfing Wikipedia, a list of namespaces is available in two clicks: do an empty search, then click ''Advanced'' under the search box. The list also makes itself available where needed in the dropdown menus of, for example, [[Special:Prefixindex]], [[Special:Allpages]], [[Special:Recentchanges]], and [[Special:Contributions]].


The aliases '''WP''' for '''Wikipedia''', and '''WT''' for '''Wikipedia&nbsp;talk''', work for page names in the search box, and making links as well as inclusions. See [[#Aliases|Aliases]] below for other aliases. (The pseudo-namespaces such as '''H''' for '''Help''', and '''CAT''' for '''Category''', are extremely limited. See ''[[#Pseudo-namespaces|Pseudo-namespaces]]'' below.)
The aliases '''WP''' for '''Wikipedia''', and '''WT''' for '''Wikipedia&nbsp;talk''', work for page names in the search box, and making links as well as inclusions. See [[#Aliases|Aliases]] below for other aliases. (The pseudo-namespaces such as '''H''' for '''Help''', and '''CAT''' for '''Category''', are extremely limited. See ''[[#Pseudo-namespaces|Pseudo-namespaces]]'' below.)
Line 38: Line 38:
* '''[[Wikipedia:Module namespace|Module namespace]]''' (prefix '''Module:'''): contains [[mw:Extension:Scribunto|Scribunto]] modules&nbsp;– Lua scripts implementing special-purpose [[mw:Manual:Parser functions|parser functions]] for use in templates, beyond the [[Help:Magic words#Parser functions|basic set]] included with MediaWiki and its [[mw:Extensions FAQ|extensions]].
* '''[[Wikipedia:Module namespace|Module namespace]]''' (prefix '''Module:'''): contains [[mw:Extension:Scribunto|Scribunto]] modules&nbsp;– Lua scripts implementing special-purpose [[mw:Manual:Parser functions|parser functions]] for use in templates, beyond the [[Help:Magic words#Parser functions|basic set]] included with MediaWiki and its [[mw:Extensions FAQ|extensions]].


===Currently unused===
===Deprecated===
* '''Gadget namespace''' (prefix '''Gadget:'''): installed but not currently in use.<ref>[[Wikipedia:Village pump (technical)/Archive 139#New "Gadget:" and "Gadget definition:" namespaces?]]</ref> [[Wikipedia:Gadget|Gadgets]], which are small [[Snippet (programming)|snippets]] enabled in [[Special:Preferences#mw-prefsection-gadgets|user preferences]], currently use the [[Help:MediaWiki namespace|Mediawiki namespace]] with the ''MediaWiki:Gadget-'' page name prefix. It is a [[mw:Manual:Using custom namespaces|custom namespace]] installed by the [[mw:Extension:Gadgets|Gadget extension]].
* '''Gadget namespace''' (prefix '''Gadget:'''): installed but not currently in use.<ref>[[Wikipedia:Village pump (technical)/Archive 139#New "Gadget:" and "Gadget definition:" namespaces?]]</ref> [[Wikipedia:Gadget|Gadgets]], which are small [[Snippet (programming)|snippets]] enabled in [[Special:Preferences#mw-prefsection-gadgets|user preferences]], currently use the [[Help:MediaWiki namespace|Mediawiki namespace]] with the ''MediaWiki:Gadget-'' page name prefix. It is a [[mw:Manual:Using custom namespaces|custom namespace]] installed by the [[mw:Extension:Gadgets|Gadget extension]].
* '''Gadget definition namespace''' (prefix '''Gadget definition:'''): installed but not currently in use; see above for more information. Gadget definitions currently use the [[MediaWiki:Gadgets-definition]] page.
* '''Gadget definition namespace''' (prefix '''Gadget definition:'''): installed but not currently in use; see above for more information. Gadget definitions currently use the [[MediaWiki:Gadgets-definition]] page.
* '''[[Wikipedia:Course pages|Education Program]]''' namespace (prefix '''Education Program:'''): uninstalled in 2018, and replaced with the [https://outreachdashboard.wmflabs.org/ Programs & Events Dashboard].<ref>[https://outreach.m.wikimedia.org/wiki/Education/News/January_2018/Education_Extension_scheduled_shutdown Education_Extension_scheduled_shutdown, Wikimedia outreach]</ref><ref>[[Wikipedia:Education noticeboard/Archive 18#NOTICE:_EducationProgram extension is being deprecated]]</ref> However, the namespace was re-added later that year to allow access to old talk pages in the [[Special:AllPages/{{ns:447}}:|{{ns:447}}: namespace]].
* '''[[Wikipedia:Book namespace|Book namespace]]''' (prefix '''Book:'''): contains entries for Wikipedia books, collections of articles about one theme, which were used to generate downloadable files or printable documents or order books from PediaPress. (You can still create and edit a book design, but the online book rendering service has been withdrawn and transclusions of templates leading to the namespace have been disabled from view.) The namespace and its transclusions are still retained in the hope that the WMF will come up with a solution.<ref>[[Wikipedia:Village pump (technical)/Archive 176#Suppress rendering of Template:Wikipedia books]]</ref>


===Not installed===
===Not installed===
On [[MediaWiki]] installations other than the English Wikipedia, additional namespaces may be installed by [[mw:Manual:Extensions|MediaWiki extension]]s; the list of default IDs for these namespaces is at [[mw:Extension default namespaces|Extension default namespaces]].
On [[MediaWiki]] installations other than the English Wikipedia, additional namespaces may be installed by [[mw:Manual:Extensions|MediaWiki extension]]s; the list of default IDs for these namespaces is at [[mw:Extension default namespaces|Extension default namespaces]].


The '''[[Wikipedia:Flow|Flow namespace]]''' (prefix '''Topic:''') was a proposed talk page replacement, formerly installed on English Wikipedia by [[mw:Extension:StructuredDiscussions|Extension:StructuredDiscussions]]. It is no longer installed after being rejected by the community.
*'''[[Wikipedia:Flow|Flow namespace]]''' (prefix '''Topic:''') was a proposed talk page replacement, formerly installed on English Wikipedia by [[mw:Extension:StructuredDiscussions|Extension:StructuredDiscussions]]. It is no longer installed after being rejected by the community.
* '''[[Wikipedia:Course pages|Education Program namespace]]''' (prefix '''Education Program:'''): uninstalled in 2018, and replaced with the [[wmfdashboard:|Programs & Events Dashboard]].<ref>[https://outreach.m.wikimedia.org/wiki/Education/News/January_2018/Education_Extension_scheduled_shutdown Education_Extension_scheduled_shutdown, Wikimedia outreach]</ref><ref>[[Wikipedia:Education noticeboard/Archive 18#NOTICE:_EducationProgram extension is being deprecated]]</ref> However, the namespace was re-added later that year to allow access to old talk pages in the Education program talk: namespace. The namespace was then uninstalled again in 2021 after the remaining talk pages were moved to subpages of [[Wikipedia talk:Education program archive]].
* '''[[Wikipedia:Books|Book namespace]]''' (prefix '''Book:'''): contained entries for Wikipedia books, collections of articles about one theme, which were used to generate downloadable files or printable documents or order books from PediaPress. In 2017, the online book rendering service was withdrawn, leading to the removal of most links leading to the namespace in 2019. The namespace and its transclusions were still retained in the hope that the WMF would come up with a solution,<ref>{{Section link|Wikipedia:Village pump (technical)/Archive 176|Suppress rendering of Template:Wikipedia books}}</ref> but in 2021 the namespace was uninstalled after all remaining books were moved to subpages of [[Wikipedia:Books/archive]].


===Aliases and pseudo-namespaces===
===Aliases and pseudo-namespaces===
Line 72: Line 72:
=== Special ===
=== Special ===
{{main|Help:Special page}}
{{main|Help:Special page}}
The ''Special:'' namespace consists of pages (called ''special pages'') that are created by the software on demand, such as [[Special:RecentChanges]]. These pages can be linked as usual, as with <nowiki>[[Special:RecentChanges]]</nowiki>, except when they have parameters. To use parameters, the full URL must be given as an external link. For example, {{SERVER}}{{SCRIPTPATH}}/index.php?title=Special:Recentchanges&days=3&limit=10, which returns the last ten changes in the last three days.
The ''Special:'' namespace consists of pages (called ''special pages'') that are created by the software on demand, such as [[Special:RecentChanges]]. These pages can be linked as usual, as with <nowiki>[[Special:RecentChanges]]</nowiki>, except when they have parameters. To use parameters, the full URL must be given as an external link. For example, https:{{SERVER}}{{SCRIPTPATH}}/index.php?title=Special:Recentchanges&days=3&limit=10, which returns the last ten changes in the last three days.


You can create a [[Wikipedia:redirect|redirect]] to a Special page, but the redirect will not be followed automatically.
You can create a [[Wikipedia:redirect|redirect]] to a Special page, but the redirect will not be followed automatically.
Line 136: Line 136:
To learn some of these shortcuts, first follow the pseudo-namespace link above, then follow one of the redirects listed on that page. It will take you to the target, where you then notice any {{tl|shortcut}} boxes to the right of the page, which may also list some additional shortcuts to that same area. By observing these steps repeatedly, you can discover ways to shorten your typing. You will use pseudo-namespace names more often if you are an advanced editor, highly active in many namespaces, or constantly linking to pages that have a pseudo-namespace shorcut.
To learn some of these shortcuts, first follow the pseudo-namespace link above, then follow one of the redirects listed on that page. It will take you to the target, where you then notice any {{tl|shortcut}} boxes to the right of the page, which may also list some additional shortcuts to that same area. By observing these steps repeatedly, you can discover ways to shorten your typing. You will use pseudo-namespace names more often if you are an advanced editor, highly active in many namespaces, or constantly linking to pages that have a pseudo-namespace shorcut.


To understand the appropriateness of redirects of this type, see [[Wikipedia:Cross-namespace redirects]]. All shortcuts are discoverable by looking for redirects. Try the [[Special:Search]] engine ''Advanced'' interface, with the "redirects" check-box selected; there is also the category ''[[:Category:Wikipedia redirects|Wikipedia redirects]]''.
To understand the appropriateness of redirects of this type, see [[Wikipedia:Cross-namespace redirects]]. All shortcuts are discoverable by [[Help:Searching|searching]] for redirects. There is also the category [[:Category:Wikipedia redirects|Wikipedia redirects]].


As a final example, every [[Wikimedia Foundation]] project has a "[[m:Help:Transwiki|Transwiki:]]" pseudo-namespace (sometimes a real namespace) for importing articles manually. A wiki project that would manually move many pages between [[wp:sister|sister projects]] uses this tag. Redirects/shortcuts are not directly involved here, as described above. Instead the page title is [[WP:move|move]]d to "Transwiki:''namespace:pagename''", and that content is then copied and pasted into a new page name of that temporary title on the target wiki. When it is accepted the title is then moved out of the '''Transwiki''' pseudo-namespace there and becomes a real page name in its respective namespace.
As a final example, every [[Wikimedia Foundation]] project has a "[[m:Help:Transwiki|Transwiki:]]" pseudo-namespace (sometimes a real namespace) for importing articles manually. A wiki project that would manually move many pages between [[wp:sister|sister projects]] uses this tag. Redirects/shortcuts are not directly involved here, as described above. Instead the page title is [[WP:move|move]]d to "Transwiki:''namespace:pagename''", and that content is then copied and pasted into a new page name of that temporary title on the target wiki. When it is accepted the title is then moved out of the '''Transwiki''' pseudo-namespace there and becomes a real page name in its respective namespace.
Line 147: Line 147:
Important points to note:
Important points to note:


* In the presence of an interwiki prefix and the absence of an interlanguage prefix, the link will default to the English language. So <code><nowiki>[[w:Internet]]</nowiki></code> links to "[[w:Internet|Internet]]" in the English Wikipedia.
* In the presence of an interwiki prefix and the absence of an interlanguage prefix, the link will be to a specified project in the current language. So <code><nowiki>[[w:Internet]]</nowiki></code> links to "[[w:Internet|Internet]]" on the English Wikipedia, if the link is on any English-language Wikimedia project.
* In the presence of a interlanguage prefix and the absence of an interwiki prefix, the link will default to Wikipedia. So <code><nowiki>[[:en:Internet]]</nowiki></code> also links to "[[w:Internet|Internet]]" in the English Wikipedia.
* In the presence of a interlanguage prefix and the absence of an interwiki prefix, the link will be to a specified language in the current project. So <code><nowiki>[[:en:Internet]]</nowiki></code> will link to "[[:en:Internet|Internet]]" on the English Wikipedia, if the link is on a Wikipedia project in any language.


When making links to other language Wikipedias, add an initial colon if you want the link to appear inline rather than in the skin's sidebar under "Languages"; see [[Help:Colon trick]] for an explanation. So <code><nowiki>[[:de:Internet]]</nowiki></code> is an inline link to "[[:de:Internet|Internet]]" in the German Wikipedia; but if using an interwiki prefix this is unnecessary, for example <code><nowiki>[[w:de:Internet]]</nowiki></code> is the same inline link.
When making links to other language Wikipedias, add an initial colon if you want the link to appear inline rather than in the skin's sidebar under "Languages"; see [[Help:Colon trick]] for an explanation. So <code><nowiki>[[:de:Internet]]</nowiki></code> is an inline link to "[[:de:Internet|Internet]]" in the German Wikipedia; but if using an interwiki prefix this is unnecessary, for example <code><nowiki>[[w:de:Internet]]</nowiki></code> is the same inline link.
Line 176: Line 176:
* Change the functionality of <kbd><nowiki>{{</nowiki>[[WP:Transclusion|pagename]]<nowiki>}}</nowiki></kbd> so that it defaults to the set of pagenames in '''Template'''.
* Change the functionality of <kbd><nowiki>{{</nowiki>[[WP:Transclusion|pagename]]<nowiki>}}</nowiki></kbd> so that it defaults to the set of pagenames in '''Template'''.
* Tailor ''[[Wikipedia:Edit notices|edit notices]]'' to a particular namespace's edit page, informing an editor of certain aspects about the content of that namespace.
* Tailor ''[[Wikipedia:Edit notices|edit notices]]'' to a particular namespace's edit page, informing an editor of certain aspects about the content of that namespace.
* Allow ''[[Wikipedia:Templates|templates]]'' behave differently on pages of different namespaces.
* Allow ''[[Wikipedia:Templates|templates]]'' to behave differently on pages of different namespaces.


The namespace functionality is often visible in the URL, where you will see a namespace number. These are given in the table below.
The namespace functionality is often visible in the URL, where you will see a namespace number. These are given in the table below.
Line 188: Line 188:
== Programming ==
== Programming ==
{{anchor|Enumeration}}
{{anchor|Enumeration}}
The 34 namespaces in the English Wikipedia are numbered for programming purposes. The prefix for each namespace is generated by a [[m:Help:Variable|variable]], using the [[Help:Magic words#Paths|magic word]] <nowiki>{{ns}}</nowiki>, in the form <nowiki>{{ns:</nowiki>''xx''}}, as shown in the table below.
The 32 namespaces in the English Wikipedia are numbered for programming purposes. The prefix for each namespace is generated by a [[m:Help:Variable|variable]], using the [[Help:Magic words#Paths|magic word]] <nowiki>{{ns}}</nowiki>, in the form <nowiki>{{ns:</nowiki>''xx''}}, as shown in the table below.


{| border="0" cellpadding="4" cellspacing="0" class="wikitable"
{| border="0" cellpadding="4" cellspacing="0" class="wikitable"
Line 251: Line 251:
|<nowiki>{{ns:101}}</nowiki>
|<nowiki>{{ns:101}}</nowiki>
|{{ns:101}}
|{{ns:101}}
|-
|<nowiki>{{ns:108}}</nowiki>
|{{ns:108}}
|<nowiki>{{ns:109}}</nowiki>
|{{ns:109}}
|-
|-
|<nowiki>{{ns:118}}</nowiki>
|<nowiki>{{ns:118}}</nowiki>
Line 261: Line 256:
|<nowiki>{{ns:119}}</nowiki>
|<nowiki>{{ns:119}}</nowiki>
|{{ns:119}}
|{{ns:119}}
|-
|<nowiki>{{ns:446}}</nowiki>
|{{ns:446}}
|<nowiki>{{ns:447}}</nowiki>
|{{ns:447}}
|-
|-
|<nowiki>{{ns:710}}</nowiki>
|<nowiki>{{ns:710}}</nowiki>
Line 288: Line 278:
|}
|}


Alternative variables are available for most namespaces, for example <nowiki>{{ns:talk}}</nowiki>, <nowiki>{{ns:user}}</nowiki>, and <nowiki>{{ns:user_talk}}</nowiki> for <nowiki>{{ns:1}}</nowiki>, <nowiki>{{ns:2}}</nowiki> and <nowiki>{{ns:3}}</nowiki>. The portal and book namespaces are numbered in the 100-plus range as are all MediaWiki nonstandard namespaces.
Alternative variables are available for most namespaces, for example <nowiki>{{ns:talk}}</nowiki>, <nowiki>{{ns:user}}</nowiki>, and <nowiki>{{ns:user_talk}}</nowiki> for <nowiki>{{ns:1}}</nowiki>, <nowiki>{{ns:2}}</nowiki> and <nowiki>{{ns:3}}</nowiki>. The portal namespace is numbered in the 100-plus range, as are all MediaWiki nonstandard namespaces.


All namespaces with a positive number or zero in this list are searchable. Specifically, the {{ns:-2}} and {{ns:-1}} namespaces are not searchable.
All namespaces with a positive number or zero in this list are searchable. Specifically, the {{ns:-2}} and {{ns:-1}} namespaces are not searchable.
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Navigation menu