TIP QRCodePlugin is not installed on Foswiki.org.

QRCodePlugin

QR code generator

Description

This plugin lets you generate QR codes in your wiki apps. You simply feed it a string and it will render the QR image for it.

You type:

%QRCODE{"hello world"}%

You get: (if installed)

hello-world.png

There are favious use cases for QR codes. Most notably, QR codes might be used to label physical objects by sticking a QR code on them. These may then be scanned in with a mobile device or any other QR code scanner to connect the physical object to with a virtual information about it.

QR codes are also used for two-factor authentication to enhance security of a sign in process. Foswiki does provide a two-factor authentication with an additional plugin PluggableAuthContrib.

Note that this plugin generates QR codes on the server side. There is another plugin to generate them on the client side (i.e. on your browser) called JQRCodeContrib. Generating them using a JavaScript plugin does have some advantages over codes generated on the server by adding extra flexibility in the way information can be processed. Onn the other side using QRCodePlugin to generate them on the server side has got the big advantage that these may be printed out or stored in PDF documents without any hassle.

Syntax

%QRCODE{"<string>" ...params.."}%

Parameter Description Default
"..." or text="..." string to be encoded; this may also contain standard format tokens ($percnt, $dollar etc) in which case the string is processed as a wiki application the result of which is then encoded  
class="..." css class added to the <img ...> element being inserted into the html page qrCode
format="..." format string of the result; this should be some kind of= <img ..>= tag with variables $uri expanding to the inline image data and $class to expand to the css classes <img src="$uri=" class="$class" />
size="..." square size of the image 147
level="1/2/3/4/5" level of error correction 1
scale="1/2/.../100" scale of the image 3
quiet="<number>" margin of quiet whitespace around the QR code being generated 0

REST handler

In addition to generating QR codes using the %QRCODE makro these may also be generated using a REST handler:

<img src="%SCRIPTURLPATH{"rest"}%/QRCodePlugin/encode?...<url-params>...

The <url-params basically are the same parameters available to the %QRCODE macro, except they need to be url encoded.

Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. "Extensions Operation and Maintenance" Tab -> "Install, Update or Remove extensions" Tab. Click the "Search for Extensions" button. Enter part of the extension name or description and press search. Select the desired extension(s) and click install. If an extension is already installed, it will not show up in the search results.

You can also install from the shell by running the extension installer as the web server user: (Be sure to run as the webserver user, not as root!)
cd /path/to/foswiki
perl tools/extension_installer <NameOfExtension> install

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See https://foswiki.org/Support/ManuallyInstallingExtensions for more help.

Dependencies

NameVersionDescription
Image::PNG::QRCode>=0Required

Change History

25 Jan 2024 fixed packaging issue
05 May 2022 minor docu fixes
17 Dec 2018 initial release

I Attachment Action Size Date Who Comment
QRCodePlugin.md5md5 QRCodePlugin.md5 manage 159 bytes 25 Jan 2024 - 18:36 MichaelDaum  
QRCodePlugin.sha1sha1 QRCodePlugin.sha1 manage 183 bytes 25 Jan 2024 - 18:36 MichaelDaum  
QRCodePlugin.tgztgz QRCodePlugin.tgz manage 6 K 25 Jan 2024 - 18:36 MichaelDaum  
QRCodePlugin.zipzip QRCodePlugin.zip manage 10 K 25 Jan 2024 - 18:36 MichaelDaum  
QRCodePlugin_installerEXT QRCodePlugin_installer manage 4 K 25 Jan 2024 - 18:36 MichaelDaum  
hello-world.pngpng hello-world.png manage 224 bytes 25 Jan 2024 - 18:36 MichaelDaum  
Topic revision: r3 - 25 Jan 2024, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy