Release status: beta
|Implementation||Parser extension, Tag|
|Description||EAN BarCode Generator, a MediaWiki extension for graphical illustration of Code39, Codabar, EAN-13, EAN-8 and UPC-A barcodes.|
|Author(s)||Markus Szumovski (DontPanictalk)|
|Latest version||2.1 (21 February, 2009)|
|MediaWiki||1.12, 1.13 (to date only tested versions, it may work with earliers too)|
|Download||Zip file at ChaosReligion.com
Translate the EAN extension if it is available at translatewiki.net
|Check usage and version matrix; code metrics|
§What can this extension do?[edit | edit source]
The EAN BarCode generator extension can create a picture of a Code39, Codabar, EAN-13, an EAN-8 or a UPC-A barcode by only adding the EAN-Tags with the barcode number to the article (concerning the EAN/UPC barcode its enough to specify the first 12 (EAN-13), the first 7 (EAN-8) or the first 11 (UPC-A) digits, the following check-digit will be calculated anyway).
§Usage[edit | edit source]
For example, the EAN-13 barcode 425353932002 will be added with the following wiki code to the article: <barcode>425353932002</barcode>
The EAN-8 barcode 8371966 will be added with the following wiki code to the article: <barcode code="ean8">8371966</barcode> And the UPC-A barcode 07283974129 will be added with the following wiki code to the article: <barcode code="upc">07283974129</barcode> You can change any barcode to a bigger size by adding the option size=X to the opening tag (X is ofcourse the size-number, like 1 or 2). Example: <barcode code="ean" size=1>425353932002</barcode> A Code39 barcode like "EAN 2.1" will be added with the following wiki code to the article: <barcode code="code39">EAN 2.1</barcode> A Codabar barcode like a446$88109b will be added with the following wiki code to the article: <barcode code="codabar">a446$88109b</barcode>
You can also use normal image options just like you would with wikipedia images. If you would add an image like this:
[[Image:somepic.jpg|thumb|400px|left|This is some text.]]
the bold part is the part you would add as "options" parameter to the opening tag. For the barcode this would look like the following:
<barcode code="ean" size=1 options="thumb|400px|left|This is some text.">123786564872</barcode> In live this would produce the following picture:
<barcode code="ean" size=1 options="thumb|400px|left|This is some text.">123786564872</barcode>
Since version 2, the pictures are added to your MediaWiki just like any other picture, and therefore, no more used pictures can be found with the "Unused images" special-page and deleted. It also gives you the possibility to arrange the picture more like you want to, just like normal pictures (see the options parameter described above).
Another example with a bigger size would be: <barcode size=1>5901234123457</barcode>
With the "code" parameter you define the barcode you want to display. Standard is "EAN-13" but you can also choose EAN-8 (code="ean8"), UPC (code="upc"), Code39 (code="code39") or Codabar (code="codabar").
§Download instructions[edit | edit source]
§Installation[edit | edit source]
To install this extension, add the following to LocalSettings.php:
Also make sure that the new directory '
/ean' is available to the extension: Either ensure that Apache has the rights to automatically create the new directory, or manually create the directory '
/ean' under the
$wgUploadDirectory (this path typically leads to your '
.../w/images' folder). Example: "
.../w/images/ean". The new
ean directory will need write permissions
(chmod 0777) to work properly. If Apache has the appropriate rights the extension will try to set the write permission automatically.