<?php
/**
 * $Horde: horde/config/mime_drivers.php.dist,v 1.97.6.14 2009/11/24 19:53:30 slusarz Exp $
 *
 * Decide which output drivers you want to activate for all Horde
 * applications. Individual Horde applications can override these settings
 * in their config/mime_drivers.php files.
 *
 * The available drivers are:
 * --------------------------
 * audio          Audio files
 * css            CSS Styles
 * deb            Debian packages
 * enriched       Enriched text format
 * enscript       GNU enscript
 * html           HTML data
 * images         Image files
 * msword         Microsoft Word files via wvHtml
 * msexcel        Microsoft Excel files via xlhtml
 * mspowerpoint   Microsoft Powerpoint files via ppthtml
 * ooo            OpenOffice.org/StarOffice Documents
 * pdf            Portable Document Format (PDF) files
 * php            The internal PHP4 syntax highlighting engine
 * plain          Return text, with links made clickable and other HTML
 *                filtered out
 * rar            RAR archives
 * report         Report messages (RFC 3452)
 * rfc822         Digested messages (RFC 2046 [5.2.1])
 * richtext       Richtext text format (RFC 1341 [7.1.3])
 * rpm            RPM packages
 * rtf            RTF documents via unrtf
 * security       Secure multiparts (RFC 1847)
 * simple         Output text without modification
 * smil           SMIL documents
 * srchighlite    Source Highlight
 * tgz            Tarballs, including gzipped ones
 * tnef           MS-TNEF attachments
 * vcard          vCards
 * webcpp         Web C Plus Plus
 * wordperfect    WordPerfect documents via wpd2html
 * zip            Zip files
 */
$mime_drivers_map['horde']['registered'] = array(
    'audio',
    'css'
//UNCOMMENTIFDEB , 'deb'
   , 'enriched'
//UNCOMMENTIFES , 'enscript'
   , 'html', 'images'
//UNCOMMENTIFWV , 'msword'
//UNCOMMENTIFXL , 'msexcel', 'mspowerpoint'
   , 'ooo', 'pdf', 'php', 'plain', 'rar', 'report',
    'rfc822', 'richtext'
//UNCOMMENTIFRPM , 'rpm'
   , 'security', 'simple', 'smil'
//UNCOMMENTIFSRCHIGH , 'srchighlite'
   , 'tgz', 'tnef', 'vcard'
//UNCOMMENTIFWCPP , 'webcpp'
   , 'zip'
);

/**
 * If you want to specifically override any MIME type to be handled by
 * a specific driver, then enter it here.  Normally, this is safe to
 * leave, but it's useful when multiple drivers handle the same MIME
 * type, and you want to specify exactly which one should handle it.
 */
$mime_drivers_map['horde']['overrides'] = array();


/**
 * Driver specific settings. Here, you have to configure each driver
 * which you chose to activate above. Default settings have been
 * filled in for them, and if you haven't activated it, then just
 * leave it as it is - it won't get loaded.
 *
 * The 'handles' setting below shouldn't be changed in most
 * circumstances. It registers a set of MIME type that the driver can
 * handle. The 'x-extension' MIME type is a special one to Horde that
 * maps a file extension to a MIME type. It's useful when you know
 * that all files ending in '.c' are C files, for example. You can set
 * the MIME subtype to '*' to match all possible subtypes
 * (i.e. 'image/*').
 *
 * The 'icons' entry is for the driver to register various icons for
 * the MIME types it handles. The array consists of a 'default' icon
 * for that driver, and can also include specific MIME-types which can
 * have their own icons. You can set the MIME subtype to '*' to match
 * all possible subtypes (i.e. 'image/*').
 */

/**
 * Default driver settings
 */
$mime_drivers['horde']['default']['icons'] = array(
    'default'                       => 'text.png',
    'message/*'                     => 'mail.png',
    'unknown/*'                     => 'binary.png',
    'video/*'                       => 'video.png',
    'application/pgp-signature'     => 'encryption.png',
    'application/x-pkcs7-signature' => 'encryption.png',
    'application/octet-stream'      => 'binary.png'
);


/**
 * Default text driver settings
 */
$mime_drivers['horde']['simple'] = array(
    'inline' => false,
    'handles' => array(
        'text/*'
    ),
    'icons' => array(
        'default' => 'text.png'
    )
);


/**
 * Plain text driver settings
 */
