//currently translating// FIXME
====== InterWiki 連結 ======
InterWiki 一開始的想法是我們可以在整個網路上擁有一個巨大且分散的 [[wp>Wiki]] ,但現在則大多表示利用一些簡單的連結語法連結到其他 Wiki 的方式。
在 [[DokuWiki]] 中,我們在要連結的 Wiki 縮寫和要連結的[[pagenames|頁面名稱]]中加上 ''>'' 符號,便可達到快速連結的效果。
一些範例:
[[wp>Wiki]] 連結到維基百科,
[[Meatball>TourBusStop]] 連結到 the MeatBall wiki TourBusStop,
[[google>Wiki]] 連結到 Google 搜尋。
[[doku>interwiki]] 連結到這個頁面((即 http://www.dokuwiki.org 中的某個頁面))。
[[wp>Wiki]] 連結到維基百科,[[Meatball>TourBusStop]] 連結到 the MeatBall wiki TourBusStop,[[google>Wiki]] 連結到 Google 搜尋。
[[doku>interwiki]] 連結到這個頁面((即 http://www.dokuwiki.org 中的某個頁面))。
There is one special interwiki shortcut called **''this''**. It always links to the webserver directory DokuWiki is installed in. You can use this to construct relative URLs. For example the following always links to the local [[syndication|XML feed]]: [[this>feed.php]]
[[this>feed.php]]
**More Info on InterWiki:**
* [[wp>InterWiki]] at Wikipedia
* [[MeatBall>InterWiki]] at MeatBall
* [[Wiki>InterWiki]] at c2.com Wiki
===== Configuring InterWiki Shortcuts =====
InterWiki shortcuts are defined in the ''conf/interwiki.conf'' file. The default file contains all shortcuts suggested in [[http://usemod.com/intermap.txt]]. You can add your own interwiki links by creating a ''conf/interwiki.local.conf'' file and placing your links in that file (this will prevent the links from being overwritten on a update).
It is possible to modify Dokuwiki’s ''conf/interwiki.conf'' file, however this could result in your changes being overwritten when upgrading Dokuwiki.
You can place imagefiles named after the shortcut in the ''lib/images/interwiki'' directory to use them instead of the default icon. They should have a size of 16x16 pixels and be in PNG or GIF format.
You should also purge the [[caching|cache]] if you have the default image instead of the one you uploaded.
The interwiki shortcut has to be in lowercase and follow the [[pagename]] rules.
rm -rf /data/cache/*
The format of the interwiki config file is:
The shortcut is the one you will be able to use in the link later. In the URL you can use some placeholders to be more flexible in linking. If no placeholder is given the [[phpfn>rawurlencode|URL-encoded]] wikiname will be appended to the URL. These placeholders are available:
^ Placeholder ^ Replaced by ^
| {URL} | URL-encoded wikiname |
| {NAME} | wikiname without any encoding (the part which is appended to the url in interwiki.local.conf) |
| {SCHEME} | scheme part if an URL was given as wikiname |
| {HOST} | host part if an URL was given as wikiname |
| {PORT} | port part if an URL was given as wikiname |
| {PATH} | path part if an URL was given as wikiname |
| {QUERY} | query part if an URL was given as wikiname |
The last 5 parameters are useful when creating interwikilinks to cachesystems. Refer to the ''coral'' shortcut in the distributed ''interwiki.conf''.