TIP JQRCodeContrib is not installed on Foswiki.org.

JQRCodeContrib

QR code generator

This plugin lets you generate QR codes of arbitrary content. Simply surround a text fragment with a DIV element of class qrcode. It is based on the jQuery-qrcode plugin by Lars Jung.

Examples

You type:

%JQREQUIRE{"qrcode"}% <!-- specified only once per page -->
...
<div class="qrcode" data-size="200" data-ec-level="L">
BEGIN:VCARD
VERSION:3.0
N:Person;Test;;;
FN:Test  Person
ORG:Snake Oil Department
TITLE:
TEL;TYPE=WORK:12345
TEL;TYPE=CELL:123456
TEL;TYPE=FAX:1234567
EMAIL:foo@bar.com
END:VCARD
</div>

You get (if installed):

qrcode

Syntax

The output of the QR code generator can be customized using HTML5 data parameters as can be seen in above example. Add the css class qrcode to a DOM node (such as a DIV element) to aktivate the generator. Here are a couple of most useful parameters.

Parameter Description Default
data-size size in pixel of the image being generated 100
data-ec-level error correction level; can be L, M, Q or H H
data-fill foreground color of the image #000
data-background null for transparent background null

See the full list of all parameters that may be added to the element.

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

None

Change History

17 Dec 2018 prevent flickering when generating the code; fix dependencies; docu fixes
30 May 2018 initial version

I Attachment Action Size Date Who Comment
JQRCodeContrib.md5md5 JQRCodeContrib.md5 manage 165 bytes 17 Dec 2018 - 10:06 MichaelDaum  
JQRCodeContrib.sha1sha1 JQRCodeContrib.sha1 manage 189 bytes 17 Dec 2018 - 10:06 MichaelDaum  
JQRCodeContrib.tgztgz JQRCodeContrib.tgz manage 57 K 17 Dec 2018 - 10:05 MichaelDaum  
JQRCodeContrib.zipzip JQRCodeContrib.zip manage 61 K 17 Dec 2018 - 10:05 MichaelDaum  
JQRCodeContrib_installerEXT JQRCodeContrib_installer manage 5 K 17 Dec 2018 - 10:06 MichaelDaum  
example.pngpng example.png manage 9 K 17 Dec 2018 - 10:05 MichaelDaum  
Topic revision: r3 - 17 Dec 2018, 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