[BUGFIX] Fix the element browsers
[Packages/TYPO3.CMS.git] / typo3 / sysext / rtehtmlarea / ext_tables.php
1 <?php
2 if (!defined('TYPO3_MODE')) {
3 die('Access denied.');
4 }
5 // Add static template for Click-enlarge rendering
6 \TYPO3\CMS\Core\Extension\ExtensionManager::addStaticFile($_EXTKEY, 'static/clickenlarge/', 'Clickenlarge Rendering');
7 // Add configuration of soft references on image tags in RTE content
8 require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath($_EXTKEY) . 'hooks/softref/ext_tables.php';
9 // Add acronyms table
10 $GLOBALS['TCA']['tx_rtehtmlarea_acronym'] = array(
11 'ctrl' => array(
12 'title' => 'LLL:EXT:rtehtmlarea/locallang_db.xml:TYPO3\\CMS\\Rtehtmlarea\\Extension\\Acronym',
13 'label' => 'term',
14 'default_sortby' => 'ORDER BY term',
15 'sortby' => 'sorting',
16 'delete' => 'deleted',
17 'enablecolumns' => array(
18 'disabled' => 'hidden',
19 'starttime' => 'starttime',
20 'endtime' => 'endtime'
21 ),
22 'dynamicConfigFile' => \TYPO3\CMS\Core\Extension\ExtensionManager::extPath($_EXTKEY) . 'tca.php',
23 'iconfile' => \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath($_EXTKEY) . 'extensions/Acronym/skin/images/acronym.gif'
24 )
25 );
26 \TYPO3\CMS\Core\Extension\ExtensionManager::allowTableOnStandardPages('tx_rtehtmlarea_acronym');
27 \TYPO3\CMS\Core\Extension\ExtensionManager::addLLrefForTCAdescr('tx_rtehtmlarea_acronym', ('EXT:' . $_EXTKEY) . '/locallang_csh_abbreviation.xml');
28 // Add contextual help files
29 $htmlAreaRteContextHelpFiles = array(
30 'General' => ('EXT:' . $_EXTKEY) . '/locallang_csh.xlf',
31 'Acronym' => ('EXT:' . $_EXTKEY) . '/extensions/Acronym/locallang_csh.xlf',
32 'EditElement' => ('EXT:' . $_EXTKEY) . '/extensions/EditElement/locallang_csh.xlf',
33 'Language' => ('EXT:' . $_EXTKEY) . '/extensions/Language/locallang_csh.xlf',
34 'MicrodataSchema' => ('EXT:' . $_EXTKEY) . '/extensions/MicrodataSchema/locallang_csh.xlf',
35 'PlainText' => ('EXT:' . $_EXTKEY) . '/extensions/PlainText/locallang_csh.xlf',
36 'RemoveFormat' => ('EXT:' . $_EXTKEY) . '/extensions/RemoveFormat/locallang_csh.xlf',
37 'TableOperations' => ('EXT:' . $_EXTKEY) . '/extensions/TableOperations/locallang_csh.xlf'
38 );
39 foreach ($htmlAreaRteContextHelpFiles as $key => $file) {
40 \TYPO3\CMS\Core\Extension\ExtensionManager::addLLrefForTCAdescr((('xEXT_' . $_EXTKEY) . '_') . $key, $file);
41 }
42 unset($htmlAreaRteContextHelpFiles);
43 // Extend TYPO3 User Settings Configuration
44 if ((TYPO3_MODE === 'BE' && \TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('setup')) && is_array($GLOBALS['TYPO3_USER_SETTINGS'])) {
45 $GLOBALS['TYPO3_USER_SETTINGS']['columns'] = array_merge($GLOBALS['TYPO3_USER_SETTINGS']['columns'], array(
46 'rteWidth' => array(
47 'type' => 'text',
48 'label' => 'LLL:EXT:rtehtmlarea/locallang.xml:rteWidth',
49 'csh' => 'xEXT_rtehtmlarea_General:rteWidth'
50 ),
51 'rteHeight' => array(
52 'type' => 'text',
53 'label' => 'LLL:EXT:rtehtmlarea/locallang.xml:rteHeight',
54 'csh' => 'xEXT_rtehtmlarea_General:rteHeight'
55 ),
56 'rteResize' => array(
57 'type' => 'check',
58 'label' => 'LLL:EXT:rtehtmlarea/locallang.xml:rteResize',
59 'csh' => 'xEXT_rtehtmlarea_General:rteResize'
60 ),
61 'rteMaxHeight' => array(
62 'type' => 'text',
63 'label' => 'LLL:EXT:rtehtmlarea/locallang.xml:rteMaxHeight',
64 'csh' => 'xEXT_rtehtmlarea_General:rteMaxHeight'
65 ),
66 'rteCleanPasteBehaviour' => array(
67 'type' => 'select',
68 'label' => 'LLL:EXT:rtehtmlarea/htmlarea/plugins/PlainText/locallang.xml:rteCleanPasteBehaviour',
69 'items' => array(
70 'plainText' => 'LLL:EXT:rtehtmlarea/htmlarea/plugins/PlainText/locallang.xml:plainText',
71 'pasteStructure' => 'LLL:EXT:rtehtmlarea/htmlarea/plugins/PlainText/locallang.xml:pasteStructure',
72 'pasteFormat' => 'LLL:EXT:rtehtmlarea/htmlarea/plugins/PlainText/locallang.xml:pasteFormat'
73 ),
74 'csh' => 'xEXT_rtehtmlarea_PlainText:behaviour'
75 )
76 ));
77 $GLOBALS['TYPO3_USER_SETTINGS']['showitem'] .= ',--div--;LLL:EXT:rtehtmlarea/locallang.xml:rteSettings,rteWidth,rteHeight,rteResize,rteMaxHeight,rteCleanPasteBehaviour';
78 }
79 ?>