Ausgabe Marker erfolgt vor HTML [Gelöst]

  • MaloDE MaloDE
    R2-D2
    0 x
    80 Beiträge
    0 Hilfreiche Beiträge
    30. 12. 2008, 09:07

    Hallo an alle!

    Ich hab ein seltsames Problem. Ich habe einen Marker ###AUSGABE###. Dieser wird auch wie gewollt ersetzt durch ein PHP Script, welches ich als PHP-Datei abgelegt habe. Nur aus irgendwelchen gründen gibt er den ersetzten Marker ganz am Anfang der Seite aus statt im entsprechenden DIV. Hier mal das Root Template:

    [TS]page = PAGE
    page {
    typeNum = 0

    ### UTF-8 und DocType Angaben ###
    config {
    #doctype = html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
    doctype = xhtml_trans
    doctypeSwitch = 1
    xmlprologue = none
    xhtml_cleaning = all
    htmlTag_langKey = de
    language = de
    metaCharset = utf-8
    additionalHeaders = Content-Type:text/html;charset=utf-8
    }

    # Allgemeine Seiteneigenschaften
    stylesheet = fileadmin/css/home.css

    # Designvorlage integrieren
    10 = TEMPLATE
    10.template = FILE
    10.template.file = fileadmin/sub_home.html
    10.workOnSubpart = DOKUMENT

    10.marks {

    NAVISUB= HMENU
    NAVISUB.special = directory
    NAVISUB.special.value=2
    NAVISUB.entryLevel=1
    NAVISUB.1 = TMENU

    NAVISUB.1 {

    NO.linkWrap = |<br>|*||<br>|*||
    NO.ATagParams = class="mainnaviNO"
    ACT = 1
    ACT.linkWrap = |<br>|*||<br>|*||
    ACT.ATagParams = class="mainnaviACT"
    }

    NAVIMAIN=HMENU
    NAVIMAIN.special = directory
    NAVIMAIN.special.value = 8
    NAVIMAIN.1 = TMENU
    NAVIMAIN.1 {

    expAll = 1
    NO.linkWrap = |<br>|*||<BR>|*||
    NO.ATagParams = class="subnaviNO"
    ACT = 1
    ACT.linkWrap = |<br>|*||<BR>|*||
    ACT.ATagParams = class="subnaviNO"
    }

    NAVIMAIN.2 = TMENU
    NAVIMAIN.2 {

    NO.linkWrap = |<br>|*||<BR>|*||<br><br>
    NO.ATagParams = class="subnaviSub"
    ACT = 1
    ACT.linkWrap = |<br>|*||<BR>|*||<br><br>
    ACT.ATagParams = class="subnaviSubACT"
    }

    }

    #Inhalt
    10.marks.INHALT < styles.content.get

    #Inhalt
    10.marks.AKTUELL < styles.content.getRight

    }
    [/TS]

    Auf der entsprechenden Seite habe ich ein Extension Template:

    [TS]page.10.template.file = fileadmin/sub_ref_overview.html
    page.stylesheet = fileadmin/css/ref-overview.css

    page.10.marks.AUSGABE = PHP_SCRIPT
    page.10.marks.AUSGABE.file = fileadmin/referenzen/overview.php
    [/TS]

    Die Designvorlage sieht so aus:

    [HTML]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Unbenanntes Dokument</title>
    <link href="fileadmin/css/ref-overview.css" rel="stylesheet" type="text/css" />
    </head>

    <body>
    <!--- ###DOKUMENT### start -->
    <div id="containerTop">
    <div id="container-head">
    <div id="container-head-logo"><a href="index.php"><img src="fileadmin/gfx/sub_logo.jpg" alt="BOOMBOXX Digitale Medien" width="189" height="47" border="0" /></a></div>
    <div id="container-head-contact"><span class="container-head-contact-span">BOOMBOXX</span> Digitale Medien</div>
    </div>
    <div id="container-content">
    <div id="container-content-menu">###NAVIMAIN###</div>
    <div id="container-content-content">###AUSGABE###</div>
    </div>
    <div style="clear:both;"></div>
    </div>
    <div id="containerBottom">
    <div id="container-footer"></div>
    </div>
    <!--- ###DOKUMENT### ende -->
    </body>
    </html>[/HTML]

    und zu guter letzt das PHP-Script:

    1. <?php
    2.  
    3. // Config includen
    4. require("config/config.php");
    5.  
    6. // Datenbank Connect
    7. $database = mysql_connect($config["dbHost"], $config["dbUser"], $config["dbPassword"]);
    8. mysql_select_db($config["dbName"], $database);
    9. if (!$database) { echo "Error while connecting with database!"; die; } // Error while connecting
    10.  
    11. ?>
    12.  
    13. <h1>Internetpräsenzen</h1>
    14. <?php
    15.  
    16. // Records auslesen und anzeigen
    17. $divCol=1;
    18. $qry = mysql_db_query($config["dbName"],"select * from script_referenzen");
    19. echo "ja: ".mysql_num_rows($qry);
    20. while ($records = mysql_fetch_array($qry))
    21. {
    22. // Standards setzen für DIV-Ausrichtung
    23. $margin="0px";
    24. $float="left";
    25.  
    26. // Left Margin für mittlere Spalte
    27. if ($divCol==2)
    28. {
    29. $margin="100px;";
    30. }
    31.  
    32. // Right Float für rechte Spalte
    33. if ($divCol==3)
    34. {
    35. $float="right";
    36. }
    37.  
    38. // Ausgabe des DIV
    39. ?>
    40. <div style="width:150px; height:120px; margin-bottom:15px; text-align:center; display:inline; float:<?php echo $float; ?>; margin-left:<?php echo $margin; ?>;">
    41. <img src="fileadmin/referenzen/img/overview/<?php echo $records['imgOverview']; ?>.jpg" id="ref<?php echo $records['id']; ?>" alt="<?php echo $records['title']; ?>" width="150" height="90" onmouseover="opacity('ref<?php echo $records['id']; ?>',50,100,500)" onmouseout="opacity('ref<?php echo $records['id']; ?>',100,50,500)" />
    42.  
    43. </div>
    44. <?php
    45. $divCol++;
    46. if ($divCol == 4) { $divCol=1; }
    47. }
    48.  
    49. ?>

    ERGEBNIS:

    [HTML]<h1>Internetpräsenzen</h1>
    ja: 1<div style="width:150px; height:120px; margin-bottom:15px; text-align:center; display:inline; float:left; margin-left:0px;">
    <img src="fileadmin/referenzen/img/overview/www_adlerimmobilien.jpg" id="ref1" alt="Adler Immobilien" width="150" height="90" onmouseover="opacity('ref1',50,100,500)" onmouseout="opacity('ref1',100,50,500)" />

    </div>
    <br />
    <b>Warning</b>: Cannot modify header information - headers already sent by (output started at /www/htdocs/boomboxx/fileadmin/referenzen/overview.php:14) in <b>/www/htdocs/boomboxx/typo3/sysext/cms/tslib/class.tslib_fe.php</b> on line <b>2830</b><br />
    <br />
    <b>Warning</b>: Cannot modify header information - headers already sent by (output started at /www/htdocs/boomboxx/fileadmin/referenzen/overview.php:14) in <b>/www/htdocs/boomboxx/typo3/sysext/cms/tslib/class.tslib_fe.php</b> on line <b>2843</b><br />
    <!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <!--
    This website is powered by TYPO3 - inspiring people to share!
    TYPO3 is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.
    TYPO3 is copyright 1998-2006 of Kasper Skaarhoj. Extensions are copyright of their respective owners.
    Information and contribution at http://typo3.com/ and http://typo3.org/
    -->

    <link rel="stylesheet" type="text/css" href="fileadmin/css/ref-overview.css" />
    <title>Projektbeispiele</title>
    <script type="text/javascript" src="typo3temp/javascript_757c080409.js"></script>

    </head>
    <body>

    <div id="containerTop">
    <div id="container-head">
    <div id="container-head-logo"><a href="index.php"><img src="fileadmin/gfx/sub_logo.jpg" alt="BOOMBOXX Digitale Medien" width="189" height="47" border="0" /></a></div>
    <div id="container-head-contact"><span class="container-head-contact-span">BOOMBOXX</span> Digitale Medien&nbsp;&nbsp;//&nbsp; T: 0 61 84 - 90 02 07 &nbsp;//&nbsp; <a href="mailto:office@boomboxx.de">office@boomboxx.de</a></div>
    </div>
    <div id="container-content">
    <div id="container-content-menu"><a href="index.php?id=9" onfocus="blurLink(this);" class="subnaviNO">Internet</a><br /><a href="index.php?id=18" onfocus="blurLink(this);" class="subnaviSub">Möglichkeiten</a><br /><a href="index.php?id=19" onfocus="blurLink(this);" class="subnaviSub">Projektablauf</a><br /><a href="index.php?id=20" onfocus="blurLink(this);" class="subnaviSub">Typo3? CMS!</a><br /><a href="index.php?id=21" onfocus="blurLink(this);" class="subnaviSub">WebShop</a><br /><br /><a href="index.php?id=10" onfocus="blurLink(this);" class="subnaviNO">Präsentationen</a><br /><a href="index.php?id=12" onfocus="blurLink(this);" class="subnaviSub">Powerpoint</a><br /><a href="index.php?id=13" onfocus="blurLink(this);" class="subnaviSub">Flash</a><br /><br /><a href="index.php?id=11" onfocus="blurLink(this);" class="subnaviNO">Darüber hinaus</a><br /><a href="index.php?id=24" onfocus="blurLink(this);" class="subnaviSub">Print</a><br /><br /><a href="index.php?id=26" onfocus="blurLink(this);" class="subnaviNO">Projektbeispiele</a></div>
    <div id="container-content-content"></div>
    </div>
    <div style="clear:both;"></div>
    </div>
    <div id="containerBottom">
    <div id="container-footer"></div>
    </div>

    </body>
    </html>[/HTML]

    Hat wer von Euch vielleicht eine Idee? Ich bin mit meinem Latein echt am Ende. WÄre nett, wenn sich das mal jemand mit anschauen würde. Ach ja Typo3-Version ist die 4.0.2.

    Riesen Dank im Voraus!

    Malo


  • 1
  • einpraegsam.net einpraegs...
    MacGyver
    0 x
    9340 Beiträge
    80 Hilfreiche Beiträge
    30. 12. 2008, 11:22

    So weit ich mich erinnern kann, muss man alles an die Variable $content übergeben und nicht einfach mit echo ausgeben...

    in2code.de - Wir leben TYPO3
    - Möchtest du TYPO3 komplett verstehen? Eigene Erweiterungen erstellen? Bei uns gibt es auch Schulungen https://www.in2code.de/produkte/typo3-schulungen/
    - Die Arbeit mit TYPO3 macht dir Spaß? Du stehst auf Berge? Komm zu uns! https://www.in2code.de/agentur/karriere/

  • MaloDE MaloDE
    R2-D2
    0 x
    80 Beiträge
    0 Hilfreiche Beiträge
    30. 12. 2008, 12:45

    hmmm das problem is net dass er keine ausgabe macht, sondern dass er sie "ganz vorne" macht. bisher hatte ich keinerlei probleme damit #paralyzed#

  • MaloDE MaloDE
    R2-D2
    0 x
    80 Beiträge
    0 Hilfreiche Beiträge
    31. 12. 2008, 11:17

    okay ich muss wohl einen compare der DB machen. leider geht es irgendwie nicht. habe es nun so gelöst, dass ich ein Inhaltselement PHP Script verwende, dann macht es keinerlei Probleme. Muss halt mal wenn ich Zeit und Lust habe das Typo3 komplett neu aufsetzen.

  • 1