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:

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

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

PackageForm edit

Author Michael Daum
Version 1.10
Release 17 Dec 2018
Description
Repository https://github.com/foswiki/JQRCodeContrib
Copyright 2018, Michael Daum, All Rights Reserved
License GPL (GNU General Public License)
Home https://foswiki.org/Extensions/JQRCodeContrib
Support https://foswiki.org/Support/JQRCodeContrib
Topic revision: r1 - 17 Dec 2018, ProjectContributor
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback