Zum Inhalt springen

TV - image field - Klick vergrössern

Erstellt am 19. Juni 2006 · 6 Antworten · letzte Antwort am 10. Oktober 2007

Tags: Frage

typonater ·

Hallo,

Habe ein FCE erstellt. Darin wurde ein image field gemapped. Wie kann ich nun ein "Klick vergrössern" bei diesem Bild bewirken?

Danke für jede Hilfe
Cheers
Tric

typonater ·

Wieso geht der folgende Code im xml der DS nicht:

<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
<t3datastructure>
    <meta type="array" />
        <langchildren type="integer">1</langchildren>
        <langdisable type="integer">1</langdisable>
    </meta>
    <root type="array">
        <tx_templavoila type="array">
            <title>FCE1</title>
            <description>Select the HTML element on the page which you want to be the overall container element for the template.</description>
        </tx_templavoila>
        <type>array</type>
        <el type="array">
            <field_image type="array">
                <tx_templavoila type="array">
                    <title>Bild</title>
                    <sample_data type="array">
                        <numindex index="0"></numindex>
                    </sample_data>
                    <etype>image</etype>
                    <typoscript>
	               10 = IMAGE
	               10.file.import = uploads/tx_templavoila/
	               10.file.import.current = 1
	               10.file.import.listNum = 0
	               10.file.maxW = 200
                        10.imageLinkWrap = 1
                       10.imageLinkWrap.enable = 1
                       10.imageLinkWrap.bodyTag = <body bgcolor="black">
                       10.imageLinkWrap.wrap = <a href="javascript:close();"> | </a>
                       10.imageLinkWrap.width = 800
                       10.imageLinkWrap.height = 600
                       10.imageLinkWrap.JSwindow = 1
                       10.imageLinkWrap.JSwindow.newWindow = 1
                      10.imageLinkWrap.JSwindow.expand = 17,20
   
              	</typoscript>
                </tx_templavoila>
                <tceforms type="array">
                    <config type="array">
                        <type>group</type>
                        <internal_type>file</internal_type>
                        <allowed>gif,png,jpg,jpeg</allowed>
                        <max_size>1000</max_size>
                        <uploadfolder>uploads/tx_templavoila</uploadfolder>
                        <show_thumbs>1</show_thumbs>
                        <size>1</size>
                        <maxitems>1</maxitems>
                        <minitems>0</minitems>
                    </config>
                    <label>Bild</label>
                </tceforms>
            </field_image>
        </el>
        <section>0</section>
    </root>
</t3datastructure>
typonater ·

Folgender Code hat nun funktioniert: habe "[CDATA[ ... ]]

