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