[TYPO3-german] t3 erweiterung problem bei der anleitung form_extension_tut
Christian Hensel
chensel at visiopro.de
Sat Oct 7 00:36:41 CEST 2006
Hallo Liste, im form_extension_tut findet man folgenden codeschnipsel:
(vorletzte seite)
if(isset'.$this->piVars{submit_button']){
t3lib_div::debug($this->piVars);
}
ich habe ihn eingebaut, bekomme jedoch den folgenden syntaxfehler:
Parse error: parse error, expecting `'('' in
/home/www/web0/html/wise/typo3conf/ext/wiseev/pi1/class.tx_wiseev_pi1.php on
line 57
, kann mir jemand helfen? wo liegt der Fehler? Ist im Tutorial ein Fehler..
oder mache ich einen?
komplettes skript:
<?php
/***************************************************************
* Copyright notice
*
* (c) 2006 Christian Hensel <chensel at visiopro.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
require_once(PATH_tslib.'class.tslib_pibase.php');
/**
* Plugin 'listofvolunteers' for the 'wiseev' extension.
*
* @author Christian Hensel <chensel at visiopro.de>
* @package TYPO3
* @subpackage tx_wiseev
*/
class tx_wiseev_pi1 extends tslib_pibase {
var $prefixId = 'tx_wiseev_pi1'; // Same as class name
var $scriptRelPath = 'pi1/class.tx_wiseev_pi1.php'; // Path to this script
relative to the extension dir.
var $extKey = 'wiseev'; // The extension key.
var $pi_checkCHash = TRUE;
/**
* The main method of the PlugIn
*
* @param string $content: The PlugIn content
* @param array $conf: The PlugIn configuration
* @return The content that is displayed on the website
*/
function main($content,$conf) {
$this->conf=$conf;
$this->pi_setPiVarDefaults();
$this->pi_loadLL();
/**if(isset'.$this->piVars{submit_button']) {
// WHAT TO DO if content is submitted
t3lib_div::debug($this->piVars);
}
else { **/
if(isset'.$this->piVars{submit_button']){
t3lib_div::debug($this->piVars);
}
$content='
<h3>This is a form:</h3>
<form action="'.$this->pi_getPageLink($GLOBALS['TSFE']->id).'"
method="POST">
<input type="hidden" name="no_cache" value="1">
<input type="text" name="'.$this->prefixId.'[DATA][einsatzland]">
<textarea name="'.$this->prefixId.'[DATA][4_1_projekt]"> </textarea>
<input type="submit" name="'.$this->prefixId.'[submit_button]"
value="Absenden">
</form>
<br />
<p>You can click here to '.$this->pi_linkToPage('get to this page
again',$GLOBALS['TSFE']->id).'</p>
<b>Debug (This extension is in Development):</b><br />
'.$this->pi_getPageLink($GLOBALS['TSFE']->id).' //link to current page
<br />(c) Christian Hensel
';
return $this->pi_wrapInBaseClass($content);
}
}
if (defined('TYPO3_MODE') &&
$TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/wiseev/pi1/class.tx_wiseev_pi1.php'])
{
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/wiseev/pi1/class.tx_wiseev_pi1.php']);}Vielen DankChristian
More information about the TYPO3-german
mailing list