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