Hallo,
ich habe mich an etwas PHP-Skripting versucht, obwohl ich davon eigentlich keine Ahnung habe. Deswegen jetzt der Hilferuf an euch!![]()
![]()
seit einigen Tagen gibt es ein Firefox-Add-On (http://www.sample.org****/mobilebarcoder/ ), das zur Aktuellen Seite den QR-Code generiert und ausgibt. Das Add-On benutzt ein Skript von http://www.swetake.com/index-e.php .
Weswegen soll es das nicht auch als Joomla-Modul geben, dachte ich und wurde fündig bei Joomla-Masters (leider auf Japanisch).http://joomla.mu-fan.com/content/view/7/2/
[Die Kommentare sind von Google übersetzt (besser als gar nichts, oder) - jedenfalls werde ich wenigstens ein bisschen schlauer daraus. ]
qrcode_img.php ist das funktionierende Skript von Swetake.PHP-Code:<?php
// http://translate.google.com/translate?hl=en&sl=ja&u=http://joomla.mu-fan.com/content/blogcategory/3/5/&sa=X&oi=translate&resnum=1&ct=result&prev=/search%3Fq%3Dmod_qrcode%26hl%3Den%26hs%3DtIY%26lr%3D%26client%3Dfirefox-a%26rls%3Dorg.mozilla:de:official
// * QR cord/code module indicatory module
// * writer: -
// * Version: 0.1
// * PHP4 QRcode image PHP scripts version 0.50g (C)2000-2005,Y.Swetake
// *
//As for copyright of the QR cord/code class library for
// * PHP4 there is Y.Swetake which is the writer
// *
// product name and writer name, as for version and copyright the one which is written is better, probably will be.
// no direct access
defined( '_VALID_MOS' ) or die( 'Beschränkter Zugang.' );
// there to be mistake in this file, when it is accessed directly, because there is no _VALID_MOS constant, error message is indicated.
// each file. You be sure will insert in the
// This one sentence of makes security firm.
global $mosConfig_absolute_path,$mosConfig_debug;
define ("QRCODE_DATA_PATH",$mosConfig_absolute_path."/modules/qrcode_data");
require($mosConfig_absolute_path."/modules/qrcode_img.php");
//configuration.php $mosConfig_absolute_path (absoluteness pass of the sight), $mosConfig_debug (in [debatsuku]) declaring that you use, after declaring the constant of the QR cord/code class library, requesting the QR cord/code class library
$data = $params->get('qrdata');
// $params->get ('qrdata') with the parameter which is declared with the XML file is acquired.
if(!$data){
$data='<a href="http://.$_server["http_host"].$_server["request_uri/">http://.$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI</a>]';
// $data='<a href="http://.mosgetparam/">http://.mosGetParam</a>'( $_SERVER,'HTTP_HOST').mosGetParam( $_SERVER,'REQUEST_URI');
}
// Because parameter qrdata default is blank, if blank URL is indicated in the QR cord/code.
//PHP $_SERVER [can acquire host name with “HTTP_HOST”], but here Joomla! API is used.
//mosGetParam ($_SERVER, 'HTTP_HOST'), as for HTTP request, mosGetParam ($_REQUEST???)So you acquire.
//,The ON of register globals, OFF do in the air, with using this API of super global constant can be utilized.
$qrimg = new Qrcode_image;
$qrimg->set_module_size(4);
$qrimg->qrcode_image_out($data,"png", $mosConfig_absolute_path."/images/stories/qrcode.png");
// Because here is method of using the QR cord/code class library, explanation is excluded.
$content .="<img src=\"./images/stories/qrcode.png\" />";
// If it adds to $content, Joomla! Indicates selfishly.
//Also it is possible to output HTML by your.
if($mosConfig_debug) {
$content .="<br />".$data;
}
// With sight tub of global [konhuigureshiyon] debugging sight: It is, please do.
// That you think what is done, whether you understand.
?>
Es dreht sich m.E. um Zeile 32 und 33. Hier habe ich mich an ein paar Änderungen versucht. Jetzt vermute ich, dass wenigstens ein Wert an qrcode_img.php übergeben wird.
Es heißt nämlich nun: "Fatal error: QRcode : Data do not exist. in /home/user/domain.de/modules/qrcode_img.php on line 88"
Wir jemand daraus schlau(er als ich)?![]()
![]()
Infos: Joomla 1.0.11
RG_globals = 0


LinkBack URL
About LinkBacks
Zitieren
Lesezeichen