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