DokuWiki

It's better when it's simple

User Tools

Site Tools


plugin:qrcode2

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:qrcode2 [2017-12-10 18:58] – tag added obel1xplugin:qrcode2 [2021-12-11 17:38] (current) obel1x
Line 5: Line 5:
 author     : Daniel Pätzold author     : Daniel Pätzold
 email      : obel1x@web.de  email      : obel1x@web.de 
-type       : syntax +type       : syntax,helper 
-lastupdate : 2017-12-10 +lastupdate : 2019-12-08 
-compatible : 2017-02-19e+compatible : 2017-02-19e, Greebo, Hogfather
 depends    :  depends    : 
 conflicts  conflicts 
Line 13: Line 13:
 tags       : QR bitcoin barcode qrcode tags       : QR bitcoin barcode qrcode
  
-downloadurl: http://obel1x.de/lib/exe/fetch.php?media=content:qrcode2.zip +downloadurl: https://obel1x.de/dokuwiki/lib/exe/fetch.php?media=content:qrcode2.zip 
-donationurl: http://obel1x.de/doku.php?id=content:qrcode+donationurl: https://obel1x.de/dokuwiki/doku.php?id=content:qrcode
  
 ---- ----
  
 ===== Installation ===== ===== Installation =====
 +Search and install ​the plugin using the [[plugin:extension|Extension ​Manager]]. 
  
-Install the plugin using the [[plugin:plugin|Plugin Manager]] and the download URL above, which points to latest version of the plugin. If above method is not working, download the plugin at my homepage directly at\\ +If above method is not working, download the plugin at my homepage directly at\\ 
-[[http://obel1x.de/doku.php?id=content:qrcode]] or at\\ +[[https://obel1x.de/dokuwiki/doku.php?id=content:qrcode]]\\
-[[https://obel1x.de/dokuwiki/doku.php?id=content:qrcode]] (accepting the non-trusted certificate of me)\\+
 and refer to [[:Plugins]] on how to install plugins manually. and refer to [[:Plugins]] on how to install plugins manually.
  
-Note: This Plugin makes use of the library "PHP QR Code encoder" at [[https://sourceforge.net/projects/phpqrcode]], which delivers most of the functionality and ist included in Version of Build 2010100721. Well, works great.+Note: This Plugin makes use of the library "PHP QR Code encoder" at [[https://sourceforge.net/projects/phpqrcode]], which delivers most of the functionality and is included in Version of Build 2010100721. Well, works great.
  
 ===== Examples/Usage ===== ===== Examples/Usage =====
Line 40: Line 40:
 </code> </code>
  
-See the plugin in action [[http://obel1x.de/doku.php?id=content:qrcode]]\\ +==== Use the helper Class ==== 
-or at [[https://obel1x.de/dokuwiki/doku.php?id=content:qrcode]] (secureyou know about accepting my certificate+If you like to use it from other plugins, you can use the helper- class, like this: 
 +<file> 
 +Here are 2 ways to use it (first one gives more control on the result) : 
 +if (!plugin_isdisabled('qrcode2')) { 
 +    $qrcode2Helper = plugin_load('helper','qrcode2'); 
 +    // first example 
 +    $src = $qrcode2Helper->get_img("mailto:johndoe@example.com?subject=promotion", true); 
 +    print "<img class='qrcode' src='".$src."' alt='*johndoe*' />"; 
 +    // second example 
 +    $qrcode2Helper->get_img("http://example.com"false, 128); 
 +
 +</file>
 ===== Syntax ===== ===== Syntax =====
  
 See above, no other things to know about. See above, no other things to know about.
  
-===== Configuration and Settings =====+===== Configuration, settings and dependencies =====
  
 No configuration, no settings are required. No configuration, no settings are required.
 +
 +Check, that php has the Libarary "GD2" installed!
  
 ===== Development ===== ===== Development =====
Line 57: Line 69:
 === Change Log === === Change Log ===
  
 +  * **2019-12-08**
 +    * Enhancement by Simon DELAGE / sdelage@gmail.com New helper-Class added. use it like:
 +  * **2018-03-18**
 +    * Bugfix by Georg Schmidt / gs-develop@gs-sys.de: when Dokuwiki was installed in Top-Directory of Server, URL will be wrong. This was corrected by extending syntax.php
 +<file>
 +In my case, it does not work, because the URL to the plugin was wrong.
 +"https://<top-level-domain>/dokuwiki/doku.php/lib/plugins/qrcode2/png.php"
 +
 +My dokuwiki is using "/doku.php/wiki:tutorial?do=admin&page=config"
 +whereas your one is using "/doku.php?id=content:qrcode".
 +## The attachment contains a fix.
 +## It is not tested with userewrite == 1.
 +
 +My solution working (only for userewrite = 2) :
 +
 +"https://<top-level-domain>/dokuwiki/doku.php/../lib/plugins/qrcode2/png.php" is effectively
 +"https://<top-level-domain>/dokuwiki/lib/plugins/qrcode2/png.php"
 +
 +In "syntax.php" change
 +    $renderer->doc .= '<img src="lib/plugins/qrcode2/png.php?id='.$data.'" />';
 +to
 +    $renderer->doc .= '<img src="../lib/plugins/qrcode2/png.php?id='.$data.'" />';
 +
 +This is based on https://www.dokuwiki.org/config:userewrite
 +I hope, this fix is working on all systems.
 +Feel free to contact me for fixing that problem.
 +</file>
   * **2017-12-10**   * **2017-12-10**
     * Initial release     * Initial release
Line 65: Line 104:
  
 === ToDo/Wish List === === ToDo/Wish List ===
- 
 None. None.
  
plugin/qrcode2.1512928696.txt.gz · Last modified: 2017-12-10 18:58 by obel1x

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