DokuWiki

It's better when it's simple

User Tools

Site Tools


interwiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revision
interwiki [2016-06-05 21:50]
2001:4dd0:ff00:9581:9480:556c:ea8c:793 old revision restored (2016-05-28 20:33)
interwiki [2018-09-02 04:38]
Samana Johann [Configuring InterWiki Shortcuts]
Line 1: Line 1:
 ====== InterWiki Links ====== ====== InterWiki Links ======
 +
 The original idea of InterWiki was to have one large distributed [[wp>Wiki]] over the whole Internet. Today its more of an easy way to link from one wiki to another by having some simple link syntax to accomplish so. The original idea of InterWiki was to have one large distributed [[wp>Wiki]] over the whole Internet. Today its more of an easy way to link from one wiki to another by having some simple link syntax to accomplish so.
  
Line 5: Line 6:
  
 Examples: Examples:
-| %%[[wp>InterWiki]]%%         | [[wp>InterWiki]]  | links to the English language Wikipedia | +| %%[[wp>InterWiki]]%%    | [[wp>InterWiki]]    | links to the English language Wikipedia                                                                                                                                                                     
-| %%[[phpfn>random]]%%         | [[phpfn>random]] | links to a function in the PHP manual | +| %%[[phpfn>random]]%%    | [[phpfn>random]]    | links to a function in the PHP manual                                                                                                                                                                       
-| %%[[google>Wiki]]%%          | [[google>Wiki]] | links to a Google search | +| %%[[google>Wiki]]%%     | [[google>Wiki]]     | links to a Google search                                                                                                                                                                                    
-| %%[[doku>interwiki]]%%       | [[doku>interwiki]] | links to the DokuWiki wiki | +| %%[[doku>interwiki]]%%  | [[doku>interwiki]]  | links to the DokuWiki wiki                                                                                                                                                                                  
-| %%[[skype>echo123]]%%        | [[skype>echo123]] | Links that opens Skype, ready to call Skype Test Call (echo123) | +| %%[[skype>echo123]]%%   | [[skype>echo123]]   | Links that opens Skype, ready to call Skype Test Call (echo123)                                                                                                                                             
-| %%[[this>feed.php]]%%        | [[this>feed.php]] | links to your wiki's URL. The example links to the local [[syndication|XML feed]]. ''%%[[>this]]%%'' is a special case and the only interwiki link which **cannot be configured** through any config file. |+| %%[[this>feed.php]]%%   | [[this>feed.php]]   | links to your wiki's URL. The example links to the local [[syndication|XML feed]]. ''%%[[this>]]%%'' is a special case and the only interwiki link which **cannot be configured** through any config file.  |
  
 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>lib/exe/fetch.php?media=video.ogg|{{image.png?300}}]]   [[this>lib/exe/fetch.php?media=video.ogg|{{image.png?300}}]]
 +
 +Since DokuWiki [[changes#release_2017-02-19e_frusterick_manners|Release 2017-02-19b “Frusterick Manners”]], interwiki substitution for external images is available.
 +
 + {{ phpfn>images/php.gif?96}}
 +
 +  {{ phpfn>images/php.gif?96}}
  
 ===== Configuring InterWiki Shortcuts ===== ===== Configuring InterWiki Shortcuts =====
 +
 InterWiki shortcuts are defined in two files: InterWiki shortcuts are defined in two files:
   * the ''[[https://github.com/splitbrain/dokuwiki/blob/master/conf/interwiki.conf|<dokuwiki_conf>/interwiki.conf]]'' file.\\ This is the default file, it contains a few predefined useful shortcuts (more can be found in [[http://usemod.com/intermap.txt]]). It is possible to modify this file, however this could result in your changes being overwritten when upgrading DokuWiki.   * the ''[[https://github.com/splitbrain/dokuwiki/blob/master/conf/interwiki.conf|<dokuwiki_conf>/interwiki.conf]]'' file.\\ This is the default file, it contains a few predefined useful shortcuts (more can be found in [[http://usemod.com/intermap.txt]]). It is possible to modify this file, however this could result in your changes being overwritten when upgrading DokuWiki.
Line 32: Line 40:
 | {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}       | wikiname without any encoding                                                         | | {NAME}       | wikiname without any encoding                                                         |
-| {SCHEME}     | scheme part if an URL was given as wikiname                                           | +| {SCHEME}     | scheme part if URL was given as wikiname                                           | 
-| {HOST}       | host part if an URL was given as wikiname                                             | +| {HOST}       | host part if URL was given as wikiname                                             | 
-| {PORT}       | port part if an URL was given as wikiname                                             | +| {PORT}       | port part if URL was given as wikiname                                             | 
-| {PATH}       | path part if an URL was given as wikiname                                             | +| {PATH}       | path part if URL was given as wikiname                                             | 
-| {QUERY}      | query part if an URL was given as wikiname                                            |+| {QUERY}      | query part if URL was given as wikiname                                            |
  
 The last 5 parameters are useful when creating interwikilinks to cachesystems.  The last 5 parameters are useful when creating interwikilinks to cachesystems. 
Line 43: Line 51:
  
 <code>coral http://{HOST}.{PORT}.nyud.net:8090{PATH}?{QUERY}</code> <code>coral http://{HOST}.{PORT}.nyud.net:8090{PATH}?{QUERY}</code>
- 
  
 For example, [[https://wiki.ubuntu.com/|Ubuntu's wiki]] uses namespaces and pagenames like this ''LaptopTestingTeam/ToshibaPortegeM700'' and without using ''{NAME}'' as a placeholder in your interwiki.local.conf file, you'll get a "Not Found" error on their wiki, because it'll interpret the forward slash as a ''%2F'' ; so what you can do is add this line to your interwiki.local.conf: For example, [[https://wiki.ubuntu.com/|Ubuntu's wiki]] uses namespaces and pagenames like this ''LaptopTestingTeam/ToshibaPortegeM700'' and without using ''{NAME}'' as a placeholder in your interwiki.local.conf file, you'll get a "Not Found" error on their wiki, because it'll interpret the forward slash as a ''%2F'' ; so what you can do is add this line to your interwiki.local.conf:
Line 54: Line 61:
  
 If the wikiname will already include encoded characters (ex: ''%26'' for ''&'') use {PATH} in your interwiki.local.conf definition. If the wikiname will already include encoded characters (ex: ''%26'' for ''&'') use {PATH} in your interwiki.local.conf definition.
 +
 +==== Inter(n)wiki links ====
 +
 +To refer to certain namespaces within you own wiki:
 +
 +<code><shortcut>      <dokuwiki_root>:ns:..:</code>
 +
 +For example: ''enlib      doku.php?id=:en:lib:'' would address pages in the namespace '':en:lib:pagename'' if using the link syntax ''enlib>pagename''.
 ===== 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.
   * ''<dokuwiki_root>/lib/images/interwiki''\\ The directory to place the image files in.   * ''<dokuwiki_root>/lib/images/interwiki''\\ The directory to place the image files in.
Line 67: Line 83:
  
 If you want to disable all or some kind of link icons, refer to [[tips:disabling link icons]]. If you want to disable all or some kind of link icons, refer to [[tips:disabling link icons]].
- 
  
 =====See also===== =====See also=====
 +
 +  * [[tips:interwiki_shortcuts|Additional InterWiki Shortcuts]]
   * [[config|Configuring DokuWiki]]   * [[config|Configuring DokuWiki]]
interwiki.txt · Last modified: 2020-06-14 11:36 by gerardnico