Good idea. I looked into this and agree it would be a good addition.
The good news is you can add it today with a little editing of galleryserverpro.config. It is a two-step process: (1) Add a MIME type for the file extension to the <mimeTypes> section. (2) Add an HTML template to tell GSP how to render this file in the browser.
1. Open galleryserverpro.config in a text editor and add the following to the <mimeTypes> section:
Code:<mimeType fileExtension=".mht" browserId="default" type="message/rfc822" allowAddToGallery="true" />
2. Add the following to the <mediaObjects> section:
Code:<mediaObject
mimeType="message/rfc822">
<browsers>
<browser
id="default"
htmlOutput="<p class="gsp_textcenter">Your browser cannot display this file.</p><p class="gsp_textcenter"><a href="{MediaObjectAbsoluteUrlNoHandler}" title="Click to open {TitleNoHtml}">Click to open</a></p>" />
<browser
id="ie"
htmlOutput="<p><a href="{MediaObjectUrl}">Enlarge to fit browser window</a></p><iframe src="{MediaObjectUrl}" frameborder="0" style="width:680px;height:600px;border:1px solid #000;"></iframe>" />
</browsers>
</mediaObject>
Since only IE can render .mht files, there are two <browser> elements - the default one (id="default") that says "Your browser cannot display this file" and then displays a link. And an IE-specific one (id="ie") that renders the file in an <iframe> and also includes a link to open it in the full browser window.
You can tweak the template to suit your needs. The Admin Guide has more info on modifying HTML templates.
Good luck,
Roger Martin
Creator and Lead Developer of Gallery Server Pro