NAVIGATION
This is an old revision of the document!
Der QR-Code (englisch Quick Response, “schnelle Antwort”, als Markenbegriff “QR Code”) ist ein zweidimensionaler Code, der von der japanischen Firma Denso Wave im Jahr 1994 entwickelt wurde.
(Zitat: Wikipedia)
Das OR-Code Bild wird an der Stelle des TAGs in der angegebenen Größe ausgegeben.
rt_qr_code V1.0 16.04.2012
Docu: –
Forum: Artikel URL als QR-Code?
Autor: Oliver Georgi (slackero) http://phpwcms.de
CMS Version: >= 1.5.1
Version: V1.0
TAG: {OR_CODE[][xxx]}, wobei xxx die Kantenlänge des Bildes angibt z.B. {OR_CODE} oder {QR_CODE 200} oder {QR_CODE175}
Dateiname: rt_qr_code.php
Verzeichnis: template/inc_script/frontend_render/
Bedingung: → /config/phpwcms/conf.inc.php
Einstellungen in den Ersetzern:
Dateiname: rt_qr_code.php
Verzeichnis: template/inc_script/frontend_render/
<?php // ---------------------------------------------------------------- // simple current url qr-code generator // TAG {QR_CODE}, {QR_CODE 200}, {QR_CODE175} // e.g. 200 or 175 are the dimensions of the image // // OG (Oliver Georgi): 16.02.2012 // ---------------------------------------------------------------- // ---------------------------------------------------------------- // obligate check for phpwcms constants if (!defined('PHPWCMS_ROOT')) {die("You Cannot Access This Script Directly, Have a Nice Day.");} // ---------------------------------------------------------------- if(preg_match('/\{QR_CODE(.*?)\}/', $content['all'], $qr_code)) { $qr_code['size'] = abs(intval(trim($qr_code[1]))); if(empty($qr_code['size'])) { $qr_code['size'] = 150; // default size } $qr_code['url'] = rawurlencode( abs_url(array(),array(),'','') ); $content['all'] = str_replace( $qr_code[0], '<img src="http://chart.apis.google.com/chart?cht=qr&chl='.$qr_code['url'].'&chs='.$qr_code['size'].'x'.$qr_code['size'].'" alt="QR Direct Link" />', $content['all'] ); } ?>