확장기능:인터위키
![]() 출시 상태: 안정 |
|
---|---|
![]() |
|
구현 | 특수 문서 |
설명 | 인터위키 테이블을 보고 조작하는 특수 페이지를 추가합니다. |
만든 이 | Stephanie Amanda Stevens, SPQRobin |
최신 버전 | 3.2 (2019-07-15) |
MediaWiki | 1.36+ |
데이터베이스 변경 | 아니오 |
라이선스 | GNU General Public License 2.0 or later |
다운로드 | |
예제 | See Extension:Interwiki/Sites using this extension |
|
|
interwiki |
|
Interwiki 확장 기능 번역 (translatewiki.net에서 가능한 경우) | |
이슈 | 미해결 작업 · 버그 보고 |
The Interwiki extension adds the "Special:Interwiki" page to MediaWiki , to view and edit the interwiki table, and a log of any actions made with it.
It works with the $wgInterwikiCache variable.
The list of "Special:Interwiki" is identical to the API action=query&meta =siteinfo&siprop=interwikimap, except the iw_api field is not available.
다운로드
The extension can be retrieved directly from Git
[?]:
- Browse code
- Some extensions have tags for stable releases.
- Browse tags
- Select the tag
- Click "snapshot"
- Each branch is associated with a past MediaWiki release. There is also a "master" branch containing the latest alpha version (might require an alpha version of MediaWiki).
- Browse branches
- Select a branch name
- Click "계속"
Extract the snapshot and place it in the extensions/Interwiki/ directory of your MediaWiki installation.
If you are familiar with Git and have shell access to your server, you can also obtain the extension as follows:
cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Interwiki.git
설치
- 파일을 다운로드하고
Interwiki
폴더를extensions/
디렉토리에 넣어 주세요. - 아래의 코드를 $LocalSettings의 말미에 추가합니다:
wfLoadExtension( 'Interwiki' ); // To grant sysops permissions to edit interwiki data $wgGroupPermissions['sysop']['interwiki'] = true; // To create a new user group that may edit interwiki data // (bureaucrats can add users to this group) # $wgGroupPermissions['developer']['interwiki'] = true; // delete the comment indicator # as appropriate
완료 – 위키의 ‘Special:Version’에 이동해서, 확장기능이 올바르게 설치된 것을 확인합니다.
- The configuration that comes with MediaWiki will not grant permission to any user group.
- To enable transclusion from other sites, you'll need to enable
$wgEnableScaryTranscluding
.
- To disable adding prefixes through the Special:Interwiki interface, set
$wgInterwikiViewOnly
totrue
.
interwiki
message item defined per locale in SpecialInterwiki.i18n.php
. Its value is 인터위키 데이터 보기 및 편집.Setting up interlanguage links
To set up interlanguage links using this extension, make sure that $wgInterwikiMagic
is set to true
and $wgHideInterlanguageLinks
is set to false
(they are like this by default, you don't need to change them usually).
Then go to Special:Interwiki as a user with the appropriate permissions.
For example, if the French version of your wiki was located at http://fr.foowiki.tld/wiki/
, you could add http://fr.foowiki.tld/wiki/$1
to the interwiki table with values trans 0 and local 0.
Then the interlanguage link to the French version would work, but a #REDIRECT to a French-language page from a page in some other language would be refused.
See Manual:Interwiki table for a full explanation of the forward (iw_local) and transclude (iw_trans) bits.
In brief:
- Enabling forwarding ('local' true) is normally done between all languages and projects in the same group, as it allows a link to any one of the languages to be used as a gateway to the others. The English-language Wikipedia, for instance, sets the 'local' bit true for all of the other-language Wikipedias and for projects like commons:, wikinews: or wikivoyage:. A user on a wiki outside Wikipedia where the wikipedia: interwiki prefix points to en.wikipedia.org could create a link like wikipedia:fr:Encyclopédie. That link goes initially to "fr:Encyclopédie" on the English-language Wikipedia. The en.wikipedia server immediately recognises fr: as a 'local' interwiki link, so replies with a redirect to la Wikipédia where fr.wikipedia.org/wiki/Encyclopédie displays the requested French-language Wikipédia page [[Encyclopédie]] et voilà.
- Enabling transclusion is rarely done, as it allows an article on one wiki to use templates from some other wiki. This is referred to as 'scary transclusion' as it will cause problems if the other wiki changes the template unexpectedly. A few wiki farms use this to create one 'central wiki' with various templates which are made available to other wikis in the same farm. If you don't need this, don't enable it.
Global interwikis
Since version 3, Interwiki supports defining a global/central database and pulling defined interwikis from there as well as from the local table. This functions essentially as a table merge, with local interwiki definitions overriding central. Language links are not pulled from the central table; these are set up as local-only due to a central table likely serving more than one project (with each having its own languages).
The central table is the interwiki table of the central wiki. This means that as far as the central wiki is concerned, it is basically just a normal non-global setup. There are therefore no special rights associated with the central (global) table, though it is likely you may want to be more picky about how you assign the 'interwiki' edit right on this wiki.
- This was decided by looking at current possible use cases (ShoutWiki's hub, Uncyclomedia's central wiki, and Meta-Wiki) where the central wiki isn't going to have anything extra anyway.
- This might change in the future, but anything more intelligent will require schema updates.
- This probably doesn't work with table prefixes because of how the table is accessed.
To set up a central interwiki table, simply provide the name of the database of the wiki you want to use:
// To enable pulling global interwikis from a central database
$wgInterwikiCentralDB = 'mw_central';
Replace 'mw_central' with the name of the database.
For those using table prefixes here is an alternative solution for "pool_example_wiki" tables.
$wgSharedDB = 'example_wiki'; # The $wgDBname for the wiki database holding the main interwiki table
$wgSharedPrefix = 'pool_'; # The $wgDBprefix for the database. Defaults to the prefix of the current wiki if not specified
$wgSharedTables = ['interwiki'];
Protocol-relative URLs
You can use protocol-relative URLs (PRURLs), so that users accessing your wiki over either HTTP or HTTPS can uses that same protocol to access interwiki links.
To use a PRURL, first ensure the destination server supports HTTPS; if it does, then simply remove the https:
portion of the URL in the link table.
For example, change
https://en.wikipedia.org/wiki/$1
to:
//en.wikipedia.org/wiki/$1
![]() | 이 확장 기능은 하나 이상의 위키미디어 프로젝트에서 사용 중입니다. 이것은 아마도 이 확장 기능이 안정적이고 트래픽이 많은 웹 사이트에서 사용할 수 있을 만큼 충분히 잘 작동한다는 것을 의미합니다. 설치된 위치를 확인하려면 위키미디어의 CommonSettings.php 및 InitialiseSettings.php 구성 파일에서 이 확장 기능의 이름을 찾습니다. 특정 위키에 설치된 확장 기능의 전체 목록은 위키의 Special:Version 문서에서 볼 수 있습니다. |
![]() | This extension is included in the following packages and/or wiki farms: |
- Extensions bundled with MediaWiki 1.21/ko
- Stable extensions/ko
- Special page extensions/ko
- GPL licensed extensions/ko
- Extensions in Wikimedia version control/ko
- Extensions which add rights/ko
- InterwikiLoadPrefix extensions/ko
- UserGetAllRights extensions/ko
- All extensions/ko
- Extensions used on Wikimedia/ko
- Extensions included in BlueSpice/ko
- Extensions included in Canasta/ko
- Extensions included in Miraheze/ko
- Extensions included in MyWikis/ko
- Extensions included in ProWiki/ko
- Extensions included in semantic::core/ko
- Interwiki extensions/ko