[TASK] Remove TBE_STYLES mainColors from PHP
[Packages/TYPO3.CMS.git] / typo3 / sysext / t3skin / ext_tables.php
1 <?php
2 defined('TYPO3_MODE') or die();
3
4 if (TYPO3_MODE === 'BE' || TYPO3_MODE === 'FE' && isset($GLOBALS['BE_USER'])) {
5 global $TBE_STYLES;
6
7 // Register as a skin
8 $TBE_STYLES['skins'][$_EXTKEY] = array(
9 'name' => 't3skin'
10 );
11
12 // Support for other extensions to add own icons...
13 $presetSkinImgs = is_array($TBE_STYLES['skinImg']) ? $TBE_STYLES['skinImg'] : array();
14 $TBE_STYLES['skins'][$_EXTKEY]['stylesheetDirectories']['sprites'] = 'EXT:t3skin/stylesheets/sprites/';
15
16 /** Setting up backend styles and colors */
17 $TBE_STYLES['colorschemes'][0] = '-|class-main1,-|class-main2,-|class-main3,-|class-main4,-|class-main5';
18 $TBE_STYLES['colorschemes'][1] = '-|class-main11,-|class-main12,-|class-main13,-|class-main14,-|class-main15';
19 $TBE_STYLES['colorschemes'][2] = '-|class-main21,-|class-main22,-|class-main23,-|class-main24,-|class-main25';
20 $TBE_STYLES['colorschemes'][3] = '-|class-main31,-|class-main32,-|class-main33,-|class-main34,-|class-main35';
21 $TBE_STYLES['colorschemes'][4] = '-|class-main41,-|class-main42,-|class-main43,-|class-main44,-|class-main45';
22 $TBE_STYLES['colorschemes'][5] = '-|class-main51,-|class-main52,-|class-main53,-|class-main54,-|class-main55';
23 $TBE_STYLES['styleschemes'][0]['all'] = 'CLASS: formField';
24 $TBE_STYLES['styleschemes'][1]['all'] = 'CLASS: formField1';
25 $TBE_STYLES['styleschemes'][2]['all'] = 'CLASS: formField2';
26 $TBE_STYLES['styleschemes'][3]['all'] = 'CLASS: formField3';
27 $TBE_STYLES['styleschemes'][4]['all'] = 'CLASS: formField4';
28 $TBE_STYLES['styleschemes'][5]['all'] = 'CLASS: formField5';
29 $TBE_STYLES['styleschemes'][0]['check'] = 'CLASS: checkbox';
30 $TBE_STYLES['styleschemes'][1]['check'] = 'CLASS: checkbox';
31 $TBE_STYLES['styleschemes'][2]['check'] = 'CLASS: checkbox';
32 $TBE_STYLES['styleschemes'][3]['check'] = 'CLASS: checkbox';
33 $TBE_STYLES['styleschemes'][4]['check'] = 'CLASS: checkbox';
34 $TBE_STYLES['styleschemes'][5]['check'] = 'CLASS: checkbox';
35 $TBE_STYLES['styleschemes'][0]['radio'] = 'CLASS: radio';
36 $TBE_STYLES['styleschemes'][1]['radio'] = 'CLASS: radio';
37 $TBE_STYLES['styleschemes'][2]['radio'] = 'CLASS: radio';
38 $TBE_STYLES['styleschemes'][3]['radio'] = 'CLASS: radio';
39 $TBE_STYLES['styleschemes'][4]['radio'] = 'CLASS: radio';
40 $TBE_STYLES['styleschemes'][5]['radio'] = 'CLASS: radio';
41 $TBE_STYLES['styleschemes'][0]['select'] = 'CLASS: select';
42 $TBE_STYLES['styleschemes'][1]['select'] = 'CLASS: select';
43 $TBE_STYLES['styleschemes'][2]['select'] = 'CLASS: select';
44 $TBE_STYLES['styleschemes'][3]['select'] = 'CLASS: select';
45 $TBE_STYLES['styleschemes'][4]['select'] = 'CLASS: select';
46 $TBE_STYLES['styleschemes'][5]['select'] = 'CLASS: select';
47 $TBE_STYLES['borderschemes'][0] = array('', '', '', 'wrapperTable');
48 $TBE_STYLES['borderschemes'][1] = array('', '', '', 'wrapperTable1');
49 $TBE_STYLES['borderschemes'][2] = array('', '', '', 'wrapperTable2');
50 $TBE_STYLES['borderschemes'][3] = array('', '', '', 'wrapperTable3');
51 $TBE_STYLES['borderschemes'][4] = array('', '', '', 'wrapperTable4');
52 $TBE_STYLES['borderschemes'][5] = array('', '', '', 'wrapperTable5');
53
54 // Setting the relative path to the extension in temp. variable:
55 $temp_eP = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY);
56
57 // Alternative dimensions for frameset sizes:
58 // Left menu frame width
59 $TBE_STYLES['dims']['leftMenuFrameW'] = 190;
60
61 // Top frame height
62 $TBE_STYLES['dims']['topFrameH'] = 42;
63
64 // Default navigation frame width
65 $TBE_STYLES['dims']['navFrameWidth'] = 280;
66
67 // Setting up auto detection of alternative icons:
68 $TBE_STYLES['skinImgAutoCfg'] = array(
69 'absDir' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'icons/',
70 'relDir' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($_EXTKEY) . 'icons/',
71 'forceFileExtension' => 'gif',
72 // Force to look for PNG alternatives...
73 'iconSizeWidth' => 16,
74 'iconSizeHeight' => 16
75 );
76
77 // Changing icon for filemounts, needs to be done here as overwriting the original icon would also change the filelist tree's root icon
78 $TCA['sys_filemounts']['ctrl']['iconfile'] = '_icon_ftp_2.gif';
79
80 // Adding flags to sys_language
81 $TCA['sys_language']['ctrl']['typeicon_column'] = 'flag';
82 $TCA['sys_language']['ctrl']['typeicon_classes'] = array(
83 'default' => 'mimetypes-x-sys_language',
84 'mask' => 'flags-###TYPE###'
85 );
86 $flagNames = array(
87 'multiple',
88 'ad',
89 'ae',
90 'af',
91 'ag',
92 'ai',
93 'al',
94 'am',
95 'an',
96 'ao',
97 'ar',
98 'as',
99 'at',
100 'au',
101 'aw',
102 'ax',
103 'az',
104 'ba',
105 'bb',
106 'bd',
107 'be',
108 'bf',
109 'bg',
110 'bh',
111 'bi',
112 'bj',
113 'bm',
114 'bn',
115 'bo',
116 'br',
117 'bs',
118 'bt',
119 'bv',
120 'bw',
121 'by',
122 'bz',
123 'ca',
124 'catalonia',
125 'cc',
126 'cd',
127 'cf',
128 'cg',
129 'ch',
130 'ci',
131 'ck',
132 'cl',
133 'cm',
134 'cn',
135 'co',
136 'cr',
137 'cs',
138 'cu',
139 'cv',
140 'cx',
141 'cy',
142 'cz',
143 'de',
144 'dj',
145 'dk',
146 'dm',
147 'do',
148 'dz',
149 'ec',
150 'ee',
151 'eg',
152 'eh',
153 'england',
154 'er',
155 'es',
156 'et',
157 'europeanunion',
158 'fam',
159 'fi',
160 'fj',
161 'fk',
162 'fm',
163 'fo',
164 'fr',
165 'ga',
166 'gb',
167 'gd',
168 'ge',
169 'gf',
170 'gh',
171 'gi',
172 'gl',
173 'gm',
174 'gn',
175 'gp',
176 'gq',
177 'gr',
178 'gs',
179 'gt',
180 'gu',
181 'gw',
182 'gy',
183 'hk',
184 'hm',
185 'hn',
186 'hr',
187 'ht',
188 'hu',
189 'id',
190 'ie',
191 'il',
192 'in',
193 'io',
194 'iq',
195 'ir',
196 'is',
197 'it',
198 'jm',
199 'jo',
200 'jp',
201 'ke',
202 'kg',
203 'kh',
204 'ki',
205 'km',
206 'kn',
207 'kp',
208 'kr',
209 'kw',
210 'ky',
211 'kz',
212 'la',
213 'lb',
214 'lc',
215 'li',
216 'lk',
217 'lr',
218 'ls',
219 'lt',
220 'lu',
221 'lv',
222 'ly',
223 'ma',
224 'mc',
225 'md',
226 'me',
227 'mg',
228 'mh',
229 'mk',
230 'ml',
231 'mm',
232 'mn',
233 'mo',
234 'mp',
235 'mq',
236 'mr',
237 'ms',
238 'mt',
239 'mu',
240 'mv',
241 'mw',
242 'mx',
243 'my',
244 'mz',
245 'na',
246 'nc',
247 'ne',
248 'nf',
249 'ng',
250 'ni',
251 'nl',
252 'no',
253 'np',
254 'nr',
255 'nu',
256 'nz',
257 'om',
258 'pa',
259 'pe',
260 'pf',
261 'pg',
262 'ph',
263 'pk',
264 'pl',
265 'pm',
266 'pn',
267 'pr',
268 'ps',
269 'pt',
270 'pw',
271 'py',
272 'qa',
273 'qc',
274 're',
275 'ro',
276 'rs',
277 'ru',
278 'rw',
279 'sa',
280 'sb',
281 'sc',
282 'scotland',
283 'sd',
284 'se',
285 'sg',
286 'sh',
287 'si',
288 'sj',
289 'sk',
290 'sl',
291 'sm',
292 'sn',
293 'so',
294 'sr',
295 'st',
296 'sv',
297 'sy',
298 'sz',
299 'tc',
300 'td',
301 'tf',
302 'tg',
303 'th',
304 'tj',
305 'tk',
306 'tl',
307 'tm',
308 'tn',
309 'to',
310 'tr',
311 'tt',
312 'tv',
313 'tw',
314 'tz',
315 'ua',
316 'ug',
317 'um',
318 'us',
319 'uy',
320 'uz',
321 'va',
322 'vc',
323 've',
324 'vg',
325 'vi',
326 'vn',
327 'vu',
328 'wales',
329 'wf',
330 'ws',
331 'ye',
332 'yt',
333 'za',
334 'zm',
335 'zw'
336 );
337 foreach ($flagNames as $flagName) {
338 $TCA['sys_language']['columns']['flag']['config']['items'][] = array($flagName, $flagName, 'EXT:t3skin/images/flags/' . $flagName . '.png');
339 }
340
341 // Manual setting up of alternative icons. This is mainly for module icons which has a special prefix:
342 $TBE_STYLES['skinImg'] = array_merge($presetSkinImgs, array(
343 'gfx/ol/blank.gif' => array('clear.gif', 'width="18" height="16"'),
344 'MOD:web/website.gif' => array($temp_eP . 'icons/module_web.gif', 'width="24" height="24"'),
345 'MOD:web_ts/ts1.gif' => array($temp_eP . 'icons/module_web_ts.gif', 'width="24" height="24"'),
346 'MOD:web_modules/modules.gif' => array($temp_eP . 'icons/module_web_modules.gif', 'width="24" height="24"'),
347 'MOD:web_txversionM1/cm_icon.gif' => array($temp_eP . 'icons/module_web_version.gif', 'width="24" height="24"'),
348 'MOD:file/file.gif' => array($temp_eP . 'icons/module_file.gif', 'width="22" height="24"'),
349 'MOD:file_images/images.gif' => array($temp_eP . 'icons/module_file_images.gif', 'width="22" height="22"'),
350 'MOD:user/user.gif' => array($temp_eP . 'icons/module_user.gif', 'width="22" height="22"'),
351 'MOD:user_doc/document.gif' => array($temp_eP . 'icons/module_doc.gif', 'width="22" height="22"'),
352 'MOD:tools/tool.gif' => array($temp_eP . 'icons/module_tools.gif', 'width="25" height="24"'),
353 'MOD:tools_txphpmyadmin/thirdparty_db.gif' => array($temp_eP . 'icons/module_tools_phpmyadmin.gif', 'width="24" height="24"'),
354 'MOD:help/help.gif' => array($temp_eP . 'icons/module_help.gif', 'width="23" height="24"'),
355 'MOD:help_txtsconfighelpM1/moduleicon.gif' => array($temp_eP . 'icons/module_help_ts.gif', 'width="25" height="24"')
356 ));
357
358 // Logo at login screen
359 $TBE_STYLES['logo_login'] = $temp_eP . 'images/login/typo3logo-white-greyback.gif';
360
361 // extJS theme
362 $TBE_STYLES['extJS']['theme'] = $temp_eP . 'extjs/xtheme-t3skin.css';
363 $GLOBALS['TBE_STYLES']['stylesheets']['admPanel'] = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath('t3skin') . 'stylesheets/standalone/admin_panel.css';
364 $flagIcons = array();
365 foreach ($flagNames as $flagName) {
366 $flagIcons[] = 'flags-' . $flagName;
367 $flagIcons[] = 'flags-' . $flagName . '-overlay';
368 }
369 \TYPO3\CMS\Backend\Sprite\SpriteManager::addIconSprite($flagIcons);
370 unset($flagNames, $flagName, $flagIcons);
371 }