interwiki
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
interwiki [2016-06-05 21:07] – 109.110.43.14 | interwiki [2024-05-08 09:27] (current) – [Table] Transfer of the information in /conf/interwiki.conf michaelsy | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== InterWiki Links ====== | ====== InterWiki Links ====== | ||
- | The original idea of InterWiki was to have one large distributed [[wp> | ||
- | In [[DokuWiki]] this is done by prefixing Wiki [[pagenames]] with a shortcut separated by a ''>'' | + | The original idea of InterWiki was to have one large distributed [[wp> |
+ | |||
+ | In [[DokuWiki]] this is done by prefixing Wiki [[pagenames]] with a shortcut separated by a **''>'' | ||
Examples: | Examples: | ||
- | | %%[[wp>InterWiki]]%% | + | ^ Shortcut |
- | | %%[[phpfn>random]]%% | + | | '' |
- | | %%[[google> | + | | '' |
- | | %%[[doku>interwiki]]%% | + | | '' |
- | | %%[[skype> | + | | '' |
- | | %%[[this> | + | | '' |
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
- | Here's an example of how to access an arbitrary file in dokuwiki's data/media directory by clicking on an image. It's useful for videos and pdf files. | + | Here's an example of how to access an arbitrary file in DokuWiki's data/media directory by clicking on an image. It's useful for videos and PDF files. |
[[this> | [[this> | ||
+ | |||
+ | Interwiki substitution for external images is also available. | ||
+ | |||
+ | {{ phpfn> | ||
+ | |||
+ | {{ phpfn> | ||
===== Configuring InterWiki Shortcuts ===== | ===== Configuring InterWiki Shortcuts ===== | ||
+ | |||
InterWiki shortcuts are defined in two files: | InterWiki shortcuts are defined in two files: | ||
- | * the '' | + | * Default included links are in '' |
- | * the ''< | + | * Local modifications in ''< |
+ | |||
+ | Alternatively, | ||
The interwiki shortcut has to be in lowercase and follow the [[pagename]] rules. | The interwiki shortcut has to be in lowercase and follow the [[pagename]] rules. | ||
Line 25: | Line 45: | ||
The format of the interwiki config file is: | The format of the interwiki config file is: | ||
- | | + | <code - conf/ |
+ | < | ||
+ | </ | ||
+ | |||
+ | Modify existing interwiki links, by reusing the shortcut:< | ||
+ | wp | ||
+ | </ | ||
+ | Or disable by mentioning no link< | ||
+ | wpmeta | ||
+ | paypal | ||
+ | </code> | ||
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> | 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> | ||
- | ^ Placeholder | + | ^ Placeholder |
- | | {URL} | URL-encoded wikiname (the part which is appended to the URL in interwiki.local.conf) | + | | {URL} | URL-encoded wikiname (the part which is appended to the URL in interwiki.local.conf) |
- | | {NAME} | + | | {NAME} |
- | | {SCHEME} | + | | {SCHEME} |
- | | {HOST} | + | | {HOST} |
- | | {PORT} | + | | {PORT} |
- | | {PATH} | + | | {PATH} |
- | | {QUERY} | + | | {QUERY} |
- | The last 5 parameters are useful when creating interwikilinks to cachesystems. | + | The last 5 parameters are useful when creating interwikilinks to cachesystems. |
- | For example cached links with the old, not longer working, [[wp>Coral Content Distribution Network]] could be used by a '' | + | For configuration changes to take effect on the pages, the [[devel: |
- | < | + | ==== Examples ==== |
+ | For example cached links with the old, not longer working, [[wp> | ||
+ | |||
+ | <code - conf/ | ||
+ | coral http:// | ||
+ | </ | ||
For example, [[https:// | For example, [[https:// | ||
- | < | + | < |
+ | ubuntu | ||
+ | </ | ||
and now create your link to it like this: | and now create your link to it like this: | ||
Line 54: | Line 91: | ||
If the wikiname will already include encoded characters (ex: '' | If the wikiname will already include encoded characters (ex: '' | ||
+ | |||
+ | ==== Inter(n)wiki links ==== | ||
+ | |||
+ | To refer to certain namespaces within you own wiki: | ||
+ | |||
+ | <code - conf/ | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | For example: <code - conf/ | ||
+ | enlib | ||
+ | </ | ||
+ | |||
===== Configuring InterWiki Shortcut Icons ===== | ===== Configuring InterWiki Shortcut Icons ===== | ||
+ | |||
Interwiki icons should have a size of 16x16 pixels, be in PNG or GIF format, and be named after the shortcut. | Interwiki icons should have a size of 16x16 pixels, be in PNG or GIF format, and be named after the shortcut. | ||
* ''< | * ''< | ||
Line 68: | Line 119: | ||
If you want to disable all or some kind of link icons, refer to [[tips: | If you want to disable all or some kind of link icons, refer to [[tips: | ||
+ | ===== Using the number sign/hash (#), not as comment ===== | ||
+ | Because it is reserved to mark a comment line, a hash (''#'' | ||
- | =====See also===== | + | e.g. if you are using the name of your interwiki in the fragment part of your URL, you need to escape it. |
+ | |||
+ | Example: | ||
+ | * Configuration< | ||
+ | postconf | ||
+ | </ | ||
+ | * Usage< | ||
+ | [[postconf> | ||
+ | </ | ||
+ | |||
+ | ===== See also ===== | ||
+ | |||
+ | * [[tips: | ||
+ | * You can install and use the [[plugin: | ||
* [[config|Configuring DokuWiki]] | * [[config|Configuring DokuWiki]] | ||
+ |
interwiki.1465153664.txt.gz · Last modified: 2016-06-05 21:07 (external edit)