Zum Inhalt springen

2 Frontend Extentions: image swopper 4x4 & css styled content

Erstellt am 20. Juli 2005 · 1 Antwort · letzte Antwort am 21. Juli 2005

Tags: Bilder, Frage

mediaman ·

Mein Vorhaben ist es, in verschiedenen Menüpunkten (im Frontend) einen Bildwechsler einzubauen. Deshalb dachte ich, man könnte es mal mit dem ImageSwopper4x4 ausprobieren. Bei dem klickt man auf ein kleines Bild und an anderer Stelle werden die Bilder gewechselt. Genau das, was ich brauche.

Wenn hier aber jemand eine bessere Idee dafür hat, wäre ich dankbar.

Also mein Problem besteht darin, dass ich das Ding nicht richtig zum laufen bekomme. Ich bin mit dem Typo-Script noch nicht so fit, dass ich beides einbauen kann: den Imageswopper und css_styled_content.

Es kommt immer diese Fehlermeldung:
" Warning: Cannot modify header information - headers already sent by (output started at /var/www/dummy-3.8.0/typo3conf/ext/imgswopper4x4/pi1/locallang.php:5) in /var/www/typo3_src-3.8.0/typo3/sysext/cms/tslib/class.tslib_fe.php on line 2612"

Es wird also einmal der Header vom Imageswopper los geschickt und einmal von css_styled_content, oder?!

Mein Typoscript sieht wie folgt aus:

# Configuring the Auto-Parser for main template:
plugin.tx_automaketemplate_pi1 {
    # Read the template file:
  content = FILE
  content.file = fileadmin/index.html


    # Here we define which elements in the HTML that 
    # should be wrapped in subpart-comments:
  elements {
    BODY.all = 1
    BODY.all.subpartMarker = DOCUMENT_BODY

    HEAD.all = 1
    HEAD.all.subpartMarker = DOCUMENT_HEADER
    HEAD.rmTagSections = title

    TD.all = 1
  }

    # Prefix all relative paths with this value:
  relPathPrefix = fileadmin/
}

# Menu 1 cObject erster Versuch
temp.menu_1 = HMENU

  # First level menu-object, textual läuft

temp.menu_1.1 = GMENU
temp.menu_1.1 {
MENU.entryLevel=2
 # expAll = 1
  wrap =  |
  NO {
XY = 150,23
5 = IMAGE
5.file = fileadmin/_gfx/button_n.jpg
5.offset = 25,5
10 = TEXT
10.text.field = title
10.fontFile = fileadmin/fonts/arial_bold.ttf
10.fontSize = 10
# offset bestimmt die vertikale Ausrichtung der Schrift
10.offset = 27,17
10.fontColor = #FFFFFF
10.align = center
10.before.cObject = TEXT
10.before.cObject.field = uid
# in der folgenden Zeile wird der Seitentitel als title-Tag in den Link hinein
#generiert
10.before.cObject.dataWrap = <a href="index.php?id=|" title="{field:title}">
}

# hier wird der aktive Menüpunkt definiert, es wird alles von NO
#(Normalzustand) übernommen, nur die Grafik, Schriftfarbe und Position der
#Schrift wird verändert  
  ACT < .NO
  ACT = 1
  ACT {

5.file = fileadmin/_gfx/button_a.jpg
10.fontColor = #FFFFFF

}
# hier wird der Mouseover Zustand der nicht aktiven Menüpunkte definiert, es
#wird alles von NO (Normalzustand) übernommen, nur die Grafik und
#die Schriftfarbe wird verändert 
  RO < .NO
  RO = 1
  RO {
5.file =  fileadmin/_gfx/button_n.gif
10.fontColor = #61583A
}
 }

# Menu 2 cObject zweite Ebene
temp.menu_2 = HMENU
temp.menu_2{
entryLevel=1
}

# Second level menu-object, grafisch
temp.menu_2.1 = GMENU
temp.menu_2.1 {

 # expAll = 1
  wrap =  |
  NO {
XY = 20,18
5 = IMAGE
5.file = fileadmin/_gfx/seite_n.jpg
#5.offset = 25,5
10 = TEXT
10.text.field = title
10.fontFile = fileadmin/fonts/arial.ttf 
10.fontSize = 10
# offset bestimmt die vertikale Ausrichtung der Schrift
10.offset = 2,13
10.fontColor = #000000
10.align = center
10.before.cObject = TEXT
10.before.cObject.field = uid
# in der folgenden Zeile wird der Seitentitel als title-Tag in den Link hinein
#generiert
10.before.cObject.dataWrap = <a href="index.php?id=|" title="{field:title}">
}

# hier wird der aktive Menüpunkt definiert, es wird alles von NO
#(Normalzustand) übernommen, nur die Grafik, Schriftfarbe und Position der
#Schrift wird verändert  
  ACT < .NO
  ACT = 1
  ACT {

5.file = fileadmin/_gfx/seite_a.jpg
10.fontColor = #000000

}
# hier wird der Mouseover Zustand der nicht aktiven Menüpunkte definiert, es
#wird alles von NO (Normalzustand) übernommen, nur die Grafik und
#die Schriftfarbe wird verändert 
  RO < .NO
  RO = 1
  RO {
5.file =  fileadmin/_gfx/seite_n.jpg
10.fontColor = #CCCCCC
}
 }




# Main TEMPLATE cObject for the BODY
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
    # Feeding the content from the Auto-parser to the TEMPLATE cObject:
  template =< plugin.tx_automaketemplate_pi1
    # Select only the content between the <body>-tags
  workOnSubpart = DOCUMENT_BODY

    # Substitute the ###menu_1### subpart with dynamic menu:
  subparts.menu_1 < temp.menu_1
subparts.menu_2 < temp.menu_2

 
    # Substitute the ###content### subpart with some example content:
  #subparts.content = TEXT
  #subparts.content.value = HELLO WORLD - CONTENT
 subparts.content < styles.content.get

  #subparts.CONTENT_RIGHT = TEXT
  #subparts.CONTENT_RIGHT.value = HELLO WORLD - CONTENT
 subparts.CONTENT_RIGHT< styles.content.getRight
}


# Main TEMPLATE cObject for the HEAD
temp.headTemplate = TEMPLATE
temp.headTemplate {
    # Feeding the content from the Auto-parser to the TEMPLATE cObject:
  template =< plugin.tx_automaketemplate_pi1
    # Select only the content between the <head>-tags
  workOnSubpart = DOCUMENT_HEADER
}

   
# Default PAGE object:
page = PAGE
page.typeNum = 0
page.stylesheet = fileadmin/_lib/styles.css

# Copying the content from TEMPLATE for <body>-section:
page.10 < temp.mainTemplate
# Copying the content from TEMPLATE for <head>-section:
page.headerData.10  < temp.headTemplate

Im Manual vom Image Swopper steht nun noch folgendes:

Typoscript setup
In the extension's folder you'll find the file ext_typoscript_setup.txt:

plugin.tx_imgswopper4x4_pi1 {
  # templates are to be located in the extension folder:
  templatefilename= template.html
  # folder containing the images for hotspots & swop-images:
  imgPath= fileadmin/swop-images/ 
  # code to be rendered into empty hotspot-cells:
  emptySpotCode= <img src="fileadmin/swop-images/blank.gif" width="54" height="54" border="0" alt="" />
}

Nur bekomme ich das irgendwie nicht zusammen. Ich meine, ich möchte nicht das template vom Imageswopper benutzen, ich möchte meins benutzen.

Kann mir vielleicht irgendjemand helfen, bitte bitte.