This repository has been archived by the owner on Nov 19, 2017. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
/
ext_tables.php
115 lines (99 loc) · 5.35 KB
/
ext_tables.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?php
if ( !defined( 'TYPO3_MODE' ) )
{
die( 'Access denied.' );
}
/* * ****************************************************************************
*
* INDEX
*
* Set TYPO3 version
* Add page TSconf and user TSconf
* Add pagetree icons
* improve tt_content
* improve sys_template
* pagetree_enhanced_context_menu
* **************************************************************************** */
/* * ****************************************************************************
* Set TYPO3 version
* **************************************************************************** */
list( $main, $sub, $bugfix ) = explode( '.', TYPO3_version );
$version = ( ( int ) $main ) * 1000000;
$version = $version + ( ( int ) $sub ) * 1000;
$version = $version + ( ( int ) $bugfix ) * 1;
$typo3Version = $version;
/* * ****************************************************************************
* Add page TSconf and user TSconf
* **************************************************************************** */
require_once( PATH_typo3conf . 'ext/tsconf/Configuration/ExtTables/confArray.php' );
/* * ****************************************************************************
* Add pagetree icons
* **************************************************************************** */
require_once( PATH_typo3conf . 'ext/tsconf/Configuration/ExtTables/ext_tables.php' );
/* * ****************************************************************************
* improve tt_content
* **************************************************************************** */
// #62476, 141026, dwildt, +
switch ( $confArr[ 'tca_ttcontentimages' ] )
{
case('Disabled'):
break;
case('Bootstrap'):
case('Default (recommended)'):
default:
// #i0006, 141208, dwildt, -
// Breaking: #61785 - loadTCA function in GeneralUtility removed
//\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA( 'tt_content' );
// default: $TCA['tt_content']['columns']['imageheight']['config']['eval'] = 'int';
unset( $TCA[ 'tt_content' ][ 'columns' ][ 'imageheight' ][ 'config' ][ 'eval' ] );
unset( $TCA[ 'tt_content' ][ 'columns' ][ 'imagewidth' ][ 'config' ][ 'eval' ] );
break;
}
switch ( $confArr[ 'tca_ttcontentimages' ] )
{
case('Disabled'):
break;
case('Bootstrap'):
$GLOBALS[ 'TCA' ][ 'tt_content' ][ 'columns' ][ 'imagecols' ][ 'config' ][ 'items' ][ '12' ][ '0' ] = 12;
$GLOBALS[ 'TCA' ][ 'tt_content' ][ 'columns' ][ 'imagecols' ][ 'config' ][ 'items' ][ '12' ][ '1' ] = 12;
break;
case('Default (recommended)'):
default:
$GLOBALS[ 'TCA' ][ 'tt_content' ][ 'columns' ][ 'imagecols' ][ 'config' ][ 'items' ][ '8' ][ '0' ] = 8;
$GLOBALS[ 'TCA' ][ 'tt_content' ][ 'columns' ][ 'imagecols' ][ 'config' ][ 'items' ][ '8' ][ '1' ] = 8;
$GLOBALS[ 'TCA' ][ 'tt_content' ][ 'columns' ][ 'imagecols' ][ 'config' ][ 'items' ][ '9' ][ '0' ] = 9;
$GLOBALS[ 'TCA' ][ 'tt_content' ][ 'columns' ][ 'imagecols' ][ 'config' ][ 'items' ][ '9' ][ '1' ] = 9;
$GLOBALS[ 'TCA' ][ 'tt_content' ][ 'columns' ][ 'imagecols' ][ 'config' ][ 'items' ][ '10' ][ '0' ] = 10;
$GLOBALS[ 'TCA' ][ 'tt_content' ][ 'columns' ][ 'imagecols' ][ 'config' ][ 'items' ][ '10' ][ '1' ] = 10;
$GLOBALS[ 'TCA' ][ 'tt_content' ][ 'columns' ][ 'imagecols' ][ 'config' ][ 'items' ][ '11' ][ '0' ] = 11;
$GLOBALS[ 'TCA' ][ 'tt_content' ][ 'columns' ][ 'imagecols' ][ 'config' ][ 'items' ][ '11' ][ '1' ] = 11;
$GLOBALS[ 'TCA' ][ 'tt_content' ][ 'columns' ][ 'imagecols' ][ 'config' ][ 'items' ][ '12' ][ '0' ] = 12;
$GLOBALS[ 'TCA' ][ 'tt_content' ][ 'columns' ][ 'imagecols' ][ 'config' ][ 'items' ][ '12' ][ '1' ] = 12;
break;
}
/* * ****************************************************************************
* improve sys_template
* **************************************************************************** */
if ( $confArr[ 'tca_systemplate' ] )
{
// #i0006, 141208, dwildt, -
// Breaking: #61785 - loadTCA function in GeneralUtility removed
//\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA( 'sys_template' );
$TCA[ 'sys_template' ][ 'columns' ][ 'include_static_file' ][ 'config' ][ 'selectedListStyle' ] = 'width:385px;';
$TCA[ 'sys_template' ][ 'columns' ][ 'include_static_file' ][ 'config' ][ 'itemListStyle' ] = 'width:385px;';
$TCA[ 'sys_template' ][ 'columns' ][ 'include_static_file' ][ 'config' ][ 'size' ] = '40';
}
/* * ****************************************************************************
* pagetree_enhanced_context_menu
* **************************************************************************** */
// #70445, 151006, dwildt, 9+
if ( TYPO3_MODE == 'BE' && $confArr[ 'pagetree_enhanced_context_menu' ] )
{
// ##i0010, dwildt, 6-: Fatal error: Class 'Netzmacher\Tsconf\Hooks\ClickMenuAction' not found in /var/www/www.7x.typo3-org.de/typo3/typo3conf/ext/tsconf/ext_tables.php on line 103
// $extPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath( $_EXTKEY );
// \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerExtDirectComponent(
// 'TYPO3.Tsconf.ClickmenuAction', '\\Netzmacher\\Tsconf\\Hooks\\ClickMenuAction'
// );
// $GLOBALS[ 'TBE_MODULES' ][ '_configuration' ][ $_EXTKEY ][ 'jsFiles' ][ 'TreeActions' ] = 'EXT:tsconf/Resources/Public/Js/TreeActions.js';
// \Netzmacher\Tsconf\Hooks\ClickMenuAction::addContextMenuItems();
}