$mime_drivers['horde']['plain'] = array(
    'inline' => true,
    'handles' => array(
        'text/plain'
    ),
    'icons' => array(
        'default' => 'text.png'
    )
);


/**
 * Default audio driver settings
 */
$mime_drivers['horde']['audio'] = array(
    'inline' => false,
    'handles' => array(
        'audio/*'
    ),
    'icons' => array(
        'default' => 'audio.png'
    )
);


/**
 * Default smil driver settings
 */
$mime_drivers['horde']['smil'] = array(
    'inline' => true,
    'handles' => array(
        'application/smil'
    ),
    'icons' => array(
        'default' => 'video.png'
    )
);


/**
 * PHP driver settings
 */
$mime_drivers['horde']['php'] = array(
    'inline' => true,
    'handles' => array(
        'application/x-php', 'x-extension/phps', 'x-extension/php3s',
        'application/x-httpd-php', 'application/x-httpd-php3',
        'application/x-httpd-phps'
    ),
    'icons' => array(
        'default' => 'php.png'
    )
);


/**
 * CSS driver settings
 */
$mime_drivers['horde']['css'] = array(
    'inline' => true,
    'handles' => array(
        'text/css', 'x-extension/css'
    ),
    'icons' => array(
        'default' => 'html.png'
    )
);


/**
 * HTML text driver settings
 */
$mime_drivers['horde']['html'] = array(
    // NOTE: Inline HTML viewing is DISABLED by default.
    'inline' => false,
    'handles' => array(
        'text/html'
    ),
    'icons' => array(
        'default' => 'html.png'
    ),
    // Check for phishing exploits?
    'phishing_check' => true
);


/**
 * Enriched text driver settings
 */
$mime_drivers['horde']['enriched'] = array(
    'inline' => true,
    'handles' => array(
        'text/enriched'
    ),
    'icons' => array(
        'default' => 'text.png'
    )
);


/**
 * Richtext text driver settings
 */
$mime_drivers['horde']['richtext'] = array(
    'inline' => true,
    'handles' => array(
        'text/richtext'
    ),
    'icons' => array(
        'default' => 'text.png'
    )
);


/**
 * Web C Plus Plus driver settings
 * http://webcpp.sourceforge.net/
 */
//UNCOMMENTIFWCPP$mime_drivers['horde']['webcpp'] = array(
//UNCOMMENTIFWCPP    'location' => '/usr/local/bin/webcpp',
//UNCOMMENTIFWCPP    'inline' => true,
//UNCOMMENTIFWCPP    'handles' => array(
//UNCOMMENTIFWCPP    'text/xml', 'text/sgml', 'application/xml',
//UNCOMMENTIFWCPP    'application/x-sh', 'application/x-javascript', 'application/x-tcl',
//UNCOMMENTIFWCPP    'x-extension/asm', 'application/x-asp', 'x-extension/bas',
//UNCOMMENTIFWCPP    'x-extension/cs', 'text/x-csrc', 'x-extension/rc',
//UNCOMMENTIFWCPP    'text/x-c++src', 'text/x-c++src', 'text/x-c++src',
//UNCOMMENTIFWCPP    'text/x-chdr', 'x-extension/bat', 'text/x-fortran',
//UNCOMMENTIFWCPP    'x-extension/f77', 'x-extension/f90', 'x-extension/for',
//UNCOMMENTIFWCPP    'x-extension/ftn', 'text/x-java', 'application/x-javascript',
//UNCOMMENTIFWCPP    'text/sgml', 'text/xml', 'text/x-pascal',
//UNCOMMENTIFWCPP    'application/x-cgi', 'application/x-perl', 'application/x-python',
//UNCOMMENTIFWCPP    'text/x-sql', 'text/x-tcl',
//UNCOMMENTIFWCPP    'application/x-shellscript', 'x-extension/vhd', 'x-extension/vhdl'
//UNCOMMENTIFWCPP    ),
//UNCOMMENTIFWCPP    'icons' => array(
//UNCOMMENTIFWCPP    'default'                  => 'text.png',
//UNCOMMENTIFWCPP    'text/xml'                 => 'xml.png',
//UNCOMMENTIFWCPP    'text/x-csrc'              => 'source-c.png',
//UNCOMMENTIFWCPP    'text/x-chdr'              => 'source-h.png',
//UNCOMMENTIFWCPP    'text/x-java'              => 'source-java.png',
//UNCOMMENTIFWCPP    'application/x-javascript' => 'script-js.png'
//UNCOMMENTIFWCPP    )
//UNCOMMENTIFWCPP);


