Strict Standards: Declaration of action_plugin_dlcount::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/dlcount/action.php on line 14

Strict Standards: Declaration of action_plugin_indexmenu::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/indexmenu/action.php on line 169

Strict Standards: Declaration of action_plugin_ipban::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/ipban/action.php on line 67

Strict Standards: Declaration of action_plugin_loglog::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/loglog/action.php on line 82

Strict Standards: Declaration of action_plugin_navi::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/navi/action.php on line 46

Strict Standards: Declaration of action_plugin_uparrow::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/uparrow/action.php on line 69

Strict Standards: Declaration of action_plugin_userspagecreate::register() should be compatible with DokuWiki_Action_Plugin::register($controller) in /home/www/wiki/lib/plugins/userspagecreate/action.php on line 97

Strict Standards: Declaration of cache_instructions::retrieveCache() should be compatible with cache::retrieveCache($clean = true) in /home/www/wiki/inc/cache.php on line 289

Warning: Cannot modify header information - headers already sent by (output started at /home/www/wiki/lib/plugins/dlcount/action.php:14) in /home/www/wiki/inc/auth.php on line 312

Strict Standards: Only variables should be passed by reference in /home/www/wiki/doku.php on line 71

Warning: Cannot modify header information - headers already sent by (output started at /home/www/wiki/lib/plugins/dlcount/action.php:14) in /home/www/wiki/inc/actions.php on line 154
QR-Code [phpwcms-HowTo:wiki]

Strict Standards: Declaration of syntax_plugin_code::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, &$renderer, $data) in /home/www/wiki/lib/plugins/code/syntax.php on line 41

Strict Standards: Declaration of syntax_plugin_tip::render() should be compatible with DokuWiki_Syntax_Plugin::render($format, &$renderer, $data) in /home/www/wiki/lib/plugins/tip/syntax.php on line 38

QR-Code

QR-Code 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 zunächst für die Automobilindustrie entwickelt wurde.
(Zitat: Wikipedia)

Das QR-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: {QR_CODE[][xxx]}, wobei xxx die Kantenlänge des Bildes angibt z.B. {QR_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

  • $phpwcms['allow_ext_render'] = 1;



Beschreibung:

Einstellungen in den Ersetzern:

  • Z.B.
  • - {QR_CODE} = Ausgabe des QR-Code der aktuellen URL mit der voreingestellten Kantenlänge 150px
  • - {QR_CODE 200} = Ausgabe des QR-Code der aktuellen URL mit der Kantenlänge 200px
  • - {QR_CODE175} = Ausgabe des QR-Code der aktuellen URL mit der Kantenlänge 175px


Script:

Dateiname: rt_qr_code.php
Verzeichnis: template/inc_script/frontend_render/

rt_qr_code.php

<?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&amp;chl='.$qr_code['url'].'&amp;chs='.$qr_code['size'].'x'.$qr_code['size'].'" alt="QR Direct Link" />',
      $content['all']
   );
 
}
?>

Neu seit 2015

rt_qr_code.php

    <?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="https://chart.googleapis.com/chart?chs='.$qr_code['size'].'x'.$qr_code['size'].'&amp;cht=qr&amp;chl='.$qr_code['url'].'" />',
          $content['all']
       );
 
    }
    ?>


deutsch/ersetzer_rts/frontend_render/qr-code.txt · Last modified: 2015/01/10 19:45 by Claus
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0

Strict Standards: Only variables should be passed by reference in /home/www/wiki/doku.php on line 79