DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:linkprefix

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
plugin:linkprefix [2015-09-10 13:32] – [Discussion] casperplugin:linkprefix [2023-10-30 23:36] (current) Klap-in
Line 1: Line 1:
-====== linkprefix plugin ======+====== linkprefix Plugin ======
  
 ---- plugin ---- ---- plugin ----
Line 6: Line 6:
 email      : dokuwiki@heiko-barth.de  email      : dokuwiki@heiko-barth.de 
 type       : renderer type       : renderer
-lastupdate : 2015-09-10 +lastupdate : 2019-01-02 
-compatible : 2009-12-25 "Lemming"2010-11-07 "Anteater"2011-05-25 "Rincewind"2012-01-25 "Angua"2012-10-13 "Adora Belle"2013-03-06, 2013-05-10 "Weatherwax"2013-12-08 "Binky"2014-05-05 "Ponder Stibbons"2014-09-29 "Hrun"2015-08-10 "Detritus"+compatible : Lemming, Anteater, Rincewind, Angua, Adora Belle, Weatherwax, Binky, Ponder Stibbons, Hrun, Detritus, Elenor of Tsort, Frusterick Manners, Greebo
 depends    :  depends    : 
 conflicts  conflicts 
-similar    :  +similar    : refererremove 
-tags       : remove referer, modify, links+tags       : links, referer, privacy
  
-downloadurl: http://www.heiko-barth.de/downloads/dw_linkprefix.zip+downloadurl: https://github.com/casperklein/dokuwiki_plugin_linkprefix/zipball/master 
 +sourcerepo : https://github.com/casperklein/dokuwiki_plugin_linkprefix/ 
 +bugtracker : https://github.com/casperklein/dokuwiki_plugin_linkprefix/issues
 ---- ----
  
Line 24: Line 26:
 ===== Updates ===== ===== Updates =====
  
 +  * 2019-01-02: PHP7 compatibility (thanks Dwight Donovan Benvenuto)
 +  * 2017-10-06: Fix external dereferer (thanks Doobry)
   * 2015-09-10: Bug fixes (thanks Christoph).   * 2015-09-10: Bug fixes (thanks Christoph).
   * 2015-08-20: Code optimized.   * 2015-08-20: Code optimized.
Line 33: Line 37:
 ===== Installation ===== ===== Installation =====
  
-Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. Refer to [[:Plugins]] on how to install plugins manually. +Search and install the plugin using the [[plugin:extension|Extension Manager]]. Refer to [[:Plugins]] on how to install plugins manually.
  
 ===== Configuration ===== ===== Configuration =====
Line 48: Line 52:
  
 <del>So nobody complains anything, I guess everything works fine with this plugin :o)</del> <del>So nobody complains anything, I guess everything works fine with this plugin :o)</del>
 +
 ===== Open Bugs ===== ===== Open Bugs =====
  
Line 75: Line 80:
  
 ==== Interwiki-Links ==== ==== Interwiki-Links ====
-If one uses more than one [[doku>de:interwiki|Interwiki]] link in a row only the first one will work.\\+If one uses more than one [[:Interwiki]] link in a row only the first one will work.\\
 Example: Example:
   [[doku>tips|Working]]   [[doku>tips|Working]]
Line 82: Line 87:
 I'm (also previous bug report) using the 2014-09-29d "Hrun" release, but for the plugin this shouldnt matter, should it? I'm (also previous bug report) using the 2014-09-29d "Hrun" release, but for the plugin this shouldnt matter, should it?
 > Fixed.  --- Heiko //2015-09-10 03:00// > Fixed.  --- Heiko //2015-09-10 03:00//
 +
 +==== External Dereferer ====
 +
 +Seems like the plugin is broken with external dereferers. It always prefixes the URL with  $_SERVER["HTTP_HOST"] which doesn't make sense for external dereferers. Also, some external dereferers don't expect urlencoded URLs. Thus the following change was necessary (which in turn breaks the plugin for the internal dereferer):
 +
 +<code>
 +-               $url    = $protocol . "://" . $_SERVER["HTTP_HOST"] . $this->getConf('prefix') . urlencode($url);
 ++               // Plugin was broken with external dereferer:
 ++               // * prefix of $_SERVER["HTTP_HOST"] doesn't make sense with
 ++               //   an external dereferer
 ++               // * our dereferer doesn't like urlencoded URLs
 ++               //$url  = $protocol . "://" . $_SERVER["HTTP_HOST"] . $this->getConf('prefix') . urlencode($url);
 ++               $url    = $this->getConf('prefix') . $url;
 +</code>
 +
 +> You are right, $_SERVER["HTTP_HOST"] makes absolutely no sense :) I will fix that and provide an option to disable URL encoding.  --- Heiko //2017-09-26 00:09//
plugin/linkprefix.1441884758.txt.gz · Last modified: 2015-09-10 13:32 by casper

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