/**
 * Source-Highlight driver settings
 * http://www.gnu.org/software/src-highlite/
 */
//UNCOMMENTIFSRCHIGH$mime_drivers['horde']['srchighlite'] = array(
//UNCOMMENTIFSRCHIGH    'location' => '/usr/local/source-highlight',
//UNCOMMENTIFSRCHIGH    'inline' => true,
//UNCOMMENTIFSRCHIGH    'handles' => array(
//UNCOMMENTIFSRCHIGH        'text/x-csrc', 'text/x-c++src', 'text/x-java', 'application/x-perl',
//UNCOMMENTIFSRCHIGH        'application/x-python', 'text/x-c++src', 'text/cpp'
//UNCOMMENTIFSRCHIGH    ),
//UNCOMMENTIFSRCHIGH    'icons' => array(
//UNCOMMENTIFSRCHIGH        'default'       => 'text.png',
//UNCOMMENTIFSRCHIGH        'text/x-csrc'   => 'source-c.png',
//UNCOMMENTIFSRCHIGH        'text/x-c++src' => 'source-c.png',
//UNCOMMENTIFSRCHIGH        'text/cpp'      => 'source-c.png',
//UNCOMMENTIFSRCHIGH        'text/x-java'   => 'source-java.png'
//UNCOMMENTIFSRCHIGH    )
//UNCOMMENTIFSRCHIGH);


/**
 * GNU Enscript driver settings
 */
//UNCOMMENTIFES$mime_drivers['horde']['enscript'] = array(
//UNCOMMENTIFES    'location' => '/usr/local/enscript',
//UNCOMMENTIFES    'inline' => true,
//UNCOMMENTIFES    'handles' => array(
//UNCOMMENTIFES        'application/x-cgi', 'application/x-shellscript',
//UNCOMMENTIFES        'application/x-javascript', 'application/x-perl', 'application/xml',
//UNCOMMENTIFES        'text/xml', 'text/diff', 'text/x-diff', 'text/x-patch', 'text/x-csrc',
//UNCOMMENTIFES        'x-extension/cs', 'text/x-java', 'text/x-chdr', 'text/x-c++src',
//UNCOMMENTIFES        'text/x-c++hdr', 'x-extension/vhd', 'x-extension/vhdl', 'text/x-sql',
//UNCOMMENTIFES        'x-extension/vb', 'x-extension/vba', 'text/x-emacs-lisp', 'text/x-tex'
//UNCOMMENTIFES    ),
//UNCOMMENTIFES    'icons' => array(
//UNCOMMENTIFES        'default'                  => 'text.png',
//UNCOMMENTIFES        'text/xml'                 => 'xml.png',
//UNCOMMENTIFES        'application/xml'          => 'xml.png',
//UNCOMMENTIFES        'text/x-csrc'              => 'source-c.png',
//UNCOMMENTIFES        'text/x-chdr'              => 'source-h.png',
//UNCOMMENTIFES        'text/x-java'              => 'source-java.png',
//UNCOMMENTIFES        'application/x-javascript' => 'script-js.png'
//UNCOMMENTIFES    )
//UNCOMMENTIFES);


/**
 * Tar driver settings
 * To access gzipped files, the zlib library must have been built into PHP
 * (with the --with-zlib option).
 */
$mime_drivers['horde']['tgz'] = array(
    'inline' => true,
    'handles' => array(
        'application/x-compressed-tar', 'application/x-tar',
        'application/x-tgz', 'application/x-gzip', 'application/x-gtar',
        'application/gzip', 'application/x-gzip-compressed'
    ),
    'icons' => array(
        'default' => 'compressed.png'
    )
);


/**
 * Zip file driver settings
 */
$mime_drivers['horde']['zip'] = array(
    'inline' => true,
    'handles' => array(
        'application/zip', 'application/x-compressed',
        'application/x-zip-compressed'
    ),
    'icons' => array(
        'default' => 'compressed.png'
    )
);


/**
 * RAR archive driver settings
 */
$mime_drivers['horde']['rar'] = array(
    'inline' => true,
    'handles' => array(
        'application/x-rar', 'application/x-rar-compressed'
    ),
    'icons' => array(
        'default' => 'compressed.png'
    )
);


