[chora] mime types

Sebastien Goasguen sebgoa@ecn.purdue.edu
Tue Oct 22 16:54:24 2002


for the records I solved my problem.

in /chora/config/
edit  mime_drivers.php and add your mime type ('matlab' in my case)

    $mime_drivers_map['chora']['registered'] = array('text', 'matlab');

Then  define it as: (every matlab file as the .m extension)

$mime_drivers['chora']['matlab']['handles'] = array(
        'x-extension/m');
$mime_drivers['chora']['matlab']['icons'] = array(
        'default' => 'matlab.gif' );

Where matlab.gif is in /chora/graphics/mime

Now you need to set the viewer for that mime type in:

/chora/lib/MIME/Viewer

you can copy text.php to matlab.php and edit it: Chora_MIME_Viewer_matlab

That works great .

Seb.

Sebastien Goasguen wrote:

> Hi,
>
> How can I set an icon for a specific file extension and still view the
> file as plain text.
> I have managed to set the icon correclty but then the files are not
> viewable and a click on "view" triggers a download.
>
> Any suugestions with mime_drivers.php and mime_mapping.php in /horde ?
>
> Sebastien
>
> --
> Dr. Sebastien GOASGUEN
> Visiting Assistant Professor
> Phone: (765) 496-3518
> http://karr.ecn.purdue.edu/~sebgoa
>
> --
> Chora mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: chora-unsubscribe@lists.horde.org

--
Dr. Sebastien GOASGUEN