dd753916208982d2980fd4d1b8c6c6c74259c8fe
[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-2013 *
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 'kml' => 'Keyhole Markup Language',
119 'kmz' => 'Google Earth Placemark File',
120 'lyx' => 'Lyx file',
121 'mathml' => 'MathML',
122 'mbtiles' => 'MBTiles',
123 'm3u' => 'M3U Playlist',
124 'm3u8' => 'M3U8 Playlist',
125 'm4u' => 'MPEG4 Playlist',
126 'pas' => 'Pascal',
127 'pdf' => 'PDF',
128 'pgn' => 'Portable Game Notation',
129 'pls' => 'Playlist',
130 'pot' => 'PowerPoint Template',
131 'ppt' => 'PowerPoint',
132 'ps' => 'PostScript',
133 'psd' => 'Photoshop',
134 'rar' => 'WinRAR',
135 'rdf' => 'Resource Description Framework',
136 'ris' => 'RIS',
137 'rpm' => 'RedHat/Mandrake/SuSE',
138 'rtf' => 'RTF',
139 'sdc' => 'StarOffice Spreadsheet',
140 'sdd' => 'StarOffice Presentation',
141 'sdw' => 'StarOffice Writer document',
142 'sit' => 'Stuffit',
143 'sla' => 'Scribus',
144 'srt' => 'SubRip Subtitle',
145 'ssa' => 'SubStation Alpha Subtitle',
146 'sty' => 'LaTeX Style Sheet',
147 'sxc' => 'OpenOffice.org Calc',
148 'sxi' => 'OpenOffice.org Impress',
149 'sxw' => 'OpenOffice.org',
150 'tex' => 'LaTeX',
151 'tgz' => 'TGZ',
152 'torrent' => 'BitTorrent',
153 'ttf' => 'TTF Font',
154 'txt' => 'Texte',
155 'usf' => 'Universal Subtitle Format',
156 'wmf' => 'Windows Metafile',
157 'wpl' => 'Windows Media Player Playlist',
158 'xcf' => 'GIMP multi-layer',
159 'xspf' => 'XSPF',
160 'xls' => 'Excel',
161 'xlt' => 'Excel Template',
162 'xml' => 'XML',
163 'y4m' => 'YUV4MPEG2',
164 'yaml' => 'YAML',
165 'zip' => 'Zip',
166
167 // open document format
168
169 'odb' => 'OpenDocument Database',
170 'odc' => 'OpenDocument Chart',
171 'odf' => 'OpenDocument Formula',
172 'odg' => 'OpenDocument Graphics',
173 'odi' => 'OpenDocument Image',
174 'odm' => 'OpenDocument Text-master',
175 'odp' => 'OpenDocument Presentation',
176 'ods' => 'OpenDocument Spreadsheet',
177 'odt' => 'OpenDocument Text',
178 'otg' => 'OpenDocument Graphics-template',
179 'otp' => 'OpenDocument Presentation-template',
180 'ots' => 'OpenDocument Spreadsheet-template',
181 'ott' => 'OpenDocument Text-template',
182
183
184 // Open XML File Formats
185 'docm' => 'Word',
186 'docx' => 'Word',
187 'dotm' => 'Word template',
188 'dotx' => 'Word template',
189
190 'potm' => 'Powerpoint template',
191 'potx' => 'Powerpoint template',
192 'ppam' => 'Powerpoint addin',
193 'ppsm' => 'Powerpoint slideshow',
194 'ppsx' => 'Powerpoint slideshow',
195 'pptm' => 'Powerpoint',
196 'pptx' => 'Powerpoint',
197
198 'xlam' => 'Excel',
199 'xlsb' => 'Excel binary',
200 'xlsm' => 'Excel',
201 'xlsx' => 'Excel',
202 'xltm' => 'Excel template',
203 'xltx' => 'Excel template'
204 );
205
206 $tables_mime = array(
207 // Images reconnues par PHP
208 'jpg' => 'image/jpeg',
209 'png' => 'image/png',
210 'gif' => 'image/gif',
211
212 // Autres images (peuvent utiliser le tag <img>)
213 'bmp' => 'image/x-ms-bmp', // pas enregistre par IANA, variante: image/bmp
214 'tif' => 'image/tiff',
215
216 // Multimedia (peuvent utiliser le tag <embed>)
217 'aac' => 'audio/mp4a-latm',
218 'ac3' => 'audio/x-aac',
219 'aifc' => 'audio/x-aifc',
220 'aiff' => 'audio/x-aiff',
221 'amr' => 'audio/amr',
222 'ape' => 'audio/x-monkeys-audio',
223 'asf' => 'video/x-ms-asf',
224 'avi' => 'video/x-msvideo',
225 'anx' => 'application/annodex',
226 'axa' => 'audio/annodex',
227 'axv' => 'video/annodex',
228 'dv' => 'video/x-dv',
229 'f4a' => 'audio/mp4',
230 'f4b' => 'audio/mp4',
231 'f4p' => 'video/mp4',
232 'f4v' => 'video/mp4',
233 'flac' => 'audio/x-flac',
234 'flv' => 'video/x-flv',
235 'm2p' => 'video/MP2P',
236 'm2ts' => 'video/MP2T',
237 'm4a' => 'audio/mp4a-latm',
238 'm4b' => 'audio/mp4a-latm',
239 'm4p' => 'audio/mp4a-latm',
240 'm4r' => 'audio/aac',
241 'm4u' => 'video/vnd.mpegurl',
242 'm4v' => 'video/x-m4v',
243 'mid' => 'audio/midi',
244 'mka' => 'audio/mka',
245 'mkv' => 'video/mkv',
246 'mng' => 'video/x-mng',
247 'mov' => 'video/quicktime',
248 'mp3' => 'audio/mpeg',
249 'mp4' => 'application/mp4',
250 'mpc' => 'audio/x-musepack',
251 'mpg' => 'video/mpeg',
252 'mts' => 'video/MP2T',
253 'oga' => 'audio/ogg',
254 'ogg' => 'audio/ogg',
255 'ogv' => 'video/ogg',
256 'ogx' => 'application/ogg',
257 'qt' => 'video/quicktime',
258 'ra' => 'audio/x-pn-realaudio',
259 'ram' => 'audio/x-pn-realaudio',
260 'rm' => 'audio/x-pn-realaudio',
261 'spx' => 'audio/ogg',
262 'svg' => 'image/svg+xml',
263 'svgz' => 'image/svg+xml',
264 'swf' => 'application/x-shockwave-flash',
265 'ts' => 'video/MP2T',
266 'wav' => 'audio/x-wav',
267 'webm' => 'video/webm',
268 'wma' => 'audio/x-ms-wma',
269 'wmv' => 'video/x-ms-wmv',
270 'y4m' => 'video/x-raw-yuv',
271 '3gp' => 'video/3gpp',
272 '3ga' => 'audio/3ga',
273
274 // Documents varies
275 '7z' => 'application/x-7z-compressed',
276 'ai' => 'application/illustrator',
277 'abw' => 'application/abiword',
278 'asx' => 'video/x-ms-asf',
279 'bib' => 'application/x-bibtex',
280 'bin' => 'application/octet-stream', # le tout-venant
281 'blend' => 'application/x-blender',
282 'bz2' => 'application/x-bzip2',
283 'c' => 'text/x-csrc',
284 'csl' => 'application/xml',
285 'css' => 'text/css',
286 'csv' => 'text/csv',
287 'deb' => 'application/x-debian-package',
288 'doc' => 'application/msword',
289 'dot' => 'application/msword',
290 'djvu' => 'image/vnd.djvu',
291 'dvi' => 'application/x-dvi',
292 'emf' => 'image/x-emf',
293 'enl' => 'application/octet-stream',
294 'ens' => 'application/octet-stream',
295 'eps' => 'application/postscript',
296 'epub' => 'application/epub+zip', // pas enregistre par IANA
297 'gpx' => 'application/gpx+xml', // pas enregistre par IANA
298 'gz' => 'application/x-gzip',
299 'h' => 'text/x-chdr',
300 'html' => 'text/html',
301 'jar' => 'application/java-archive',
302 'kml' => 'application/vnd.google-earth.kml+xml',
303 'kmz' => 'application/vnd.google-earth.kmz',
304 'lyx' => 'application/x-lyx',
305 'm3u' => 'text/plain',
306 'm3u8' => 'text/plain',
307 'mathml' => 'application/mathml+xml',
308 'mbtiles' => 'application/x-sqlite3',
309 'pas' => 'text/x-pascal',
310 'pdf' => 'application/pdf',
311 'pgn' => 'application/x-chess-pgn',
312 'pls' => 'text/plain',
313 'ppt' => 'application/vnd.ms-powerpoint',
314 'pot' => 'application/vnd.ms-powerpoint',
315 'ps' => 'application/postscript',
316 'psd' => 'image/x-photoshop', // pas enregistre par IANA
317 'rar' => 'application/x-rar-compressed',
318 'rdf' => 'application/rdf+xml',
319 'ris' => 'application/x-research-info-systems',
320 'rpm' => 'application/x-redhat-package-manager',
321 'rtf' => 'application/rtf',
322 'sdc' => 'application/vnd.stardivision.calc',
323 'sdd' => 'application/vnd.stardivision.impress',
324 'sdw' => 'application/vnd.stardivision.writer',
325 'sit' => 'application/x-stuffit',
326 'sla' => 'application/x-scribus',
327 'srt' => 'text/plain',
328 'ssa' => 'text/plain',
329 'sxc' => 'application/vnd.sun.xml.calc',
330 'sxi' => 'application/vnd.sun.xml.impress',
331 'sxw' => 'application/vnd.sun.xml.writer',
332 'tex' => 'text/x-tex',
333 'tgz' => 'application/x-gtar',
334 'torrent' => 'application/x-bittorrent',
335 'ttf' => 'application/x-font-ttf',
336 'txt' => 'text/plain',
337 'usf' => 'application/xml',
338 'xcf' => 'application/x-xcf',
339 'xls' => 'application/vnd.ms-excel',
340 'xlt' => 'application/vnd.ms-excel',
341 'wmf' => 'image/x-emf',
342 'wpl' => 'application/vnd.ms-wpl',
343 'xspf' => 'application/xspf+xml',
344 'xml' => 'application/xml',
345 'yaml' => 'text/yaml',
346 'zip' => 'application/zip',
347
348 // Open Document format
349 'odt' => 'application/vnd.oasis.opendocument.text',
350 'ods' => 'application/vnd.oasis.opendocument.spreadsheet',
351 'odp' => 'application/vnd.oasis.opendocument.presentation',
352 'odg' => 'application/vnd.oasis.opendocument.graphics',
353 'odc' => 'application/vnd.oasis.opendocument.chart',
354 'odf' => 'application/vnd.oasis.opendocument.formula',
355 'odb' => 'application/vnd.oasis.opendocument.database',
356 'odi' => 'application/vnd.oasis.opendocument.image',
357 'odm' => 'application/vnd.oasis.opendocument.text-master',
358 'ott' => 'application/vnd.oasis.opendocument.text-template',
359 'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',
360 'otp' => 'application/vnd.oasis.opendocument.presentation-template',
361 'otg' => 'application/vnd.oasis.opendocument.graphics-template',
362
363 'cls' => 'text/x-tex',
364 'sty' => 'text/x-tex',
365
366 // Open XML File Formats
367 'docm' => 'application/vnd.ms-word.document.macroEnabled.12',
368 'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
369 'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',
370 'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
371
372 'potm' => 'application/vnd.ms-powerpoint.template.macroEnabled.12',
373 'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',
374 'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12',
375 'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',
376 'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',
377 'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',
378 'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
379
380 'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',
381 'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',
382 'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',
383 'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
384 'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12',
385 'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template'
386 );
387
388
389 $mime_alias = array (
390 'application/x-ogg' => 'application/ogg',
391 'audio/3gpp' => 'video/3gpp',
392 'audio/x-mpeg' => 'audio/mpeg',
393 'audio/x-musepack' => 'audio/musepack',
394 'audio/webm' => 'video/webm',
395 'video/flv' => 'video/x-flv',
396 'video/mp4' => 'application/mp4'
397 );
398
399 ?>