Hallo,
der Vortrag von https://www.youtube.com/watch?v=INMvcXO4rtQ bzw. http://vortraege.bytepuzzle.de/ck201...ao-extended/#/ enthält haargenau das, was ich benötige: bei den Events ein Feld hinzufügen (location_course_mail) und das später in ein Buchungs-Formular übernehmen. Also mein erster DCA-Versuch: ich habe seine Vorlagen angepasst und getreu seiner Vorgaben abgelegt in php-Datein mit der Kodierung UTF8 ohne BOM:
undCode:// Feldposition $GLOBALS['TL_DCA']['tl_calendar_events']['palettes']['default'] = str_replace( 'location', 'location, location_course_mail', $GLOBALS['TL_DCA']['tl_calendar_events']['palettes']['default']); // Feldkonfiguration $GLOBALS['TL_DCA']['tl_calendar_events']['fields']['location_course_mail'] = array ( 'label' => &$GLOBALS['TL_LANG']['tl_calendar_events']['location_course_mail'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('rgxp'=>'email', 'maxlength'=>255, 'decodeEntities'=>true, 'tl_class'=>'w50'), 'sql' => "varchar(255) NOT NULL default ''" );Dazu das gleiche in englisch.Code:// Feldbezeichnungen $GLOBALS['TL_LANG']['tl_calendar_events']['location_course_mail']['0'] = "E-Mail Seminaranbieter"; $GLOBALS['TL_LANG']['tl_calendar_events']['location_course_mail']['1'] = "E-Mail Adresse des Seminaranbieters";
Beim Aufruf des Install-Tools kommt folgende Fehlermeldung:Im Backend ist das Eingabefeld dann vorhanden, allerdings führt eine Dateneingabe zu einem Query-Error (finde das Feld auch nicht in der Datenbank):Code:// Feldposition $GLOBALS['TL_DCA']['tl_calendar_events']['palettes']['default'] = str_replace( 'location', 'location, location_course_mail', $GLOBALS['TL_DCA']['tl_calendar_events']['palettes']['default']); // Feldkonfiguration $GLOBALS['TL_DCA']['tl_calendar_events']['fields']['location_course_mail'] = array ( 'label' => &$GLOBALS['TL_LANG']['tl_calendar_events']['location_course_mail'], 'exclude' => true, 'search' => true, 'inputType' => 'text', 'eval' => array('rgxp'=>'email', 'maxlength'=>255, 'decodeEntities'=>true, 'tl_class'=>'w50'), 'sql' => "varchar(255) NOT NULL default ''" ); Warning: Cannot modify header information - headers already sent by (output started at /var/www/web22375887/html/parimal/system/modules/calendar_seminar/dca/tl_calendar_events.php:1) in system/modules/core/library/Contao/Template.php on line 294 #0 [internal function]: __error(2, 'Cannot modify h...', '/var/www/web223...', 294, Array) #1 system/modules/core/library/Contao/Template.php(294): header('Vary: User-Agen...', false) #2 system/modules/core/classes/BackendTemplate.php(120): Contao\Template->output() #3 system/modules/core/controllers/BackendInstall.php(882): Contao\BackendTemplate->output() #4 system/modules/core/controllers/BackendInstall.php(204): Contao\BackendInstall->outputAndExit() #5 contao/install.php(20): Contao\BackendInstall->run() #6 {main} Warning: Cannot modify header information - headers already sent by (output started at /var/www/web22375887/html/parimal/system/modules/calendar_seminar/dca/tl_calendar_events.php:1) in system/modules/core/library/Contao/Template.php on line 295 #0 [internal function]: __error(2, 'Cannot modify h...', '/var/www/web223...', 295, Array) #1 system/modules/core/library/Contao/Template.php(295): header('Content-Type: t...') #2 system/modules/core/classes/BackendTemplate.php(120): Contao\Template->output() #3 system/modules/core/controllers/BackendInstall.php(882): Contao\BackendTemplate->output() #4 system/modules/core/controllers/BackendInstall.php(204): Contao\BackendInstall->outputAndExit() #5 contao/install.php(20): Contao\BackendInstall->run() #6 {main}
Event-Fehler.gif
Von früheren Gehversuchen mit einem php-Forum kenne ich den Fehler von Leerzeichen, die vor einer php-Funktion stehen. Aber hier finde ich den Fehler einfach nicht.
Any suggestions?
Und dann noch eine Schönheitsfrage: Das Feld Veranstaltungsort hätte ich gerne auch nur über die halbe Breite. Dazu müsste ich wohl dem Feld die Klasse "w50" zuweisen. Aber wie mache ich das updatesicher?"

Zitieren
