====== qrcode2 Plugin ====== ---- plugin ---- description: QR Code Plugin author : Daniel Pätzold email : obel1x@web.de type : syntax,helper lastupdate : 2019-12-08 compatible : 2017-02-19e, Greebo, Hogfather depends : conflicts : similar : qrcode tags : QR bitcoin barcode qrcode downloadurl: https://obel1x.de/dokuwiki/lib/exe/fetch.php?media=content:qrcode2.zip donationurl: https://obel1x.de/dokuwiki/doku.php?id=content:qrcode ---- ===== Installation ===== Search and install ​the plugin using the [[plugin:extension|Extension ​Manager]]. If above method is not working, download the plugin at my homepage directly at\\ [[https://obel1x.de/dokuwiki/doku.php?id=content:qrcode]]\\ 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 is included in Version of Build 2010100721. Well, works great. ===== Examples/Usage ===== To use it, insert something like {{QRCODE>bitcoin:1HaWAdMPdikWopC8enWn4yig3iFVt9kJ3S?amount=0.00078100}} (thank you for your donations...) in your source after activating that plugin. Maybe you like some other string, like web-pages, so do {{QRCODE>http://www.heise.de}} ==== Use the helper Class ==== If you like to use it from other plugins, you can use the helper- class, like this: 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 "*johndoe*"; // second example $qrcode2Helper->get_img("http://example.com", false, 128); } ===== Syntax ===== See above, no other things to know about. ===== Configuration, settings and dependencies ===== No configuration, no settings are required. Check, that php has the Libarary "GD2" installed! ===== Development ===== This was a one-time shot for me to do what i needed. No more developement is planned. If you like the base, feel free to make it better or maybe ask me to add/change something. I cannot guarantee for anything that this plugin may do or how it will be supported. === 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 In my case, it does not work, because the URL to the plugin was wrong. "https:///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:///dokuwiki/doku.php/../lib/plugins/qrcode2/png.php" is effectively "https:///dokuwiki/lib/plugins/qrcode2/png.php" In "syntax.php" change $renderer->doc .= ''; to $renderer->doc .= ''; 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. * **2017-12-10** * Initial release === Known Bugs and Issues === * Maybe anyone could look at the way, the library is called. Doesn't look smooth for me, i don't know how this behaves in larger dokuwiki environements. === ToDo/Wish List === None. ===== FAQ ===== None yet.