e96960c55ca64f31988141512a64e32f52c43d5e
[Packages/TYPO3.CMS.git] / typo3 / sysext / compatibility6 / ext_localconf.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 if (TYPO3_MODE === 'FE') {
5
6 // Register legacy content objects
7 $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['IMGTEXT'] = \TYPO3\CMS\Compatibility6\ContentObject\ImageTextContentObject::class;
8 $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['CLEARGIF'] = \TYPO3\CMS\Compatibility6\ContentObject\ClearGifContentObject::class;
9 $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['CTABLE'] = \TYPO3\CMS\Compatibility6\ContentObject\ContentTableContentObject::class;
10 $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['OTABLE'] = \TYPO3\CMS\Compatibility6\ContentObject\OffsetTableContentObject::class;
11 $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['COLUMNS'] = \TYPO3\CMS\Compatibility6\ContentObject\ColumnsContentObject::class;
12 $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['HRULER'] = \TYPO3\CMS\Compatibility6\ContentObject\HorizontalRulerContentObject::class;
13 $GLOBALS['TYPO3_CONF_VARS']['FE']['ContentObjects']['FORM'] = \TYPO3\CMS\Compatibility6\ContentObject\FormContentObject::class;
14
15 // Register a hook for data submission
16 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission']['mailform'] = \TYPO3\CMS\Compatibility6\Controller\FormDataSubmissionController::class;
17
18 // Register hooks for xhtml_cleaning
19 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-all'][] = \TYPO3\CMS\Compatibility6\Hooks\TypoScriptFrontendController\ContentPostProcHook::class . '->contentPostProcAll';
20 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-cached'][] = \TYPO3\CMS\Compatibility6\Hooks\TypoScriptFrontendController\ContentPostProcHook::class . '->contentPostProcCached';
21 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['tslib/class.tslib_fe.php']['contentPostProc-output'][] = \TYPO3\CMS\Compatibility6\Hooks\TypoScriptFrontendController\ContentPostProcHook::class . '->contentPostProcOutput';
22 }
23
24 // Add Default TS for CType "mailform" after default content rendering
25 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript('compatibility6', 'constants', '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:compatibility6/Configuration/TypoScript/Form/constants.txt">', 'defaultContentRendering');
26 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScript('compatibility6', 'setup', '<INCLUDE_TYPOSCRIPT: source="FILE:EXT:compatibility6/Configuration/TypoScript/Form/setup.txt">', 'defaultContentRendering');
27
28 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
29 mod.wizards.newContentElement.wizardItems {
30 forms.header = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:forms
31 forms.elements.mailform {
32 icon = gfx/c_wiz/mailform.gif
33 title = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:forms_mail_title
34 description = LLL:EXT:cms/layout/locallang_db_new_content_el.xlf:forms_mail_description
35 tt_content_defValues {
36 CType = mailform
37 bodytext (
38 # Example content:
39 Name: | *name = input,40 | Enter your name here
40 Email: | *email=input,40 |
41 Address: | address=textarea,40,5 |
42 Contact me: | tv=check | 1
43
44 |formtype_mail = submit | Send form!
45 |html_enabled=hidden | 1
46 |subject=hidden| This is the subject
47 )
48 }
49 }
50 forms.show := addToList(mailform)
51 }
52 }
53 ');
54
55 // Add a for previewing tt_content elements of CType="mailform"
56 $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms/layout/class.tx_cms_layout.php']['tt_content_drawItem']['mailform'] = \TYPO3\CMS\Compatibility6\Hooks\PageLayoutView\MailformPreviewRenderer::class;