Jump to content

Даведнік:Прастора назваў

From mediawiki.org
This page is a translated version of the page Manual:Namespace and the translation is 38% complete.

Прастора назваў — гэта зборнік старонак са зьместам аднолькавага прызначэньня. Можна лічыць прасторы назваў кавалкамі розных відаў інфармацыі ўнутры аднае вікі і трымаць „сапраўдны“ зьмест (старонкі на асноўную тэматыку разьдзелу) асобным ад інфармацыі пра карыстальнікаў, старонак дапамогі ды інш. Прэфікс прасторы назваў старонкі — гэта першая частка назвы старонкі (калі ёсьць), які вызначае, да якой прасторы назваў належыць старонка. Ад рэшты назвы ён адасабляецца двукроп’ем (:). Так званая „асноўная прастора“ прэфіксу ня мае. Every namespace has a number or index which the MediaWiki software uses to refer to the namespace instead of its name.

Тэхнічны агляд

Every page on a wiki has a unique title which may begin with a namespace prefix or not. Pages in different namespaces can otherwise share the same name (i.e., not counting their prefixes).

For example, here at MediaWiki.org:

Назва Прастора назваў Код Апісаньне старонкі
API 0 старонка ў „асноўнай прасторы“
Template:API Template 10 a template that can be transcluded into other pages
Manual:API Manual 100 a page in our MediaWiki manual (which, in this case, redirects to a different page)

Because the "main namespace" does not have a prefix, any page title having no prefix—or any page whose apparent prefix doesn't match any recognized namespace on the wiki (nor any interwiki/interlanguage prefix )—is interpreted as a page in the main namespace.

Note that pages in the main namespace cannot have names starting with any existing namespace prefix followed by a colon, because such pages would be rendered inaccessible by the presence of that namespace. (If this has happened as the result of the creation of a new namespace, the namespaceDupes.php maintenance script can be used to fix the problem.)

Pages can be moved between namespaces simply by changing the prefix part of their title.

Namespace prefixes can be translated, and aliases (helpful in shortcuts) can be configured for each (see $wgNamespaceAliases ). All namespaces also have a "canonical" prefix, which works on all wikis regardless of configuration. Aliases and canonical names can be used in links, when performing a search, and in the page title with the help of the {{DISPLAYTITLE}} magic word.

Each namespace has a corresponding namespace index. Within the database, the title is split into namespace index and text title, and this is used for storage in the page.page_namespace and page.page_title columns, among others.

Тэматычныя прасторы ды іхнія абмеркаваньні

See Help:Talk pages for instructions on how to use talk pages.

Most namespaces have an associated discussion namespace (or "talk" namespace). All discussion namespaces have odd-integer indices, and the discussion namespace index for a specific namespace with index n is n+1. Прасторы назваў зь няцотнымі індэксамі — гэта тэматычныя прасторы (зьвярніце ўвагу, што яны адрозьніваюцца ад прастораў назваў зьместу). The subject-talk duality can be explored using the {{SUBJECTPAGENAME}} and {{TALKPAGENAME}} magic words. The ‎<body> tag of pages in talk namespaces has the ns-talk CSS class, which might be useful for styling.

Убудаваныя прасторы назваў

MediaWiki пастаўляецца з 18 ўбудаванымі прасторамі назваў:

  • 16 „сапраўдных“ прастораў, адпаведных сапраўдным старонкам, пранумараваныя ад 0 да 15 і згрупаваныя ў пары тэмы/абмеркаваньня
  • 2 „віртуальныя“ прасторы (адна для дынамічна ствараных спэцыяльных старонак, другая служыць псэўданімам для непасрэдных спасылак на файлы), пранумараваныя -1 і -2 адпаведна. Паколькі гэтыя прасторы назваў не адпавядаюць захаваным у базе зьвестак старонкам, ніхто ня можа ствараць або выдаляць старонкі ў гэтых прасторах назваў, і абмеркаваньні для іх адсутнічаюць.

Поўны сьпіс прадстаўлены ў ніжэйпададзенай табліцы.

Ідэнтыфікатар Назва Прызначэньне Абмеркаваньне
0 (Main) Артыкулы „сапраўднага“ зьместу .[1] Talk 1
2 User Старонкі ўдзельнікаў .[2] User talk 3
4 Project Information about the wiki[3] Project talk 5
6 File Media description pages File talk 7
8 MediaWiki Site interface customization[4] MediaWiki talk 9
10 Template Template pages Template talk 11
12 Help Help pages Help talk 13
14 Category Category description pages Category talk 15
-1 Special Holds special pages N/A
-2 Media Alias for direct links to media files

Each namespace also has a constant derived from its name, with all letters in uppercase, spaces replaced by underscores, and prefixed by NS_. For example, the constant for the "User talk" namespace is NS_USER_TALK. A complete list can be found in Extension default namespaces .


  1. Прастора назваў тэмы ня мае прэфіксу.
  2. Editing a User talk page generates a notification for the user.
  3. Defined by $wgMetaNamespace , which unless manually set otherwise, defaults to $wgSitename .
  4. Only editable by users with the editinterface permission.
    Some pages in this namespace additionally require editsitecss and editesitejs permissions.

Наладжваныя прасторы назваў

Пашырэньні і адміністратары сайту могуць вызначаць дадатковыя прасторы назваў дзеля групаваньня разам дадатковых клясаў старонак. For a thorough overview, see Дапамога:Наладжваньне прастораў назваў .

Прызначэньне

Some namespaces, like Project and Help, only exist for convenience and do not have any extra functionality compared to the Main namespace.

Template namespace pages can be transcluded without namespace prefix.

User namespace pages are associated with user accounts or IP addresses. Changes to user talk pages generate an automatic message notification.

Pages in the "MediaWiki" namespace are used to override default messages in language file and can only be edited by administrators or other users with the editinterface permission.

File and Category pages have special functionality, as described in Help:Managing files and Help:Categories . Files can be moved by users with the "movefile" right. Category pages can be moved by users with the "move-categorypages" right.

All pages in discussion namespaces have a "post a comment" feature.

Глядзіце таксама

Кіраваньне сайтам

Пашырэньні

Для распрацоўнікаў пашырэньняў