File: mime_drivers.php.dist

package info (click to toggle)
horde3 3.1.3-4etch7
  • links: PTS
  • area: main
  • in suites: etch
  • size: 22,876 kB
  • ctags: 18,071
  • sloc: php: 75,151; xml: 2,979; sql: 1,069; makefile: 79; sh: 64
file content (452 lines) | stat: -rw-r--r-- 15,699 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
<?php
/**
 * $Horde: horde/config/mime_drivers.php.dist,v 1.97.6.9 2006/04/06 21:32:14 jan 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:
 * --------------------------
 * 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
 * security       Secure multiparts (RFC 1847)
 * simple         Output text without modification
 * srchighlite    Source Highlight
 * tgz            Tarballs, including gzipped ones
 * tnef           MS-TNEF attachments
 * vcard          vCards
 * webcpp         Web C Plus Plus
 * zip            Zip files
 */
$mime_drivers_map['horde']['registered'] = array(
    'css', 'enriched', 'html', 'images', 'ooo', 'pdf', 'php', 'plain', 'rar',
    'report', 'rfc822', 'richtext', 'security', 'simple', 'tgz', 'tnef',
    'vcard', 'zip',
    // The following mime drivers require external applications to be
    // installed.
    // 'deb', 'enscript', 'msword', 'msexcel', 'mspowerpoint', 'rpm',
    // 'srchighlite', 'webcpp'
);


/**
 * 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',
    'audio/*'                       => 'audio.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']['inline'] = true;
$mime_drivers['horde']['simple']['handles'] = array(
    'text/*');
$mime_drivers['horde']['simple']['icons'] = array(
    'default' => 'text.png');


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


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


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


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


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


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


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

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

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


/**
 * 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']['inline'] = true;
$mime_drivers['horde']['tgz']['handles'] = array(
    'application/x-compressed-tar',
    'application/x-tar',
    'application/x-tgz',
    'application/x-gzip',
    'application/x-gtar',
    'application/gzip',
    'application/x-gzip-compressed');
$mime_drivers['horde']['tgz']['icons'] = array(
    'default' => 'compressed.png');


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


/**
 * RAR archive driver settings
 */
$mime_drivers['horde']['rar']['inline'] = true;
$mime_drivers['horde']['rar']['handles'] = array(
    'application/x-rar',
    'application/x-rar-compressed');
$mime_drivers['horde']['rar']['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.
 */
$mime_drivers['horde']['msword']['location'] = '/usr/bin/wvHtml';
$mime_drivers['horde']['msword']['inline'] = false;
$mime_drivers['horde']['msword']['handles'] = array(
    'application/vnd.ms-word',
    'application/msword',
);
$mime_drivers['horde']['msword']['icons'] = array(
    'default' => 'msword.png',
);


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


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


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


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


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


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


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


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


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


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


/**
 * OpenOffice.org/StarOffice settings
 */
$mime_drivers['horde']['ooo']['inline'] = false;
$mime_drivers['horde']['ooo']['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');
$mime_drivers['horde']['ooo']['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']['inline'] = false;
$mime_drivers['horde']['pdf']['handles'] = array(
    'application/pdf');
$mime_drivers['horde']['pdf']['icons'] = array(
    'default' => 'pdf.png');