Templates problem

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Templates problem

    hallo

    ich habe da ein
    Code:
    <if($katid=="10")><then>mein text</then></if>
    problem

    meine templates class sieht so aus.
    PHP-Code:
    <?php

    class tpl {

        function 
    tpl($templatefolder$end) {
            
    $this->templatefolder $templatefolder;
            
    $this->end $end;
        }

        function 
    get($templatename) {
            
    $this->templatename $templatename;
                if(
    file_exists($this->templatefolder."/$templatename.tpl")) $this->template =
    implode(""file($this->templatefolder."/".$this->templatename.".".$this->end));
                else echo 
    "<font color=\"#FF0000\"><b>!!! das $templatename ist nicht vorhanden !!!</b></font><br>";

                    
    $this->template str_replace('"'"###"$this->template);

        return 
    $this->template;
        }

        function 
    output($output) {
            
    $this->output $output;
            
    $this->output str_replace("###"'"'$this->output);

        
    $this->output preg_match_all("!<if(.*)><then>(.*)</then></if>!sieU""<\?php if(\1) {\n\t\2\n} \?>"$this->output);
        
    $this->output preg_match_all("!<if(.*)><then>(.*)</then><else>(.*)</else></if>!sieU",
    "<\?php if(\1) {\n\t\2\n} else {\n\t\3\n} \?>"$this->output);

        echo 
    $this->output;
        }

    }
    ?>
    Zuletzt geändert von clamsy; 23.01.2006, 16:00.
    Mfg Clamsy

  • #2
    ach so das is Dein Problem. na kein Wunder die Lösung ist doch 42
    Beantworte nie Threads mit mehr als 15 followups...
    Real programmers confuse Halloween and Christmas because OCT 31 = DEC 25

    Kommentar


    • #3
      sorry er zeigt mit nur ne 0 anstelle meines textes
      Mfg Clamsy

      Kommentar

      Lädt...
      X