Zum Inhalt springen

Template erstellung nach typo3.org part2

Erstellt am 12. Februar 2004 · Noch keine Antworten

Tags: PHP, Frage

jojo8897 ·

Hallo ihr, ich versuche gerade nach folgender Anleitung:
http://typo3.org/doc.0.html?&tx_extrepmgm_pi1[extUid]=490&tx_extrepmgm_pi1[tocEl]=1293&cHash=4c0fffd441
Das mal nachzubauen um zu lernen, aber ich erhalte immer folgende fehlermeldung

Fatal error: Cannot redeclare class tx_tmselect_addfilestosel in /home/www/web1/html/typo3/dummy/typo3conf/ext/tmselect/class.tx_tmselect_addfilestosel.php on line 16

ich habe das extension tmselect genannt

anbei hier mal éin Auszug aus der ...addfilestosel.php

<?php
class tx_tmselect_addfilestosel {
        var $dir = "main";

        function main(&$params,&$pObj)  {
                        // Adding an item!
                $params["items"][]=Array($pObj->sL("Mode: ".$this->dir), 999);
        }
}
class tx_tmselect_addfilestosel_ca extends tx_tmselect_addfilestosel {
        var $dir = "sub";
}
//Include the parse-html class:
require_once(PATH_t3lib.'class.t3lib_parsehtml.php');

class tx_tmselect_addfilestosel {
    var $dir = "main";
    /**
     * Manipulating the input array, $params, adding new selectorbox items.
     */
    function main(&$params,&$pObj)    {
            // configuration of paths for template files:
        $confArray = array(
            "main" => "fileadmin/template/main/",
            "sub" => "fileadmin/template/sub/"
        );

            // Finding value for the path containing the template files.
        $readPath = t3lib_div::getFileAbsFileName($confArray[$this->dir]);

            // If that directory is valid, is a directory then select files in it:
        if (@is_dir($readPath))    {

                // Getting all HTML files in the directory:
             $template_files = t3lib_div::getFilesInDir($readPath,'html,htm',1,1);

                // Start up the HTML parser:
            $parseHTML = t3lib_div::makeInstance('t3lib_parseHTML');

                // Traverse that array:
            foreach($template_files as $htmlFilePath)    {
                // Reset vars:
                $selectorBoxItem_title='';
                $selectorBoxItem_icon='';
"class.tx_tmselect_addfilestosel.php" [noeol] 73L, 2931C                    
....

wenn mir wer helfen könnte wäre das toll
vielen dank
jörg