Extension:NamespaceRelations/id
NamespaceRelations Status rilis stabil |
|
---|---|
File:NamespaceRelations.png | |
Implementasi | Antarmuka pengguna |
Deskripsi | Memungkinkan pengurus menetapkan tab ruang nama tambahan selain Subjek dan Pembicaraan |
Perancang awal | Pavel Selitskas (Wizardisttalk) |
Versi terbaru | 0.3 (2020-11-28) |
MediaWiki | 1.29+ |
Perubahan basis data | Tidak |
Lisensi | Lisensi Publik Umum GNU 2.0 atau lebih baru |
Unduh | |
$wgNamespaceRelations |
|
Quarterly downloads | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Public wikis using | Lua error in Module:Extension at line 172: bad argument #1 to 'inNamespace' (unrecognized namespace name 'skin'). |
Terjemahkan ekstensi NamespaceRelations jika tersedia di translatewiki.net |
The NamespaceRelations extension allows an administrator to define additional namespace tabs besides Subject and Talk tabs in the interface. Whether the user is browsing Subject, Talk, or additional tabs, they will see the tabs all together.
Pemasangan
- <translate> [[<tvar name=2>Special:ExtensionDistributor/NamespaceRelations/id</tvar>|Download]] and move the extracted <tvar name=name>
NamespaceRelations/id
</tvar> folder to your <tvar name=ext>extensions/
</tvar> directory.</translate>
<translate> Developers and code contributors should install the extension [[<tvar name=git>Special:MyLanguage/Download from Git</tvar>|from Git]] instead, using:</translate>cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/NamespaceRelations%2Fid - <translate> Add the following code at the bottom of your <tvar name=1>LocalSettings.php </tvar> file:</translate>
wfLoadExtension( 'NamespaceRelations/id' );
- Atur konfigurasi seperlunya.
- File:OOjs UI icon check-constructive.svg <translate> Done</translate> – <translate> Navigate to <tvar name=special>Special:Version</tvar> on your wiki to verify that the extension is successfully installed.</translate>
Konfigurasi
This is solely done by defining $wgNamespaceRelations
.
The supported format and parameters are as follows:
$wgNamespaceRelations = array(
'key1' => array(
'namespace' => NS_MAIN,
'target' => 12,
'inMainPage' => true,
'query' => 'param1=value1¶m2=value2',
'weight' => 5,
'hideTalk' => true,
'customTarget' => 'Test/$1'
),
// etc.
);
key1
- A key (ID) that is used in many places. It's the ID that is used in HTML rendering for actual element ID. Besides, it's used to find an appropriate message for the tab (via
nstab-extra-key1
). namespace
- Namespace ID where the tab should be visible.
target
- Namespace ID where the tab should link.
inMainPage
- By default, if the tab is attached to NS_MAIN, the tab won't be visible on Main Page (imitating Wikinews Opinions tab behvaiour). However, this may be overridden by setting
inMainPage
totrue
. This parameter isn't obligatory and is intended only fornamespace = NS_MAIN
. query
- Query string which
action=edit&redlink=1
is attached to if the target page doesn't exist. Works since MediaWiki 1.21alpha (13cecf9). weight
- Sorting weight. Subject and Talk tabs receive 10 and 20 appropriately; if
weight
is not set, every custom tab receives +10 points starting from 30 (30 for the first custom tab, 40 for the next, etc.). This parameter allows to place custom tabs in almost every position relative to Subject, Talk and other custom tabs. hideTalk
- Hide Talk tab.
customTarget
- Custom target title.
$1
is the base title (for example, "Page" will link to "Test/Page" in the target namespace.
You can define multiple tabs per one namespace
which link to different target
s, but you cannot define multiple tabs for different namespace
s which linking to the same target
— it creates ambiguous situation where we have 2+ Subject/Talk tabs (creating both — actually 4 tabs —– seems excessive).
On the other hand, the first case (1 namespace → 2+ targets) works just fine.
Konfigurasi sampel
Wikinews
$wgNamespaceRelations = array(
'comments' => array(
'namespace' => 0,
'target' => 102,
'query' => 'preload=Wikinews:Commentary_pages_on_news_events/body&editintro=Template:Editintro_as-is'
)
);
The messages are: nstab-extra-comments
for caption, tooltip-ca-comments
for tooltip.
Wiktionary
$wgNamespaceRelations = array(
'citations' => array(
'namespace' => 0,
'target' => 114
),
'documentation' => array(
'namespace' => 10,
'target' => 10,
'customTarget' => '$1/doc'
)
);
The messages are: nstab-extra-citations
and nstab-extra-documentation
for captions, tooltip-ca-citations
and tooltip-ca-documentation
for tooltips, respectively.
Hal-hal yang perlu dikerjakan
- attached namespaces should be treated the same way as talk pages when page moving takes place (that being said, when a page is moved and a special checkbox marked, the attached page is also renamed)
Lihat pula
File:OOjs UI icon information-progressive.svg | <translate> This extension is included in the following wiki farms/hosts and/or packages:</translate>
<translate> This is not an authoritative list.</translate> <translate> Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here.</translate> <translate> Always check with your wiki farms/hosts or bundle to confirm.</translate> |