<t3datastructure>
    <root type="array">
        <tx_templavoila type="array">
            <title>FCE1</title>
            <description>Select the HTML element on the page which you want to be the overall container element for the template.</description>
        </tx_templavoila>
        <type>array</type>
        <el type="array">
            <field_text type="array">
                <tx_templavoila type="array">
                    <title>Ueberschrift und Text</title>
                    <sample_data type="array">
                        <numindex index="0"></numindex>
                    </sample_data>
                    <etype>ce</etype>
                    <typoscript>
	10= RECORDS
	10.source.current=1
	10.tables = tt_content
                    </typoscript>
                    <oldstylecolumnnumber type="integer">0</oldstylecolumnnumber>
                </tx_templavoila>
                <tceforms type="array">
                    <config type="array">
                        <type>group</type>
                        <internal_type>db</internal_type>
                        <allowed>tt_content</allowed>
                        <size>5</size>
                        <maxitems>200</maxitems>
                        <minitems>0</minitems>
                        <multiple>1</multiple>
                        <show_thumbs>1</show_thumbs>
                    </config>
                    <label>Ueberschrift und Text</label>
                </tceforms>
            </field_text>
            <field_image type="array">
                <tx_templavoila type="array">
                    <title>Einzelbild gross</title>
                    <sample_data type="array">
                        <numindex index="0"></numindex>
                    </sample_data>
                    <etype>image</etype>
                    <typoscript>
	[CDATA[
	10 = IMAGE
	10.file.import = uploads/tx_templavoila/
	10.file.import.current = 1
	10.file.import.listNum = 0
	10.file.maxW = 200
        10.params = align="left" border="0"

###################################
### BEGIN code to enlarge image ###
###################################
10.imageLinkWrap = 1
10.imageLinkWrap {
  bodyTag = <body style="background-color:#fff;">
  wrap = <a href="javascript:close();"> | </a>
  width = 800m
  height = 600m
  effects=
  JSwindow = 1
  JSwindows {
    newWindow = 0
    expand = 17,20
    }

  enable = 1
  typolink.parameter.field=image_link
  typolink.extTarget = _blank
}
#################################
### END code to enlarge image ###
#################################

                         ]]</typoscript>
                </tx_templavoila>
                <tceforms type="array">
                    <config type="array">
                        <type>group</type>
                        <internal_type>file</internal_type>
                        <allowed>gif,png,jpg,jpeg</allowed>
                        <max_size>1000</max_size>
                        <uploadfolder>uploads/tx_templavoila</uploadfolder>
                        <show_thumbs>1</show_thumbs>
                        <size>1</size>
                        <maxitems>1</maxitems>
                        <minitems>0</minitems>
                    </config>
                    <label>Einzelbild gross</label>
                </tceforms>
            </field_image>
            <field_multiimages type="array">
                <tx_templavoila type="array">
                    <title>Mehrere Bilder klein</title>
                    <sample_data type="array">
                        <numindex index="0"></numindex>
                    </sample_data>
                    <etype>ce</etype>
                    <typoscript>
	10= RECORDS
	10.source.current=1
	10.tables = tt_content
                    </typoscript>
                    <oldstylecolumnnumber type="integer">1</oldstylecolumnnumber>
                </tx_templavoila>
                <tceforms type="array">
                    <config type="array">
                        <type>group</type>
                        <internal_type>db</internal_type>
                        <allowed>tt_content</allowed>
                        <size>5</size>
                        <maxitems>200</maxitems>
                        <minitems>0</minitems>
                        <multiple>1</multiple>
                        <show_thumbs>1</show_thumbs>
                    </config>
                    <label>Mehrere Bilder klein</label>
                </tceforms>
            </field_multiimages>
        </el>
        <section>0</section>
    </root>
</t3datastructure>
hidufy ·

Hallo Typonater,

ich habe das gleiche Problem, welches sich allerdings nicht mit Deiner Lösung beheben läßt. An anderer Stelle habe ich gelesen, dass es eine Änderung in Typo3 4.0 gibt. Daher meine Frage, auf welcher Version Du diesen Quellcode implementiert hast?

Grüße Michael

chrischi4711 ·

Habe hier auch ein Problem mit dem code. Bei mir kommt immer wenn ich irgend etwas von imageLinkWrap einfüge die Meldungen:

TemplaVoila ERROR:

Couldn't find a Data Structure set for table/row "tt_content:122".
Please select a Data Structure and Template Object first.

und

TemplaVoila ERROR:

Couldn't find a Data Structure set for table/row "tt_content:126".
Please select a Data Structure and Template Object first.

fahre hier T3 4.1.1
hat sich dort ewas verändert?? am Code kanns eigentlich nicht liegen, den habe ich von mehreren Seiten und aus zwei Büchern probiert und immer der selbe Fehler.

Gruß Chrischi

maxB ·

Habt ihr eine Lösung? Ich habe das gleiche Problem - TemplaVoila meckert wegen einer angeblich fehlenden Datenstruktur.

chrisschu ·

Der beschriebene Fehler wird ausgegeben, weil "<" nicht in "&amp;lt;" umgewandelt wurden (HTML Special Chars).

  10 = IMAGE
  10.file.import = uploads/tx_templavoila/
  10.file.import.current = 1
  10.file.import.listNum = 0
  10.file.width = 153c
  10.file.height = 75c

###################################
### BEGIN code to enlarge image ###
###################################
10.imageLinkWrap = 1
10.imageLinkWrap {
  bodyTag = &amp;lt;body style="margin:0;padding:0; background-color:#fff;"&amp;gt;
  wrap = &amp;lt;a href="javascript:close();"&amp;gt; | &amp;lt;/a&amp;gt;
  width = 800m
  height = 600m
  effects=
  JSwindow = 1
  JSwindows {
    newWindow = 0
    expand = 17,20
    }
 
  enable = 1
  typolink.parameter.field=image_link
  typolink.extTarget = _blank
}
#################################
### END code to enlarge image ###
#################################

Achtung: Das Ganze funktioniert nicht in Verbindung mit dem Gifbuilder (warum, weiß wohl niemand). Das Ganze kann nur mit imgResource (https://docs.typo3.org/m/typo3/reference-typoscript/main/en-us/Functions/Imgresource.html) gelöst werden.