/**
 * MS Word driver settings
 * This driver requires wvWare to be installed.
 * wvWare homepage: http://wvware.sourceforge.net/
 *
 * The 'location' entry should point to the 'wvHtml' program, NOT the
 * 'wvWare' program.
 *
 * Embedded images in Word documents need extra configuration. See 
 * http://wiki.horde.org/GraphicswvHtml 
 */
//UNCOMMENTIFWV$mime_drivers['horde']['msword'] = array(
//UNCOMMENTIFWV    'location' => '/usr/local/wvHtml',
//UNCOMMENTIFWV    'inline' => false,
//UNCOMMENTIFWV    'handles' => array(
//UNCOMMENTIFWV        'application/vnd.ms-word', 'application/msword'
//UNCOMMENTIFWV    ),
//UNCOMMENTIFWV    'icons' => array(
//UNCOMMENTIFWV        'default' => 'msword.png'
//UNCOMMENTIFWV    )
//UNCOMMENTIFWV);


/**
 * MS Excel driver settings
 * This driver requires xlhtml to be installed.
 * xlhtml homepage: http://chicago.sourceforge.net/xlhtml/
 */
//UNCOMMENTIFXL$mime_drivers['horde']['msexcel'] = array(
//UNCOMMENTIFXL    'location' => '/usr/local/bin/xlhtml',
//UNCOMMENTIFXL    'inline' => false,
//UNCOMMENTIFXL    'handles' => array(
//UNCOMMENTIFXL        'application/vnd.ms-excel', 'application/msexcel',
//UNCOMMENTIFXL        'application/x-msexcel'
//UNCOMMENTIFXL    ),
//UNCOMMENTIFXL    'icons' => array(
//UNCOMMENTIFXL        'default' => 'msexcel.png'
//UNCOMMENTIFXL    )
//UNCOMMENTIFXL);


/**
 * MS Powerpoint driver settings
 * This driver requires ppthtml, included with xlhtml, to be installed.
 * xlhtml homepage: http://chicago.sourceforge.net/xlhtml/
 */
//UNCOMMENTIFXL$mime_drivers['horde']['mspowerpoint'] = array(
//UNCOMMENTIFXL    'location' => '/usr/local/bin/ppthtml',
//UNCOMMENTIFXL    'inline' => false,
//UNCOMMENTIFXL    'handles' => array(
//UNCOMMENTIFXL        'application/vnd.ms-powerpoint', 'application/mspowerpoint'
//UNCOMMENTIFXL    ),
//UNCOMMENTIFXL    'icons' => array(
//UNCOMMENTIFXL        'default' => 'mspowerpoint.png'
//UNCOMMENTIFXL    )
//UNCOMMENTIFXL);


/**
 * vCard driver settings
 */
$mime_drivers['horde']['vcard'] = array(
    'handles' => array(
        'text/vcard', 'text/x-vcard', 'text/directory'
    ),
    'icons' => array(
        'default' => 'vcard.png'
    )
);


/**
 * RPM driver settings
 */
//UNCOMMENTIFRPM$mime_drivers['horde']['rpm'] = array(
//UNCOMMENTIFRPM    'location' => '/usr/local/bin/rpm',
//UNCOMMENTIFRPM    'inline' => false,
//UNCOMMENTIFRPM    'handles' => array(
//UNCOMMENTIFRPM        'application/x-rpm'
//UNCOMMENTIFRPM    ),
//UNCOMMENTIFRPM    'icons' => array(
//UNCOMMENTIFRPM        'default' => 'rpm.png'
//UNCOMMENTIFRPM    )
//UNCOMMENTIFRPM);


/**
 * Debian package driver settings
 */
//UNCOMMENTIFDEB$mime_drivers['horde']['deb'] = array(
//UNCOMMENTIFDEB    'location' => '%%LOCALHOST%%/bin/dpkg',
//UNCOMMENTIFDEB    'inline' => false,
//UNCOMMENTIFDEB    'handles' => array(
//UNCOMMENTIFDEB        'application/x-deb', 'application/x-debian-package'
//UNCOMMENTIFDEB    ),
//UNCOMMENTIFDEB    'icons' => array(
//UNCOMMENTIFDEB        'default' => 'deb.png'
//UNCOMMENTIFDEB    )
//UNCOMMENTIFDEB);


/**
 * Secure multiparts (RFC 1847)
 */
$mime_drivers['horde']['security'] = array(
    'inline' => true,
    'handles' => array(
        'multipart/encrypted', 'multipart/signed'
    ),
    'icons' => array(
        'default' => 'encryption.png'
    )
);


/**
 * Image settings
 */
