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