Extension:QrCode

Description
Generates qrcodes on the fly.

Usage
This parser function has several options. The simplest use of the function is as follows: Not specifying any options generates a qrcode with the URL of the wiki page the function is used or transcluded in.

You can also specify options such as the error correction (ecc), size of the squares (size) and the margin to the code (boundary):

Where ecc can be either of L,M,Q or H

Requirements

 * libqrencode
 * PHP5
 * PHP GD2 extension with JPEG and PNG support
 * phpqrcode (included)

Download
You can download the code directly via SVN from the MediaWiki source code repository, at http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/QrCode/. From a command line, you can call the following:

svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/QrCode/

Installation
Place the QrCode directory within the main MediaWiki 'extensions' directory.

Then, in the file LocalSettings.php in the main MediaWiki directory, add the following line:

Settings
The following settings are optional and will be overwritten by specifying diverging settings in the function itself:

$wgQrCodeECC = 'M';    // L,M,Q,H $wgQrCodeSize = 4;     // pixel size of black squares $wgQrCodeBoundary = 0; // margin around qrcode $wgQrCodeBot = 'QrBot'; // you can specify the name of the Bot that will generate the qrcodes. // If you don't specify one, the default one will be used

Release Notes

 * 0.01 - Initial release.

Known Bugs
The reason for this erratic behaviour is still unknown.
 * Page preview doesn't work correctly. (probably due to caching)
 * QrCodes are generated for pages that don't even transclude templates, such as CSS files and SpecialPages:
 * 1) (Upload log); 19:54 . . QrBot (Talk | contribs | block) uploaded "File:QR-SpecialPages.png" (https://www.hackerspace.lu/wiki/Special:SpecialPages)
 * 2) (Upload log); 19:52 . . QrBot (Talk | contribs | block) uploaded "File:QR-Gumaxdd.css.png" (https://www.hackerspace.lu/wiki/MediaWiki:Gumaxdd.css)
 * 3) (Upload log); 19:52 . . QrBot (Talk | contribs | block) uploaded "File:QR-Print.css.png" (https://www.hackerspace.lu/wiki/MediaWiki:Print.css)
 * 4) (Upload log); 19:52 . . QrBot (Talk | contribs | block) uploaded "File:QR-Common.css.png" (https://www.hackerspace.lu/wiki/MediaWiki:Common.css)
 * 5) (Upload log); 19:52 . . QrBot (Talk | contribs | block) uploaded a new version of "File:QR-Hack.lu 2010.png" (https://www.hackerspace.lu/wiki/Hack.lu_2010)

Todo

 * Update (i.e. replace) the image file when the QrCode arguments (ecc,size,boundary) change