forked from kartolo/direct_mail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ext_tables.php
executable file
·161 lines (143 loc) · 8.69 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<?php
if (!defined('TYPO3_MODE')) {
die('Access denied.');
}
$extPath = TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY);
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/boundaries/', 'Direct Mail Content Boundaries');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/plaintext/', 'Direct Mail Plain text');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript/tt_news_plaintext/', 'Direct Mail News Plain text');
// Category field disabled by default in backend forms.
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
TCEFORM.tt_content.module_sys_dmail_category.disabled = 1
TCEFORM.tt_address.module_sys_dmail_category.disabled = 1
TCEFORM.fe_users.module_sys_dmail_category.disabled = 1
TCEFORM.sys_dmail_group.select_categories.disabled = 1
');
/**
* Setting up the direct mail module
*/
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('sys_dmail', 'EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_csh_sysdmail.xlf');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('sys_dmail_group', 'EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_csh_sysdmailg.xlf');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('sys_dmail_category', 'EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_csh_sysdmailcat.xlf');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_DirectMailNavFrame_DirectMail', 'EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_csh_DirectMail.xlf');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_DirectMailNavFrame_RecipientList', 'EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_csh_RecipientList.xlf');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_DirectMailNavFrame_Statistics', 'EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_csh_Statistics.xlf');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_DirectMailNavFrame_MailerEngine', 'EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_csh_MailerEngine.xlf');
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_DirectMailNavFrame_Configuration', 'EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_csh_Configuration.xlf');
//old
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('_MOD_web_DirectMailNavFrame', 'EXT:' . $_EXTKEY . '/Resources/Private/Language/locallang_csh_web_txdirectmail.xlf');
if (TYPO3_MODE == 'BE') {
// add module before 'Help'
if (!isset($TBE_MODULES['DirectMailNavFrame'])) {
$temp_TBE_MODULES = array();
foreach ($TBE_MODULES as $key => $val) {
if ($key == 'help') {
$temp_TBE_MODULES['DirectMailNavFrame'] = '';
$temp_TBE_MODULES[$key] = $val;
} else {
$temp_TBE_MODULES[$key] = $val;
}
}
$TBE_MODULES = $temp_TBE_MODULES;
}
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('DirectMailNavFrame', '', '', '',
array(
'routeTarget' => DirectMailTeam\DirectMail\Module\NavFrame::class . '::mainAction',
'access' => 'group,user',
'name' => 'DirectMailNavFrame',
'labels' => array(
'tabs_images' => array(
'tab' => 'EXT:direct_mail/Resources/Public/Images/module-directmail.svg',
),
'll_ref' => 'LLL:EXT:direct_mail/Resources/Private/Language/locallangNavFrame.xlf',
),
)
);
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('DirectMailNavFrame', 'DirectMail', 'bottom', '',
array(
'routeTarget' => DirectMailTeam\DirectMail\Module\Dmail::class . '::mainAction',
'access' => 'group,user',
'name' => 'DirectMailNavFrame_DirectMail',
'workspaces' => 'online',
'labels' => array(
'tabs_images' => array(
'tab' => 'EXT:direct_mail/Resources/Public/Images/module-directmail-directmail.svg',
),
'll_ref' => 'LLL:EXT:direct_mail/Resources/Private/Language/locallangDirectMail.xlf',
),
'navigationFrameModule' => 'DirectMailNavFrame',
'navigationFrameModuleParameters' => array('currentModule' => 'DirectMailNavFrame_DirectMail'),
)
);
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('DirectMailNavFrame', 'RecipientList', 'bottom', '',
array(
'routeTarget' => DirectMailTeam\DirectMail\Module\RecipientList::class . '::mainAction',
'access' => 'group,user',
'name' => 'DirectMailNavFrame_RecipientList',
'workspaces' => 'online',
'labels' => array(
'tabs_images' => array(
'tab' => 'EXT:direct_mail/Resources/Public/Images/module-directmail-recipient-list.svg',
),
'll_ref' => 'LLL:EXT:direct_mail/Resources/Private/Language/locallangRecipientList.xlf',
),
'navigationFrameModule' => 'DirectMailNavFrame',
'navigationFrameModuleParameters' => array('currentModule' => 'DirectMailNavFrame_RecipientList'),
)
);
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('DirectMailNavFrame', 'Statistics', 'bottom', '',
array(
'routeTarget' => DirectMailTeam\DirectMail\Module\Statistics::class . '::mainAction',
'access' => 'group,user',
'name' => 'DirectMailNavFrame_Statistics',
'workspaces' => 'online',
'labels' => array(
'tabs_images' => array(
'tab' => 'EXT:direct_mail/Resources/Public/Images/module-directmail-statistics.svg',
),
'll_ref' => 'LLL:EXT:direct_mail/Resources/Private/Language/locallangStatistics.xlf',
),
'navigationFrameModule' => 'DirectMailNavFrame',
'navigationFrameModuleParameters' => array('currentModule' => 'DirectMailNavFrame_Statistics'),
)
);
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('DirectMailNavFrame', 'MailerEngine', 'bottom', '',
array(
'routeTarget' => DirectMailTeam\DirectMail\Module\MailerEngine::class . '::mainAction',
'access' => 'group,user',
'name' => 'DirectMailNavFrame_MailerEngine',
'workspaces' => 'online',
'labels' => array(
'tabs_images' => array(
'tab' => 'EXT:direct_mail/Resources/Public/Images/module-directmail-mailer-engine.svg',
),
'll_ref' => 'LLL:EXT:direct_mail/Resources/Private/Language/locallangMailerEngine.xlf',
),
'navigationFrameModule' => 'DirectMailNavFrame',
'navigationFrameModuleParameters' => array('currentModule' => 'DirectMailNavFrame_MailerEngine'),
)
);
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addModule('DirectMailNavFrame', 'Configuration', 'bottom', '',
array(
'routeTarget' => DirectMailTeam\DirectMail\Module\Configuration::class . '::mainAction',
'access' => 'group,user',
'name' => 'DirectMailNavFrame_Configuration',
'workspaces' => 'online',
'labels' => array(
'tabs_images' => array(
'tab' => 'EXT:direct_mail/Resources/Public/Images/module-directmail-configuration.svg',
),
'll_ref' => 'LLL:EXT:direct_mail/Resources/Private/Language/locallangConfiguration.xlf',
),
'navigationFrameModule' => 'DirectMailNavFrame',
'navigationFrameModuleParameters' => array('currentModule' => 'DirectMailNavFrame_Configuration'),
)
);
}
$GLOBALS['TBE_STYLES']['spritemanager']['singleIcons']['tcarecords-pages-contains-dmail'] = TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'Resources/Public/Icons/ext_icon_dmail_folder.gif';
if (is_array($GLOBALS['TCA']['pages']['ctrl']['typeicon_classes'])) {
$GLOBALS['TCA']['pages']['ctrl']['typeicon_classes']['contains-dmail'] = 'tcarecords-pages-contains-dmail';
}
if (TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getExtensionVersion('tt_address')) <= TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger('2.3.5')) {
include_once(TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY)."Configuration/TCA/Overrides/tt_address.php");
}