[SPIP] ~maj v3.0.14-->v3.0.17
[ptitvelo/web/www.git] / www / plugins-dist / medias / base / typedoc.php
1 <?php
2
3 /***************************************************************************\
4 * SPIP, Systeme de publication pour l'internet *
5 * *
6 * Copyright (c) 2001-2014 *
7 * Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James *
8 * *
9 * Ce programme est un logiciel libre distribue sous licence GNU/GPL. *
10 * Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne. *
11 \***************************************************************************/
12
13 if (!defined('_ECRIRE_INC_VERSION')) return;
14
15 global $tables_images, $tables_sequences, $tables_documents, $tables_mime, $mime_alias;
16
17 $tables_images = array(
18 // Images reconnues par PHP
19 'jpg' => 'JPEG',
20 'png' => 'PNG',
21 'gif' => 'GIF',
22
23 // Autres images (peuvent utiliser le tag <img>)
24 'bmp' => 'BMP',
25 );
26
27 // Multimedia (peuvent utiliser le tag <embed>)
28
29 $tables_sequences = array(
30 'aac' => 'Advanced Audio Coding',
31 'ac3' => 'AC-3 Compressed Audio',
32 'aifc' => 'Compressed AIFF Audio',
33 'aiff' => 'AIFF',
34 'amr' => 'Adaptive Multi-Rate Audio',
35 'anx' => 'Annodex',
36 'ape' => 'Monkey\'s Audio File',
37 'axa' => 'Annodex Audio',
38 'axv' => 'Annodex Video',
39 'asf' => 'Windows Media',
40 'avi' => 'AVI',
41 'dv' => 'Digital Video',
42 'f4a' => 'Audio for Adobe Flash Player',
43 'f4b' => 'Audio Book for Adobe Flash Player',
44 'f4p' => 'Protected Video for Adobe Flash Player',
45 'f4v' => 'Video for Adobe Flash Player',
46 'flac' => 'Free Lossless Audio Codec',
47 'flv' => 'Flash Video',
48 'm2p' => 'MPEG-PS',
49 'm2ts' => 'BDAV MPEG-2 Transport Stream',
50 'm4a' => 'MPEG4 Audio',
51 'm4b' => 'MPEG4 Audio',
52 'm4p' => 'MPEG4 Audio',
53 'm4r' => 'iPhone Ringtone',
54 'm4v' => 'MPEG4 Video',
55 'mid' => 'Midi',
56 'mng' => 'MNG',
57 'mka' => 'Matroska Audio',
58 'mkv' => 'Matroska Video',
59 'mov' => 'QuickTime',
60 'mp3' => 'MP3',
61 'mp4' => 'MPEG4',
62 'mpc' => 'Musepack',
63 'mpg' => 'MPEG',
64 'mts' => 'AVCHD MPEG-2 transport stream',
65 'oga' => 'Ogg Audio',
66 'ogg' => 'Ogg Vorbis',
67 'ogv' => 'Ogg Video',
68 'ogx' => 'Ogg Multiplex',
69 'qt' => 'QuickTime',
70 'ra' => 'RealAudio',
71 'ram' => 'RealAudio',
72 'rm' => 'RealAudio',
73 'spx' => 'Ogg Speex',
74 'svg' => 'Scalable Vector Graphics',
75 'svgz' => 'Compressed Scalable Vector Graphic',
76 'swf' => 'Flash',
77 'tif' => 'TIFF',
78 'ts' => 'MPEG transport stream',
79 'wav' => 'WAV',
80 'webm' => 'WebM',
81 'wma' => 'Windows Media Audio',
82 'wmv' => 'Windows Media Video',
83 'y4m' => 'YUV4MPEG2',
84 '3ga' => '3GP Audio File',
85 '3gp' => '3rd Generation Partnership Project'
86 );
87
88 // Documents varies
89 $tables_documents = array(
90 '7z' => '7 Zip',
91 'abw' => 'Abiword',
92 'ai' => 'Adobe Illustrator',
93 'asx' => 'Advanced Stream Redirector',
94 'bib' => 'BibTeX',
95 'bz2' => 'BZip',
96 'bin' => 'Binary Data',
97 'blend' => 'Blender',
98 'c' => 'C source',
99 'cls' => 'LaTeX Class',
100 'csl' => 'Citation Style Language',
101 'css' => 'Cascading Style Sheet',
102 'csv' => 'Comma Separated Values',
103 'deb' => 'Debian',
104 'doc' => 'Word',
105 'dot' => 'Word Template',
106 'djvu' => 'DjVu',
107 'dvi' => 'LaTeX DVI',
108 'emf' => 'Enhanced Metafile',
109 'enl' => 'EndNote Library',
110 'ens' => 'EndNote Style',
111 'epub' => 'EPUB',
112 'eps' => 'PostScript',
113 'gpx' => 'GPS eXchange Format',
114 'gz' => 'GZ',
115 'h' => 'C header',
116 'html' => 'HTML',
117 'jar' => 'Java Archive',
118 'json' => 'JSON',
119 'kml' => 'Keyhole Markup Language',
120 'kmz' => 'Google Earth Placemark File',
121 'lyx' => 'Lyx file',
122 'mathml' => 'MathML',
123 'mbtiles' => 'MBTiles',
124 'm3u' => 'M3U Playlist',
125 'm3u8' => 'M3U8 Playlist',
126 'm4u' => 'MPEG4 Playlist',
127 'pas' => 'Pascal',
128 'pdf' => 'PDF',
129 'pgn' => 'Portable Game Notation',
130 'pls' => 'Playlist',
131 'pot' => 'PowerPoint Template',
132 'ppt' => 'PowerPoint',
133 'ps' => 'PostScript',
134 'psd' => 'Photoshop',
135 'rar' => 'WinRAR',
136 'rdf' => 'Resource Description Framework',
137 'ris' => 'RIS',
138 'rpm' => 'RedHat/Mandrake/SuSE',
139 'rtf' => 'RTF',
140 'sdc' => 'StarOffice Spreadsheet',
141 'sdd' => 'StarOffice Presentation',
142 'sdw' => 'StarOffice Writer document',
143 'sit' => 'Stuffit',
144 'sla' => 'Scribus',
145 'srt' => 'SubRip Subtitle',
146 'ssa' => 'SubStation Alpha Subtitle',
147 'sty' => 'LaTeX Style Sheet',
148 'sxc' => 'OpenOffice.org Calc',
149 'sxi' => 'OpenOffice.org Impress',
150 'sxw' => 'OpenOffice.org',
151 'tar' => 'Tar',
152 'tex' => 'LaTeX',
153 'tgz' => 'TGZ',
154 'torrent' => 'BitTorrent',
155 'ttf' => 'TTF Font',
156 'txt' => 'Texte',
157 'usf' => 'Universal Subtitle Format',
158 'wmf' => 'Windows Metafile',
159 'wpl' => 'Windows Media Player Playlist',
160 'xcf' => 'GIMP multi-layer',
161 'xspf' => 'XSPF',
162 'xls' => 'Excel',
163 'xlt' => 'Excel Template',
164 'xml' => 'XML',
165 'y4m' => 'YUV4MPEG2',
166 'yaml' => 'YAML',
167 'zip' => 'Zip',
168
169 // open document format
170
171 'odb' => 'OpenDocument Database',
172 'odc' => 'OpenDocument Chart',
173 'odf' => 'OpenDocument Formula',
174 'odg' => 'OpenDocument Graphics',
175 'odi' => 'OpenDocument Image',
176 'odm' => 'OpenDocument Text-master',
177 'odp' => 'OpenDocument Presentation',
178 'ods' => 'OpenDocument Spreadsheet',
179 'odt' => 'OpenDocument Text',
180 'otg' => 'OpenDocument Graphics-template',
181 'otp' => 'OpenDocument Presentation-template',
182 'ots' => 'OpenDocument Spreadsheet-template',
183 'ott' => 'OpenDocument Text-template',
184
185
186 // Open XML File Formats
187 'docm' => 'Word',
188 'docx' => 'Word',
189 'dotm' => 'Word template',
190 'dotx' => 'Word template',
191
192 'potm' => 'Powerpoint template',
193 'potx' => 'Powerpoint template',
194 'ppam' => 'Powerpoint addin',
195 'ppsm' => 'Powerpoint slideshow',
196 'ppsx' => 'Powerpoint slideshow',
197 'pptm' => 'Powerpoint',
198 'pptx' => 'Powerpoint',
199
200 'xlam' => 'Excel',
201 'xlsb' => 'Excel binary',
202 'xlsm' => 'Excel',
203 'xlsx' => 'Excel',
204 'xltm' => 'Excel template',
205 'xltx' => 'Excel template'
206 );
207
208 $tables_mime = array(
209 // Images reconnues par PHP
210 'jpg' => 'image/jpeg',
211 'png' => 'image/png',
212 'gif' => 'image/gif',
213
214 // Autres images (peuvent utiliser le tag <img>)
215 'bmp' => 'image/x-ms-bmp', // pas enregistre par IANA, variante: image/bmp
216 'tif' => 'image/tiff',
217
218 // Multimedia (peuvent utiliser le tag <embed>)
219 'aac' => 'audio/mp4a-latm',
220 'ac3' => 'audio/x-aac',
221 'aifc' => 'audio/x-aifc',
222 'aiff' => 'audio/x-aiff',
223 'amr' => 'audio/amr',
224 'ape' => 'audio/x-monkeys-audio',
225 'asf' => 'video/x-ms-asf',
226 'avi' => 'video/x-msvideo',
227 'anx' => 'application/annodex',
228 'axa' => 'audio/annodex',
229 'axv' => 'video/annodex',
230 'dv' => 'video/x-dv',
231 'f4a' => 'audio/mp4',
232 'f4b' => 'audio/mp4',
233 'f4p' => 'video/mp4',
234 'f4v' => 'video/mp4',
235 'flac' => 'audio/x-flac',
236 'flv' => 'video/x-flv',
237 'm2p' => 'video/MP2P',
238 'm2ts' => 'video/MP2T',
239 'm4a' => 'audio/mp4a-latm',
240 'm4b' => 'audio/mp4a-latm',
241 'm4p' => 'audio/mp4a-latm',
242 'm4r' => 'audio/aac',
243 'm4u' => 'video/vnd.mpegurl',
244 'm4v' => 'video/x-m4v',
245 'mid' => 'audio/midi',
246 'mka' => 'audio/mka',
247 'mkv' => 'video/mkv',
248 'mng' => 'video/x-mng',
249 'mov' => 'video/quicktime',
250 'mp3' => 'audio/mpeg',
251 'mp4' => 'application/mp4',
252 'mpc' => 'audio/x-musepack',
253 'mpg' => 'video/mpeg',
254 'mts' => 'video/MP2T',
255 'oga' => 'audio/ogg',
256 'ogg' => 'audio/ogg',
257 'ogv' => 'video/ogg',
258 'ogx' => 'application/ogg',
259 'qt' => 'video/quicktime',
260 'ra' => 'audio/x-pn-realaudio',
261 'ram' => 'audio/x-pn-realaudio',
262 'rm' => 'audio/x-pn-realaudio',
263 'spx' => 'audio/ogg',
264 'svg' => 'image/svg+xml',
265 'svgz' => 'image/svg+xml',
266 'swf' => 'application/x-shockwave-flash',
267 'ts' => 'video/MP2T',
268 'wav' => 'audio/x-wav',
269 'webm' => 'video/webm',
270 'wma' => 'audio/x-ms-wma',
271 'wmv' => 'video/x-ms-wmv',
272 'y4m' => 'video/x-raw-yuv',
273 '3gp' => 'video/3gpp',
274 '3ga' => 'audio/3ga',
275
276 // Documents varies
277 '7z' => 'application/x-7z-compressed',
278 'ai' => 'application/illustrator',
279 'abw' => 'application/abiword',
280 'asx' => 'video/x-ms-asf',
281 'bib' => 'application/x-bibtex',
282 'bin' => 'application/octet-stream', # le tout-venant
283 'blend' => 'application/x-blender',
284 'bz2' => 'application/x-bzip2',
285 'c' => 'text/x-csrc',
286 'csl' => 'application/xml',
287 'css' => 'text/css',
288 'csv' => 'text/csv',
289 'deb' => 'application/x-debian-package',
290 'doc' => 'application/msword',
291 'dot' => 'application/msword',
292 'djvu' => 'image/vnd.djvu',
293 'dvi' => 'application/x-dvi',
294 'emf' => 'image/x-emf',
295 'enl' => 'application/octet-stream',
296 'ens' => 'application/octet-stream',
297 'eps' => 'application/postscript',
298 'epub' => 'application/epub+zip', // pas enregistre par IANA
299 'gpx' => 'application/gpx+xml', // pas enregistre par IANA
300 'gz' => 'application/x-gzip',
301 'h' => 'text/x-chdr',
302 'html' => 'text/html',
303 'jar' => 'application/java-archive',
304 'json' => 'application/json',
305 'kml' => 'application/vnd.google-earth.kml+xml',
306 'kmz' => 'application/vnd.google-earth.kmz',
307 'lyx' => 'application/x-lyx',
308 'm3u' => 'text/plain',
309 'm3u8' => 'text/plain',
310 'mathml' => 'application/mathml+xml',
311 'mbtiles' => 'application/x-sqlite3',
312 'pas' => 'text/x-pascal',
313 'pdf' => 'application/pdf',
314 'pgn' => 'application/x-chess-pgn',
315 'pls' => 'text/plain',
316 'ppt' => 'application/vnd.ms-powerpoint',
317 'pot' => 'application/vnd.ms-powerpoint',
318 'ps' => 'application/postscript',
319 'psd' => 'image/x-photoshop', // pas enregistre par IANA
320 'rar' => 'application/x-rar-compressed',
321 'rdf' => 'application/rdf+xml',
322 'ris' => 'application/x-research-info-systems',
323 'rpm' => 'application/x-redhat-package-manager',
324 'rtf' => 'application/rtf',
325 'sdc' => 'application/vnd.stardivision.calc',
326 'sdd' => 'application/vnd.stardivision.impress',
327 'sdw' => 'application/vnd.stardivision.writer',
328 'sit' => 'application/x-stuffit',
329 'sla' => 'application/x-scribus',
330 'srt' => 'text/plain',
331 'ssa' => 'text/plain',
332 'sxc' => 'application/vnd.sun.xml.calc',
333 'sxi' => 'application/vnd.sun.xml.impress',
334 'sxw' => 'application/vnd.sun.xml.writer',
335 'tar' => 'application/x-tar',
336 'tex' => 'text/x-tex',
337 'tgz' => 'application/x-gtar',
338 'torrent' => 'application/x-bittorrent',
339 'ttf' => 'application/x-font-ttf',
340 'txt' => 'text/plain',
341 'usf' => 'application/xml',
342 'xcf' => 'application/x-xcf',
343 'xls' => 'application/vnd.ms-excel',
344 'xlt' => 'application/vnd.ms-excel',
345 'wmf' => 'image/x-emf',
346 'wpl' => 'application/vnd.ms-wpl',
347 'xspf' => 'application/xspf+xml',
348 'xml' => 'application/xml',
349 'yaml' => 'text/yaml',
350 'zip' => 'application/zip',
351
352 // Open Document format
353 'odt' => 'application/vnd.oasis.opendocument.text',
354 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
355 'odp' => 'application/vnd.oasis.opendocument.presentation',
356 'odg' => 'application/vnd.oasis.opendocument.graphics',
357 'odc' => 'application/vnd.oasis.opendocument.chart',
358 'odf' => 'application/vnd.oasis.opendocument.formula',
359 'odb' => 'application/vnd.oasis.opendocument.database',
360 'odi' => 'application/vnd.oasis.opendocument.image',
361 'odm' => 'application/vnd.oasis.opendocument.text-master',
362 'ott' => 'application/vnd.oasis.opendocument.text-template',
363 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
364 'otp' => 'application/vnd.oasis.opendocument.presentation-template',
365 'otg' => 'application/vnd.oasis.opendocument.graphics-template',
366
367 'cls' => 'text/x-tex',
368 'sty' => 'text/x-tex',
369
370 // Open XML File Formats
371 'docm' => 'application/vnd.ms-word.document.macroEnabled.12',
372 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
373 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
374 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
375
376 'potm' => 'application/vnd.ms-powerpoint.template.macroEnabled.12',
377 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
378 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12',
379 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',
380 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
381 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
382 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
383
384 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',
385 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
386 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
387 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
388 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12',
389 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template'
390 );
391
392
393 $mime_alias = array (
394 'application/x-ogg' => 'application/ogg',
395 'audio/3gpp' => 'video/3gpp',
396 'audio/x-mpeg' => 'audio/mpeg',
397 'audio/x-musepack' => 'audio/musepack',
398 'audio/webm' => 'video/webm',
399 'video/flv' => 'video/x-flv',
400 'video/mp4' => 'application/mp4',
401 'image/jpg' => 'image/jpeg'
402 );
403
404 ?>