$mime_drivers['horde']['images'] = array(
    'inline' => false,
    'handles' => array(
        'image/*'
    ),
    'icons' => array(
        'default' => 'image.png'
    )
);


/**
 * MS-TNEF Attachment (application/ms-tnef) settings
 */
$mime_drivers['horde']['tnef'] = array(
    'inline' => false,
    'handles' => array(
        'application/ms-tnef'
    ),
    'icons' => array(
        'default' => 'text.png'
    )
);


/**
 * Digest message (RFC 2046 [5.2.1]) settings
 */
$mime_drivers['horde']['rfc822'] = array(
    'inline' => false,
    'handles' => array(
        'message/rfc822', 'x-extension/eml'
    ),
    'icons' => array(
        'default' => 'mail.png'
    )
);


/**
 * Report messages (RFC 3452)
 */
$mime_drivers['horde']['report'] = array(
    'inline' => true,
    'handles' => array(
        'multipart/report'
    ),
    'icons' => array(
        'default' => 'mail.png'
    )
);


/**
 * OpenOffice.org/StarOffice settings
 */
$mime_drivers['horde']['ooo'] = array(
    'inline' => false,
    'handles' => array(
        'application/vnd.sun.xml.calc',
        'application/vnd.sun.xml.calc.template',
        'application/vnd.sun.xml.draw',
        'application/vnd.sun.xml.draw.template',
        'application/vnd.sun.xml.impress',
        'application/vnd.sun.xml.impress.template',
        'application/vnd.sun.xml.math',
        'application/vnd.sun.xml.writer',
        'application/vnd.sun.xml.writer.global',
        'application/vnd.sun.xml.writer.template',
        'application/vnd.stardivision.calc',
        'application/vnd.stardivision.draw',
        'application/vnd.stardivision.impress',
        'application/vnd.stardivision.math',
        'application/vnd.stardivision.writer'
    ),
    'icons' => array(
        'default'                                  => 'ooo_calc.png',
        'application/vnd.sun.xml.calc'             => 'ooo_calc.png',
        'application/vnd.stardivision.calc'        => 'ooo_calc.png',
        'application/vnd.sun.xml.calc.template'    => 'ooo_calc.png',
        'application/vnd.sun.xml.draw'             => 'ooo_draw.png',
        'application/vnd.stardivision.draw'        => 'ooo_draw.png',
        'application/vnd.sun.xml.draw.template'    => 'ooo_draw.png',
        'application/vnd.sun.xml.impress'          => 'ooo_impress.png',
        'application/vnd.stardivision.impress'     => 'ooo_impress.png',
        'application/vnd.sun.xml.impress.template' => 'ooo_impress.png',
        'application/vnd.sun.xml.math'             => 'ooo_math.png',
        'application/vnd.stardivision.math'        => 'ooo_math.png',
        'application/vnd.sun.xml.writer'           => 'ooo_writer.png',
        'application/vnd.stardivision.writer'      => 'ooo_writer.png',
        'application/vnd.sun.xml.writer.global'    => 'ooo_writer.png',
        'application/vnd.sun.xml.writer.template'  => 'ooo_writer.png'
    )
);


/**
 * Portable Document Format (PDF) files
 * YOU SHOULD NOT NORMALLY ALTER THIS SETTING.
 */
$mime_drivers['horde']['pdf'] = array(
    'inline' => false,
    'handles' => array(
        'application/pdf'
    ),
    'icons' => array(
        'default' => 'pdf.png'
    )
);


/**
 * RTF driver settings
 * This driver requires UnRTF to be installed.
 * UnRTF homepage: http://www.gnu.org/software/unrtf/unrtf.html
 */
$mime_drivers['horde']['rtf'] = array(
    'location' => '/usr/bin/unrtf',
    'inline' => false,
    'handles' => array(
        'text/rtf', 'application/rtf'
    ),
    'icons' => array(
        'default' => 'text.png'
    )
);


/**
 * WordPerfect driver settings
 * This driver requires wpd2html to be installed.
 * libwpd homepage: http://libwpd.sourceforge.net/
 */
$mime_drivers['horde']['wordperfect'] = array(
    'location' => '/usr/bin/wpd2html',
    'inline' => false,
    'handles' => array(
        'application/vnd.wordperfect', 'application/wordperf',
        'application/wordperfect', 'application/wpd', 'application/x-wpwin'
    ),
    'icons' => array(
        'default' => 'wordperfect.png'
    )
);
