Extension:QRLite

From MediaWiki.org
Jump to navigation Jump to search
MediaWiki extensions manual
Crystal Clear action run.svg
QRLite
Release status: stable
Implementation MyWiki
Description Generates QRCodes in .png and .svg format on the fly
Author(s) gesinn.it GmbH & Co. KG (Fannontalk)
Latest version 0.3.3 (2019-01-25)
MediaWiki 1.27+
PHP 5.2+
Database changes No
License GNU General Public License 2.0 or later
Download
Hooks used
ParserFirstCallInit
Translate the QRLite extension if it is available at translatewiki.net
Check usage and version matrix.

The QRLite extension allows to generate QRCodes as .png- and .svg-images. It generates and embeds them "on the fly" and does not store them as MediaWiki images.

Installation[edit]

  • Ensure the GD php-extension is installed (e.g. on Debian issue: apt install php-gd and then restart apache, if not already installed).
  • Download, extract and place the file(s) in a directory called QRLite in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    require_once "$IP/extensions/QRLite/QRLite.php";
    
  • Yes Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Instead of downloading the zip archive you may also check this extension out via Git:

git clone https://github.com/gesinn-it/QRLite.git

Usage[edit]

Use the #qrlite parser function.

Available Parameters
  • format: svg or png. Default is png
  • size: A number that defines the overall QR Code image size. Default is 6.
  • margin: A number, default is 0
  • eec: A number ranging from 0 to 4 that defines the error correction level. Default is 2.

Examples[edit]

SVG Format (scalable)[edit]

{{#qrlite:{{fullurl:{{FULLPAGENAME}}}}|format=svg|size=5|ecc=1|margin=0}}

PNG Format[edit]

{{#qrlite:{{fullurl:{{FULLPAGENAME}}}}|format=png|size=5|margin=0}}