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
interwiki [2022-09-24 00:32] Klap-ininterwiki [2024-05-08 09:27] (current) – [Table] Transfer of the information in /conf/interwiki.conf michaelsy
Line 3: Line 3:
 The original idea of InterWiki was to have one large distributed [[wp>Wiki]] over the whole Internet. Today it's 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 it's more of an easy way to link from one wiki to another by having some simple link syntax to accomplish so.
  
-In [[DokuWiki]] this is done by prefixing Wiki [[pagenames]] with a shortcut separated by a ''>'' character.+In [[DokuWiki]] this is done by prefixing Wiki [[pagenames]] with a shortcut separated by a **''>''** character.
  
 Examples: Examples:
-| %%[[wp>InterWiki]]%%    | [[wp>InterWiki]]    | links to the English language Wikipedia                                                                                                                                                                     +^  Shortcut  ^  Example  ^  Description 
-| %%[[wpfr>InterWiki]]%%    | [[wpfr>InterWiki]]    links to the French language WikipediaAlso available: ''wpde'', ''wpes'', ''wppl'', ''wpjp'', ''wpru'', ''wpmeta''                                                                                                                                                                   +''%%[[amazon>Wikis]]%%''     | [[amazon>Wikis]]    | Affiliation link to Amazon. (.de and .uk available too)  
-| %%[[phpfn>random]]%%    | [[phpfn>random]]    | links to a function in the PHP manual                                                                                                                                                                       +''%%[[callto>0123456789]]%%''  | [[callto>0123456789]]  Callto link to open phone app 
-| %%[[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                                                                                                                                                                                  +''%%[[go>pie]]%%''           | [[go>pie]]          Go lucky with first hit on Google  
-| %%[[skype>echo123]]%%   | [[skype>echo123]]   Links that opens Skype, ready to call Skype Test Call (echo123)                                                                                                                                             +''%%[[google>Wiki]]%%''      | [[google>Wiki]]     | links to a Google search  
-| %%[[this>feed.php]]%%   | [[this>feed.php]]   | links to your wiki's URL. The example links to the local [[syndication|XML feed]]. ''%%[[this>]]%%'' is special case and the only interwiki link which **cannot be configured** through any config file.  | +''%%[[paypal>id_here]]%%''   | [[paypal>id_here]]  links to PayPal  
-| %%[[rfc>9311]]%%  | [[rfc>9311]]  | links to https://www.rfc-editor.org/rfc/rfc9311                                                                                                                                                                            +''%%[[phpfn>random]]%%''     | [[phpfn>random]]    | links to a function in the PHP manual  | 
-| %%[[man>cp]]%%  | [[man>cp]]  links to  http://man.cx/                                                                                                                                                                           +''%%[[rfc>9311]]%%''         | [[rfc>9311]]        | links to https://www.rfc-editor.org/rfc/rfc9311  
-| %%[[amazon>Wikis]]%%  | [[amazon>Wikis]]  | Affiliation link to Amazon(.de and .uk available too)                                                                                                                                                                           +''%%[[skype>echo123]]%%''    | [[skype>echo123]]   Links that opens Skype, ready to call Skype Test Call (echo123)  | 
-| %%[[paypal>id_here]]%%  | [[paypal>id_here]]  | links to PayPal                                                                                                                                                                         | +''%%[[tel>123-456-7890]]%%''  | [[tel>123-456-7890]]  | Open phone app to callMore general then callto 
-| %%[[go>pie]]%%  [[go>pie]]  | Go lucky with first hit on Google                                                                                                                                                                       +''%%[[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.  | 
-| %%[[user>username]]%%  | [[user>username]]  | Links default to '':user:username'', on dokuwiki.org modified to its forum user profiles.                                                                                                                                                                       +''%%[[user>username]]%%''    | [[user>username]]   | Links default to '':user:username'', on dokuwiki.org modified to its forum user profiles.  
-| %%[[tel>123-456-7890]]%%  | [[tel>123-456-7890]]  Open phone app to callMore general then callto.                                                                                                                                                                      +''%%[[man>cp]]%%''           | [[man>cp]]          links to http://man.cx/  
-| %%[[callto>0123456789]]%%  | [[callto>0123456789]]  | Callto link to open phone app                                                                                                                                            | +''%%[[wp>InterWiki]]%%''     | [[wp>InterWiki]]    | links to the English language Wikipedia  | 
- +| ''%%[[wpfr>InterWiki]]%%''   | [[wpfr>InterWiki]]  | links to the French language WikipediaAlso available: ''wpde'', ''wpes'', ''wpjp'',  ''wppl'', ''wpru'', ''wpmeta''.  |
  
 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.
Line 28: Line 27:
   [[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.+Interwiki substitution for external images is also available.
  
- {{ phpfn>images/php.gif?96}}+{{ phpfn>images/php.gif?96}}
  
   {{ phpfn>images/php.gif?96}}   {{ phpfn>images/php.gif?96}}
Line 37: Line 36:
  
 InterWiki shortcuts are defined in two files: InterWiki shortcuts are defined in two files:
-  * Default included links are in ''[[https://github.com/splitbrain/dokuwiki/blob/master/conf/interwiki.conf|<dokuwiki_conf>/interwiki.conf]]'' file. (more can be found in [[http://usemod.com/intermap.txt]]). Modifications of this file are overwritten on a wiki upgrade.+  * Default included links are in ''[[https://github.com/dokuwiki/dokuwiki/blob/master/conf/interwiki.conf|<dokuwiki_conf>/interwiki.conf]]'' file. (more can be found in [[https://usemod.org/intermap.txt]]). Modifications of this file are overwritten on a wiki upgrade.
   * Local modifications in ''<dokuwiki_conf>/interwiki.local.conf'' file.\\ This is the file to add your own interwiki links. This will prevent the links from being overwritten on an update.   * Local modifications in ''<dokuwiki_conf>/interwiki.local.conf'' file.\\ This is the file to add your own interwiki links. This will prevent the links from being overwritten on an update.
 +
 +Alternatively, instead of editing the ''*.conf'' files directly, you can install and use the [[plugin:confmanager|{{https://raw.githubusercontent.com/cosmocode/confmanager/master/admin.svg?16}}]][[plugin:confmanager|Configuration File Manager]].
  
 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 53: Line 54:
 Or disable by mentioning no link<code - conf/interwiki.local.conf> Or disable by mentioning no link<code - conf/interwiki.local.conf>
 wpmeta wpmeta
 +paypal   # or use a comment to explain why it is disabled
 </code> </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>rawurlencode|URL-encoded]] wikiname will be appended to the URL. These placeholders are available: 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                                                                          +^ Placeholder  ^  Replaced by                                                                                                                                                                                                      
-| {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}       This is replaced by the wikiname as given in the document. Only mandatory encoded is done, urlencoding if the link is an external URL, or encoding as a wikiname if it is an internal link (begins with a colon)  
-| {SCHEME}     | scheme part if a URL was given as wikiname                                           +| {SCHEME}     | scheme part if a URL was given as wikiname                                                                                                                                                                        
-| {HOST}       | host part if a URL was given as wikiname                                             +| {HOST}       | host part if a URL was given as wikiname                                                                                                                                                                          
-| {PORT}       | port part if a URL was given as wikiname                                             +| {PORT}       | port part if a URL was given as wikiname                                                                                                                                                                          
-| {PATH}       | path part if a URL was given as wikiname                                             +| {PATH}       | path part if a URL was given as wikiname                                                                                                                                                                          
-| {QUERY}      | query part if a URL was given as wikiname                                            |+| {QUERY}      | query part if a 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 130: Line 132:
 </code> </code>
  
- +===== See also =====
-=====See also=====+
  
   * [[tips:interwiki_shortcuts|Additional InterWiki Shortcuts]]   * [[tips:interwiki_shortcuts|Additional InterWiki Shortcuts]]
 +  * You can install and use the [[plugin:confmanager|{{https://raw.githubusercontent.com/cosmocode/confmanager/master/admin.svg?16}}]][[plugin:confmanager|Configuration File Manager]] for editing via admin interface of the wiki
   * [[config|Configuring DokuWiki]]   * [[config|Configuring DokuWiki]]
 +
interwiki.1663972329.txt.gz · Last modified: 2022-09-24 00:32 by Klap-in

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
CC Attribution-Share Alike 4.0 International Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki