interwiki
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
interwiki [2010-04-19 18:55] – 96.231.143.6 | interwiki [2024-01-20 20:34] (current) – usemod.com expired 212.159.76.45 | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== InterWiki Links ====== | ====== InterWiki Links ====== | ||
- | The original idea of InterWiki was to have one large distributed [[wp> | + | 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 ''>'' | + | In [[DokuWiki]] this is done by prefixing Wiki [[pagenames]] with a shortcut separated by a **''>'' |
Examples: | Examples: | ||
- | | + | ^ Shortcut |
- | [[Meatball>TourBusStop]] links to the MeatBall | + | | '' |
- | [[google> | + | | '' |
- | [[doku>interwiki]] links to this page | + | | '' |
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
+ | | '' | ||
- | [[wp> | + | Here's an example of how to access an arbitrary file in DokuWiki' |
- | [[doku> | + | |
- | There is one special interwiki shortcut called **'' | + | |
- | [[this> | + | Interwiki substitution for external images is also available. |
- | **More Info on InterWiki: | + | {{ phpfn>images/php.gif?96}} |
- | + | ||
- | * [[wp>InterWiki]] at Wikipedia | + | |
- | * [[MeatBall> | + | |
- | * [[Wiki> | + | |
+ | {{ phpfn> | ||
===== Configuring InterWiki Shortcuts ===== | ===== Configuring InterWiki Shortcuts ===== | ||
- | InterWiki shortcuts are defined in the '' | + | InterWiki shortcuts are defined in two files: |
+ | * Default included links are in '' | ||
+ | * Local modifications in '' | ||
- | It is possible | + | Alternatively, |
+ | |||
+ | The interwiki shortcut has to be in lowercase and follow the [[pagename]] rules. | ||
+ | |||
+ | 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 | ||
+ | </ | ||
+ | |||
+ | 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 | ||
+ | | {URL} | URL-encoded wikiname (the part which is appended to the URL in interwiki.local.conf) | ||
+ | | {NAME} | ||
+ | | {SCHEME} | ||
+ | | {HOST} | ||
+ | | {PORT} | ||
+ | | {PATH} | ||
+ | | {QUERY} | ||
+ | |||
+ | The last 5 parameters are useful when creating interwikilinks to cachesystems. | ||
+ | |||
+ | 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:// | ||
+ | |||
+ | <code - conf/ | ||
+ | ubuntu | ||
+ | </ | ||
+ | |||
+ | and now create your link to it like this: | ||
+ | |||
+ | < | ||
+ | |||
+ | 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 ===== | ||
+ | |||
+ | Interwiki icons should have a size of 16x16 pixels, be in PNG or GIF format, and be named after the shortcut. | ||
+ | * ''< | ||
- | You can place image files named after the shortcut in the '' | ||
You should also purge [[caching|cached]] PNG and GIF images as well as the CSS Files if you have the default image instead of the one you uploaded. | You should also purge [[caching|cached]] PNG and GIF images as well as the CSS Files if you have the default image instead of the one you uploaded. | ||
< | < | ||
- | rm -rf <path-to-dokuwiki>/ | + | rm -rf <dokuwiki_data>/ |
- | rm -rf < | + | |
- | rm -rf < | + | |
</ | </ | ||
- | The interwiki shortcut has to be in lowercase and follow | + | It may actually |
- | The format | + | If you want to disable all or some kind of link icons, refer to [[tips:disabling link icons]]. |
- | < | + | ===== Using the number sign/hash (#), not as comment ===== |
+ | Because it is reserved | ||
- | The shortcut is the one you will be able to use in the link later. In the URL you can use some placeholders | + | e.g. if you are using the name of your interwiki |
- | ^ Placeholder ^ Replaced by ^ | + | Example: |
- | | {URL} | URL-encoded wikiname (the part which is appended to the URL in interwiki.local.conf) | | + | * Configuration< |
- | | {NAME} | + | postconf |
- | | {SCHEME} | + | </ |
- | | {HOST} | + | * Usage< |
- | | {PORT} | + | [[postconf> |
- | | {PATH} | + | </ |
- | | {QUERY} | + | |
- | The last 5 parameters are useful when creating interwikilinks to cachesystems. Refer to the '' | + | ===== See also ===== |
- | Examples of these placeholders can found in conf/interwiki.conf | + | |
+ | * [[tips: | ||
+ | * You can install and use the [[plugin: | ||
+ | * [[config|Configuring DokuWiki]] | ||
- | For example, [[https:// | ||
- | < | ||
- | and now create your link to it like this: | ||
- | < |
interwiki.1271696122.txt.gz · Last modified: 2010-04-19 18:55 by 96.231.143.6