Hi Leute,
was mach ich falsch... ???
Wenn ich das richtig verstanden habe ist doch TEXT auch ein cObject oder?
Wenn dies so ist warum frist typo fogenden Code nicht:
bodytext{
stdWrap = | <br>
stdWrap.editIcons.beforeLastTag = 1
stdWrap.editIcons = tt_content : tx_contentnhhkxc_bodycontent
stdWrap.editIcons.iconTitle = Text ändern
}
ich bekomme einfach für diesen Part meiner Extension kein Editicon angezeigt ,.. verflixte Axt noch eins #evil#
Der PHP - Code der class.tx_contentnhhkxc_pi1.php
sieht wie folgt aus:
<?php
/***************************************************************
* Copyright notice
*
* (c) 2004 SwiftLizard ()
* 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!
***************************************************************/
/**
* Plugin 'NHHK Seiten Inhalt mit einem Bild' for the 'content_nhhk_xc' extension.
*
* @author SwiftLizard <>
*/
require_once(PATH_tslib."class.tslib_pibase.php");
class tx_contentnhhkxc_pi1 extends tslib_pibase {
var $prefixId = "tx_contentnhhkxc_pi1"; // Same as class name
var $scriptRelPath = "pi1/class.tx_contentnhhkxc_pi1.php"; // Path to this script relative to the extension dir.
var $extKey = "content_nhhk_xc"; // The extension key.
var $conf;
var $templateCode;
function textfeldImage($text) {
$conf=array();
$conf["file"] = "GIFBUILDER";
$conf["file."]["XY"] = "350,28";
$conf["file."]["20"] = "TEXT";
$conf["file."]["20."]["text"] = $text;
$conf["file."]["20."]["stdWrap"] =" | H";
$conf["file."]["20."]["fontColor"] = "#CC0000";
$conf["file."]["20."]["fontFile"] = "fileadmin/templates/fonts/bank_gothic_light_bt.ttf";
$conf["file."]["20."]["fontSize"] = "22";
$conf["file."]["20."]["antiAlias"] = "2";
$conf["file."]["20."]["offset"] = "2,22";
return $this->cObj->IMAGE($conf);
}
function main($content,$conf) {
$this->conf=$conf;
$this->pi_setPiVarDefaults();
$this->pi_loadLL();
// get the template
// Lade das Template-File.
$this->templateCode = $this->cObj->fileResource($this->conf["templateFile"]);
if ($this->templateCode=="") {
return "<h3>Kein HTML-Template gefunden:</h3>".$this->conf["templateFile"];
}
// Subpart Marker
$templateMarker = "###TEMPLATE_DISPLAY_ALL###";
$template = $this->cObj->getSubpart($this->templateCode, $templateMarker);
$subpartArray = array();
// Image Resource aus DB holen
$this->conf["contentbild."]["file"] = "uploads/tx_contentnhhkxc/". ($this->cObj->data['tx_contentnhhkxc_image']);
// Image Rendern
$theImgCode=$this->cObj->IMAGE($this->conf["contentbild."]);
// Überschrift aus Datenbak holen
$ueberschrift =$this->cObj->parseFunc($this->cObj->data['tx_contentnhhkxc_headline'], $this->conf["parser."]);
// Bodytext aus DB holen
$this->conf["bodytext."]["value"] = $this->cObj->data['tx_contentnhhkxc_bodycontent'];
$bodytext = $this->cObj->TEXT($this->conf["bodytext."]);
// Marker befüllen
$subpartArray["###Headline###"] = $this->textfeldImage($ueberschrift);
$subpartArray["###Body###"] = $bodytext ;
$subpartArray["###IMAGE###"] = $theImgCode;
// Contentbereich Rendern
$content = $this->cObj->substituteMarkerArrayCached($template, $subpartArray, array(), array());
// finally return the content
return $this->pi_wrapInBaseClass($content);
}
}
if (defined("TYPO3_MODE") && $TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/content_nhhk_xc/pi1/class.tx_contentnhhkxc_pi1.php"]) {
include_once($TYPO3_CONF_VARS[TYPO3_MODE]["XCLASS"]["ext/content_nhhk_xc/pi1/class.tx_contentnhhkxc_pi1.php"]);
}
?>
Die Komplette Typo_Script_Setup :
plugin.tx_contentnhhkxc_pi1 {
# Template
templateFile = fileadmin/templates/html_templates/content_inc/darstellung.tmpl
parser < tt_content.text.20.parseFunc
# Überschrift
headline{
stdWrap = |
stdWrap.editIcons.beforeLastTag = 1
stdWrap.editIcons = tt_content : tx_contentnhhkxc_headline
stdWrap.editIcons.iconTitle = Überschrift ändern
}
# Body Text
bodytext{
RTE_compilant = 1
RTE_compilant.mode = fontWrap
stdWrap = | <br>
stdWrap.editIcons.beforeLastTag = 1
stdWrap.editIcons = tt_content : tx_contentnhhkxc_bodycontent
stdWrap.editIcons.iconTitle = Text ändern
}
# Content Bild
contentbild {
stdWrap = |
stdWrap.editIcons.beforeLastTag = 1
stdWrap.editIcons = tt_content : tx_contentnhhkxc_image
stdWrap.editIcons.iconTitle = Bild ändern
} // ENDE
}
Die Headline Funtzt übrigens auch nicht was das ausgeben der EditIcons betrift #evil#
bim Image gehts aber :o
Also bitte helft mir, was mache ich falsch...
beim Image funtzt es doch auch ....grummel
Ich bin Echt verzweifelt und für hilfe äußerst dankbar.!!