[SPIP] +installation version 3.0.10
[lhc/web/www.git] / www / plugins-dist / medias / base / typedoc.php
diff --git a/www/plugins-dist/medias/base/typedoc.php b/www/plugins-dist/medias/base/typedoc.php
new file mode 100644 (file)
index 0000000..089ec7a
--- /dev/null
@@ -0,0 +1,402 @@
+<?php\r
+\r
+/***************************************************************************\\r
+ *  SPIP, Systeme de publication pour l'internet                           *\r
+ *                                                                         *\r
+ *  Copyright (c) 2001-2013                                                *\r
+ *  Arnaud Martin, Antoine Pitrou, Philippe Riviere, Emmanuel Saint-James  *\r
+ *                                                                         *\r
+ *  Ce programme est un logiciel libre distribue sous licence GNU/GPL.     *\r
+ *  Pour plus de details voir le fichier COPYING.txt ou l'aide en ligne.   *\r
+\***************************************************************************/\r
+\r
+if (!defined('_ECRIRE_INC_VERSION')) return;\r
+\r
+global $tables_images, $tables_sequences, $tables_documents, $tables_mime, $mime_alias;\r
+\r
+$tables_images = array(\r
+                       // Images reconnues par PHP\r
+                       'jpg' => 'JPEG',\r
+                       'png' => 'PNG',\r
+                       'gif' => 'GIF',\r
+\r
+                       // Autres images (peuvent utiliser le tag <img>)\r
+                       'bmp' => 'BMP',\r
+                       );\r
+\r
+// Multimedia (peuvent utiliser le tag <embed>)\r
+\r
+$tables_sequences = array(\r
+                       'aac' => 'Advanced Audio Coding',\r
+                       'ac3' => 'AC-3 Compressed Audio',\r
+                       'aifc' => 'Compressed AIFF Audio',\r
+                       'aiff' => 'AIFF',\r
+                       'amr' => 'Adaptive Multi-Rate Audio',\r
+                       'anx' => 'Annodex',\r
+                       'ape' => 'Monkey\'s Audio File',\r
+                       'axa' => 'Annodex Audio',\r
+                       'axv' => 'Annodex Video',\r
+                       'asf' => 'Windows Media',\r
+                       'avi' => 'AVI',\r
+                       'dv'    => 'Digital Video',\r
+                       'f4a' => 'Audio for Adobe Flash Player',\r
+                       'f4b' => 'Audio Book for Adobe Flash Player',\r
+                       'f4p' => 'Protected Video for Adobe Flash Player',\r
+                       'f4v' => 'Video for Adobe Flash Player',\r
+                       'flac' => 'Free Lossless Audio Codec',\r
+                       'flv' => 'Flash Video',\r
+                       'm2p' => 'MPEG-PS',\r
+                       'm2ts' => 'BDAV MPEG-2 Transport Stream',\r
+                       'm4a' => 'MPEG4 Audio',\r
+                       'm4b' => 'MPEG4 Audio',\r
+                       'm4p' => 'MPEG4 Audio',\r
+                       'm4r' => 'iPhone Ringtone',\r
+                       'm4v' => 'MPEG4 Video',\r
+                       'mid' => 'Midi',\r
+                       'mng' => 'MNG',\r
+                       'mka' => 'Matroska Audio',\r
+                       'mkv' => 'Matroska Video',\r
+                       'mov' => 'QuickTime',\r
+                       'mp3' => 'MP3',\r
+                       'mp4' => 'MPEG4',\r
+                       'mpc' => 'Musepack',\r
+                       'mpg' => 'MPEG',\r
+                       'mts' => 'AVCHD MPEG-2 transport stream',\r
+                       'oga' => 'Ogg Audio',\r
+                       'ogg' => 'Ogg Vorbis',\r
+                       'ogv' => 'Ogg Video',\r
+                       'ogx' => 'Ogg Multiplex',\r
+                       'qt' => 'QuickTime',\r
+                       'ra' => 'RealAudio',\r
+                       'ram' => 'RealAudio',\r
+                       'rm' => 'RealAudio',\r
+                       'spx' => 'Ogg Speex',\r
+                       'svg' => 'Scalable Vector Graphics',\r
+                       'svgz' => 'Compressed Scalable Vector Graphic',\r
+                       'swf' => 'Flash',\r
+                       'tif' => 'TIFF',\r
+                       'ts' => 'MPEG transport stream',\r
+                       'wav' => 'WAV',\r
+                       'webm' => 'WebM',\r
+                       'wma' => 'Windows Media Audio',\r
+                       'wmv' => 'Windows Media Video',\r
+                       'y4m' => 'YUV4MPEG2',\r
+                       '3ga' => '3GP Audio File',\r
+                       '3gp' => '3rd Generation Partnership Project'\r
+               );\r
+\r
+// Documents varies\r
+$tables_documents = array(\r
+                       '7z' => '7 Zip',\r
+                       'abw' => 'Abiword',\r
+                       'ai' => 'Adobe Illustrator',\r
+                       'asx' => 'Advanced Stream Redirector',\r
+                       'bib' => 'BibTeX',\r
+                       'bz2' => 'BZip',\r
+                       'bin' => 'Binary Data',\r
+                       'blend' => 'Blender',\r
+                       'c' => 'C source',\r
+                       'cls' => 'LaTeX Class',\r
+                       'csl' => 'Citation Style Language',\r
+                       'css' => 'Cascading Style Sheet',\r
+                       'csv' => 'Comma Separated Values',\r
+                       'deb' => 'Debian',\r
+                       'doc' => 'Word',\r
+                       'dot' => 'Word Template',\r
+                       'djvu' => 'DjVu',\r
+                       'dvi' => 'LaTeX DVI',\r
+                       'emf' => 'Enhanced Metafile',\r
+                       'enl' => 'EndNote Library',\r
+                       'ens' => 'EndNote Style',\r
+                       'epub' => 'EPUB',\r
+                       'eps' => 'PostScript',\r
+                       'gpx' => 'GPS eXchange Format',\r
+                       'gz' => 'GZ',\r
+                       'h' => 'C header',\r
+                       'html' => 'HTML',\r
+                       'jar' => 'Java Archive',\r
+                       'kml' => 'Keyhole Markup Language',\r
+                       'kmz' => 'Google Earth Placemark File',\r
+                       'lyx' => 'Lyx file',\r
+                       'mathml' => 'MathML',\r
+                       'mbtiles' => 'MBTiles',\r
+                       'm3u' => 'M3U Playlist',\r
+                       'm3u8' => 'M3U8 Playlist',\r
+                       'm4u' => 'MPEG4 Playlist',\r
+                       'pas' => 'Pascal',\r
+                       'pdf' => 'PDF',\r
+                       'pgn' => 'Portable Game Notation',\r
+                       'pls' => 'Playlist',\r
+                       'pot' => 'PowerPoint Template',\r
+                       'ppt' => 'PowerPoint',\r
+                       'ps' => 'PostScript',\r
+                       'psd' => 'Photoshop',\r
+                       'rar' => 'WinRAR',\r
+                       'rdf' => 'Resource Description Framework',\r
+                       'ris' => 'RIS',\r
+                       'rpm' => 'RedHat/Mandrake/SuSE',\r
+                       'rtf' => 'RTF',\r
+                       'sdc' => 'StarOffice Spreadsheet',\r
+                       'sdd' => 'StarOffice Presentation',\r
+                       'sdw' => 'StarOffice Writer document',\r
+                       'sit' => 'Stuffit',\r
+                       'sla' => 'Scribus',\r
+                       'srt' => 'SubRip Subtitle',\r
+                       'ssa' => 'SubStation Alpha Subtitle',\r
+                       'sty' => 'LaTeX Style Sheet',\r
+                       'sxc' => 'OpenOffice.org Calc',\r
+                       'sxi' => 'OpenOffice.org Impress',\r
+                       'sxw' => 'OpenOffice.org',\r
+                       'tar' => 'Tar',\r
+                       'tex' => 'LaTeX',\r
+                       'tgz' => 'TGZ',\r
+                       'torrent' => 'BitTorrent',\r
+                       'ttf' => 'TTF Font',\r
+                       'txt' => 'Texte',\r
+                       'usf' => 'Universal Subtitle Format',\r
+                       'wmf' => 'Windows Metafile',\r
+                       'wpl' => 'Windows Media Player Playlist',\r
+                       'xcf' => 'GIMP multi-layer',\r
+                       'xspf' => 'XSPF',\r
+                       'xls' => 'Excel',\r
+                       'xlt' => 'Excel Template',\r
+                       'xml' => 'XML',\r
+                       'y4m' => 'YUV4MPEG2',\r
+                       'yaml' => 'YAML',\r
+                       'zip' => 'Zip',\r
+\r
+                       // open document format\r
+                       \r
+                       'odb' => 'OpenDocument Database',\r
+                       'odc' => 'OpenDocument Chart',\r
+                       'odf' => 'OpenDocument Formula',\r
+                       'odg' => 'OpenDocument Graphics',\r
+                       'odi' => 'OpenDocument Image',\r
+                       'odm' => 'OpenDocument Text-master',\r
+                       'odp' => 'OpenDocument Presentation',\r
+                       'ods' => 'OpenDocument Spreadsheet',\r
+                       'odt' => 'OpenDocument Text',\r
+                       'otg' => 'OpenDocument Graphics-template',\r
+                       'otp' => 'OpenDocument Presentation-template',\r
+                       'ots' => 'OpenDocument Spreadsheet-template',\r
+                       'ott' => 'OpenDocument Text-template',\r
+\r
+\r
+                       // Open XML File Formats\r
+                       'docm' => 'Word',\r
+                       'docx' => 'Word',\r
+                       'dotm' => 'Word template',\r
+                       'dotx' => 'Word template',\r
+\r
+                       'potm' => 'Powerpoint template',\r
+                       'potx' => 'Powerpoint template',\r
+                       'ppam' => 'Powerpoint addin',\r
+                       'ppsm' => 'Powerpoint slideshow',\r
+                       'ppsx' => 'Powerpoint slideshow',\r
+                       'pptm' => 'Powerpoint',\r
+                       'pptx' => 'Powerpoint',\r
+\r
+                       'xlam' => 'Excel',\r
+                       'xlsb' => 'Excel binary',\r
+                       'xlsm' => 'Excel',\r
+                       'xlsx' => 'Excel',\r
+                       'xltm' => 'Excel template',\r
+                       'xltx' => 'Excel template'\r
+               );\r
+\r
+$tables_mime = array(\r
+               // Images reconnues par PHP\r
+               'jpg' => 'image/jpeg',\r
+               'png' => 'image/png',\r
+               'gif' => 'image/gif',\r
+\r
+               // Autres images (peuvent utiliser le tag <img>)\r
+               'bmp' => 'image/x-ms-bmp', // pas enregistre par IANA, variante: image/bmp\r
+               'tif' => 'image/tiff',\r
+               \r
+               // Multimedia (peuvent utiliser le tag <embed>)\r
+               'aac' => 'audio/mp4a-latm',\r
+               'ac3' => 'audio/x-aac',\r
+               'aifc' => 'audio/x-aifc',\r
+               'aiff' => 'audio/x-aiff',\r
+               'amr' => 'audio/amr',\r
+               'ape' => 'audio/x-monkeys-audio',\r
+               'asf' => 'video/x-ms-asf',\r
+               'avi' => 'video/x-msvideo',\r
+               'anx' => 'application/annodex',\r
+               'axa' => 'audio/annodex',\r
+               'axv' => 'video/annodex',\r
+               'dv' => 'video/x-dv',\r
+               'f4a' => 'audio/mp4',\r
+               'f4b' => 'audio/mp4',\r
+               'f4p' => 'video/mp4',\r
+               'f4v' => 'video/mp4',\r
+               'flac' => 'audio/x-flac',\r
+               'flv' => 'video/x-flv',\r
+               'm2p' => 'video/MP2P',\r
+               'm2ts' => 'video/MP2T',\r
+               'm4a' => 'audio/mp4a-latm',\r
+               'm4b' => 'audio/mp4a-latm',\r
+               'm4p' => 'audio/mp4a-latm',\r
+               'm4r' => 'audio/aac',\r
+               'm4u' => 'video/vnd.mpegurl',\r
+               'm4v' => 'video/x-m4v',\r
+               'mid' => 'audio/midi',\r
+               'mka' => 'audio/mka',\r
+               'mkv' => 'video/mkv',\r
+               'mng' => 'video/x-mng',\r
+               'mov' => 'video/quicktime',\r
+               'mp3' => 'audio/mpeg',\r
+               'mp4' => 'application/mp4',\r
+               'mpc' => 'audio/x-musepack',\r
+               'mpg' => 'video/mpeg',\r
+               'mts' => 'video/MP2T',\r
+               'oga' => 'audio/ogg',\r
+               'ogg' => 'audio/ogg',\r
+               'ogv' => 'video/ogg',\r
+               'ogx' => 'application/ogg',\r
+               'qt' => 'video/quicktime',\r
+               'ra' => 'audio/x-pn-realaudio',\r
+               'ram' => 'audio/x-pn-realaudio',\r
+               'rm' => 'audio/x-pn-realaudio',\r
+               'spx' => 'audio/ogg',\r
+               'svg' => 'image/svg+xml',\r
+               'svgz' => 'image/svg+xml',\r
+               'swf' => 'application/x-shockwave-flash',\r
+               'ts' => 'video/MP2T',\r
+               'wav' => 'audio/x-wav',\r
+               'webm' => 'video/webm',\r
+               'wma' => 'audio/x-ms-wma',\r
+               'wmv' => 'video/x-ms-wmv',\r
+               'y4m' => 'video/x-raw-yuv',\r
+               '3gp' => 'video/3gpp',\r
+               '3ga' => 'audio/3ga',\r
+\r
+               // Documents varies\r
+               '7z' => 'application/x-7z-compressed',\r
+               'ai' => 'application/illustrator',\r
+               'abw' => 'application/abiword',\r
+               'asx' => 'video/x-ms-asf',\r
+               'bib' => 'application/x-bibtex',\r
+               'bin' => 'application/octet-stream', # le tout-venant\r
+               'blend' => 'application/x-blender',\r
+               'bz2' => 'application/x-bzip2',\r
+               'c'  => 'text/x-csrc',\r
+               'csl' => 'application/xml',\r
+               'css' => 'text/css',\r
+               'csv' => 'text/csv',\r
+               'deb' => 'application/x-debian-package',\r
+               'doc' => 'application/msword',\r
+               'dot' => 'application/msword',\r
+               'djvu' => 'image/vnd.djvu',\r
+               'dvi' => 'application/x-dvi',\r
+               'emf' => 'image/x-emf',\r
+               'enl' => 'application/octet-stream',\r
+               'ens' => 'application/octet-stream',\r
+               'eps' => 'application/postscript',\r
+               'epub' => 'application/epub+zip', // pas enregistre par IANA\r
+               'gpx' => 'application/gpx+xml', // pas enregistre par IANA\r
+               'gz' => 'application/x-gzip',\r
+               'h'  => 'text/x-chdr',\r
+               'html' => 'text/html',\r
+               'jar' => 'application/java-archive',\r
+               'kml' => 'application/vnd.google-earth.kml+xml',\r
+               'kmz' => 'application/vnd.google-earth.kmz',\r
+               'lyx' => 'application/x-lyx',\r
+               'm3u' => 'text/plain',\r
+               'm3u8' => 'text/plain',\r
+               'mathml' => 'application/mathml+xml',\r
+               'mbtiles' => 'application/x-sqlite3',\r
+               'pas' => 'text/x-pascal',\r
+               'pdf' => 'application/pdf',\r
+               'pgn' => 'application/x-chess-pgn',\r
+               'pls' => 'text/plain',\r
+               'ppt' => 'application/vnd.ms-powerpoint',\r
+               'pot' => 'application/vnd.ms-powerpoint',\r
+               'ps' => 'application/postscript',\r
+               'psd' => 'image/x-photoshop', // pas enregistre par IANA\r
+               'rar' => 'application/x-rar-compressed',\r
+               'rdf' => 'application/rdf+xml',\r
+               'ris' => 'application/x-research-info-systems',\r
+               'rpm' => 'application/x-redhat-package-manager',\r
+               'rtf' => 'application/rtf',\r
+               'sdc' => 'application/vnd.stardivision.calc',\r
+               'sdd' => 'application/vnd.stardivision.impress',\r
+               'sdw' => 'application/vnd.stardivision.writer',\r
+               'sit' => 'application/x-stuffit',\r
+               'sla' => 'application/x-scribus',\r
+               'srt' => 'text/plain',\r
+               'ssa' => 'text/plain',\r
+               'sxc' => 'application/vnd.sun.xml.calc',\r
+               'sxi' => 'application/vnd.sun.xml.impress',\r
+               'sxw' => 'application/vnd.sun.xml.writer',\r
+               'tar' => 'application/x-tar',\r
+               'tex' => 'text/x-tex',\r
+               'tgz' => 'application/x-gtar',\r
+               'torrent' => 'application/x-bittorrent',\r
+               'ttf' => 'application/x-font-ttf',\r
+               'txt' => 'text/plain',\r
+               'usf' => 'application/xml',\r
+               'xcf' => 'application/x-xcf',\r
+               'xls' => 'application/vnd.ms-excel',\r
+               'xlt' => 'application/vnd.ms-excel',\r
+               'wmf' => 'image/x-emf',\r
+               'wpl' => 'application/vnd.ms-wpl',\r
+               'xspf' => 'application/xspf+xml',\r
+               'xml' => 'application/xml',\r
+               'yaml' => 'text/yaml',\r
+               'zip' => 'application/zip',\r
+\r
+               // Open Document format\r
+               'odt' => 'application/vnd.oasis.opendocument.text',\r
+               'ods' => 'application/vnd.oasis.opendocument.spreadsheet',\r
+               'odp' => 'application/vnd.oasis.opendocument.presentation',\r
+               'odg' => 'application/vnd.oasis.opendocument.graphics',\r
+               'odc' => 'application/vnd.oasis.opendocument.chart',\r
+               'odf' => 'application/vnd.oasis.opendocument.formula',\r
+               'odb' => 'application/vnd.oasis.opendocument.database',\r
+               'odi' => 'application/vnd.oasis.opendocument.image',\r
+               'odm' => 'application/vnd.oasis.opendocument.text-master',\r
+               'ott' => 'application/vnd.oasis.opendocument.text-template',\r
+               'ots' => 'application/vnd.oasis.opendocument.spreadsheet-template',\r
+               'otp' => 'application/vnd.oasis.opendocument.presentation-template',\r
+               'otg' => 'application/vnd.oasis.opendocument.graphics-template',\r
+\r
+               'cls' => 'text/x-tex',\r
+               'sty' => 'text/x-tex',\r
+\r
+               // Open XML File Formats\r
+               'docm' => 'application/vnd.ms-word.document.macroEnabled.12',\r
+               'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\r
+               'dotm' => 'application/vnd.ms-word.template.macroEnabled.12',\r
+               'dotx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.template',\r
+\r
+               'potm' => 'application/vnd.ms-powerpoint.template.macroEnabled.12',\r
+               'potx' => 'application/vnd.openxmlformats-officedocument.presentationml.template',\r
+               'ppam' => 'application/vnd.ms-powerpoint.addin.macroEnabled.12',\r
+               'ppsm' => 'application/vnd.ms-powerpoint.slideshow.macroEnabled.12',\r
+               'ppsx' => 'application/vnd.openxmlformats-officedocument.presentationml.slideshow',\r
+               'pptm' => 'application/vnd.ms-powerpoint.presentation.macroEnabled.12',\r
+               'pptx' => 'application/vnd.openxmlformats-officedocument.presentationml.presentation',\r
+\r
+               'xlam' => 'application/vnd.ms-excel.addin.macroEnabled.12',\r
+               'xlsb' => 'application/vnd.ms-excel.sheet.binary.macroEnabled.12',\r
+               'xlsm' => 'application/vnd.ms-excel.sheet.macroEnabled.12',\r
+               'xlsx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\r
+               'xltm' => 'application/vnd.ms-excel.template.macroEnabled.12',\r
+               'xltx' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.template'\r
+       );\r
+\r
+\r
+       $mime_alias = array (\r
+               'application/x-ogg' => 'application/ogg',\r
+               'audio/3gpp' => 'video/3gpp',\r
+               'audio/x-mpeg' => 'audio/mpeg',\r
+               'audio/x-musepack' => 'audio/musepack',\r
+               'audio/webm' => 'video/webm',\r
+               'video/flv' => 'video/x-flv',\r
+               'video/mp4' => 'application/mp4',\r
+               'image/jpg' => 'image/jpeg'\r
+       );\r
+\r
+?>\r