[TYPO3-UG Dutch] gifbuilder fontFile selector

Menno-Paul Schreuder mennotypo3 at e-rank.nl
Tue Jul 28 16:05:05 CEST 2009


Dag allemaal,

ik ben nogal een 'rookie' op het gebied van Typo3 dus ik heb even wat
hulp nodig.

ik ben bezig met het maken van een fontFile selector binnen gifbuilder
zodat we binnen een CE naast meerdere kleuren ook een font kunnen
selecteren. Tot op heden wil het niet erg lukken. Onderstaand het script
tot dusver...

Het betreft twee soorten achtergronden met de ene keer een soort
'krijt-font' en de andere keer een 'stift-font' die in zwart of wit
moeten worden weergegeven. Onder field_color worden de kleuren
opgegeven, field_fonttype maakt de selectie van 2 fonts mogelijk en in
field_container moet binnen de gifbuilder (zie dikgedrukte deel) dus
ook  toegepast gaan worden. De selectie gaat dus prima, maar de
'functie-aanroep'  binnen gifbuilder gaat fout en resulteert in weergave
van het standaard gifbuilder-font.

Kan iemand me hiermee verder helpen?

Bij voorbaat dank!

Groet,

Menno



            <field_color type="array">
                    <type>no_map</type>
                    <tx_templavoila type="array">
                        <title>Tekstkleur</title>
                        <sample_data type="array">
                            <numIndex index="0"></numIndex>
                        </sample_data>
                        <eType>select</eType>
                    </tx_templavoila>
                    <TCEforms type="array">
                        <config type="array">
                            <type>select</type>
                            <items type="array">
                                <numIndex index="0" type="array">
                                    <numIndex index="0">Zwart</numIndex>
                                    <numIndex index="1">000000</numIndex>
                                </numIndex>
                                <numIndex index="1" type="array">
                                    <numIndex index="0">Wit</numIndex>
                                    <numIndex index="1">FFFFFF</numIndex>
                                </numIndex>
                            </items>
                            <default>0</default>
                        </config>
                        <label>Kleur</label>
                    </TCEforms>
                </field_color>
            <field_fonttype type="array">
                    <type>no_map</type>
                    <tx_templavoila type="array">
                        <title>Tekstkleur</title>
                        <sample_data type="array">
                            <numIndex index="0"></numIndex>
                        </sample_data>
                        <eType>select</eType>
                    </tx_templavoila>
                    <TCEforms type="array">
                        <config type="array">
                            <type>select</type>
                            <items type="array">
                                <numIndex index="0" type="array">
                                    <numIndex index="0">Stift</numIndex>
                                    <numIndex
index="1">fileadmin/templates/fonts/DAKOTA.TTF</numIndex>
                                </numIndex>
                                <numIndex index="1" type="array">
                                    <numIndex index="0">Krijt</numIndex>
                                    <numIndex
index="1">fileadmin/templates/fonts/LEVICRAYOLA.TTF</numIndex>
                                </numIndex>
                            </items>
                            <default>0</default>
                        </config>
                        <label>Kleur</label>
                    </TCEforms>
                </field_fonttype>
            <field_container type="array">
                <tx_templavoila type="array">
                    <title></title>
                    <sample_data type="array">
                        <numIndex index="0"></numIndex>
                    </sample_data>
                    <eType>none</eType>
                    <TypoScript>
                <![CDATA[

                    10 = IMAGE
                    10 {
                        file = GIFBUILDER
                        file {
                            XY = 599,267
                            format = jpg
                            quality = 100

                            10 = IMAGE
                            10.format = jpg
                            10.quality = 90
                            10.file.import = uploads/tx_templavoila/
                            10.file.import.field = field_image
                            10.file.import.listNum = 0
                            10.file.maxW = 599

                            15 = IMAGE
                            15 {
                                file =
fileadmin/templates/vervolg/img/vervolg_schoolbord.png
                                }

                            20 = TEXT
                            20.text.field = field_tekst
                            20.text.listNum.splitChar=|
                            20.text.listNum=0
                            *20.fontFile {
                                **    cObject = TEXT
                                    cObject.value = {field:field_fonttype}
                                    cObject.insertData = 1
                                        }*
                            20.fontSize = 30
                            20.text.case = upper
                            20.fontColor {
                                cObject = TEXT
                                cObject.value = #{field:field_color}
                                cObject.insertData = 1
                                }   
                            20.offset=254,50
                            20.niceText=1
                            30 < .20
                            30.text.listNum=1
                            30.offset=254,50+[20.h]
                            40 < .20
                            40.text.listNum=2
                            40.offset=254,50+[20.h]+[30.h]+6
                            50 < .20
                            50.text.listNum=3
                            50.offset=254,50+[20.h]+[30.h]+[40.h]+12
                            60 < .20
                            60.text.listNum=4
                            60.offset=254,50+[20.h]+[30.h]+[40.h]+[50.h]+18
                            70 < .20
                            70.text.listNum=5
                           
70.offset=254,50+[20.h]+[30.h]+[40.h]+[50.h]+[60.h]+24

                        }
        }
        stdWrap.typolink.parameter {
            cObject = TEXT
            cObject.value = {field:field_link}
            insertData = 1
        }
        params = class="vervolg_visual"
    }
        ]]>
                        </TypoScript>
                </tx_templavoila>
            </field_container>



More information about the TYPO3-UG-Dutch mailing list