interwiki
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
interwiki [2016-05-28 16:13] – cc 2.187.240.81 | interwiki [2020-06-14 11:36] – gerardnico | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== 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 ''>'' | ||
+ | |||
+ | Examples: | ||
+ | | %%[[wp> | ||
+ | | %%[[phpfn> | ||
+ | | %%[[google> | ||
+ | | %%[[doku> | ||
+ | | %%[[skype> | ||
+ | | %%[[this> | ||
+ | |||
+ | Here's an example of how to access an arbitrary file in dokuwiki' | ||
+ | |||
+ | [[this> | ||
+ | |||
+ | Since DokuWiki [[changes# | ||
+ | |||
+ | {{ phpfn> | ||
+ | |||
+ | {{ phpfn> | ||
+ | |||
+ | ===== Configuring InterWiki Shortcuts ===== | ||
+ | |||
+ | InterWiki shortcuts are defined in two files: | ||
+ | * the '' | ||
+ | * the ''< | ||
+ | |||
+ | The interwiki shortcut has to be in lowercase and follow the [[pagename]] rules. | ||
+ | |||
+ | 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> | ||
+ | |||
+ | ^ 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 example cached links with the old, not longer working, [[wp> | ||
+ | |||
+ | < | ||
+ | |||
+ | For example, [[https:// | ||
+ | |||
+ | < | ||
+ | |||
+ | 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: | ||
+ | |||
+ | < | ||
+ | |||
+ | For example: '' | ||
+ | ===== 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 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 < | ||
+ | </ | ||
+ | |||
+ | It may actually be enough to invalidate the CSS caching by re-saving in the config manager (' | ||
+ | |||
+ | If you want to disable all or some kind of link icons, refer to [[tips: | ||
+ | |||
+ | ===== Tip ===== | ||
+ | ==== Hastag (Fragment) ==== | ||
+ | If you are using the name of your interwiki in the fragment part of your URL, you need to escape it. | ||
+ | |||
+ | Example: | ||
+ | * Configuration | ||
+ | <file apache conf/ | ||
+ | postconf | ||
+ | </ | ||
+ | * Usage | ||
+ | < | ||
+ | [[postconf> | ||
+ | </ | ||
+ | |||
+ | |||
+ | =====See also===== | ||
+ | |||
+ | * [[tips: | ||
+ | * [[config|Configuring DokuWiki]] |
interwiki.txt · Last modified: 2024-01-20 20:34 by 212.159.76.45