[imp] mime attachments don't open

Colin Kelly ckelly@yahoo-inc.com
Mon, 04 Feb 2002 11:39:34 -0800


I had similar problems with image attachments being viewable. I fixed it 
this way:

In the imp/config/mime_mapping.php, I changed the "imp" "registered" map 
setting to:

$mime_drivers_map['imp']['registered'] = array('text', 'html', 
'image');   // Added 'image' to the list.

Then, in the same file, I copied the HTML driver settings section to an 
image driver settings section, changing things as appropriate:

/* Image driver settings  */
$mime_drivers['imp']['image']['inline'] = true;
$mime_drivers['imp']['image']['icons'] = array(
          'default' => 'image.gif' );
$mime_drivers['imp']['image']['handles'] = array(
         'image/gif', 'image/jpeg', 'image/png', 'image/tiff');

I ended up copying the horde/graphics/mime images to 
horde/imp/graphics/mime (specifically the image icon, but other icons 
should be copied as needed for what you are doing).

The last change was to create a MIME image handler in imp/lib/MIME/Viewer/. 
The file should have the same name as the element added to the first list 
above (in my case, the element was 'image', so I created 'image.php'). For 
this file, I copied the html.php file from the same directory and removed 
all of the html stripping code, changing the 'html' referenced to 'image' 
references as needed. The resulting code is:

class IMP_MIME_Viewer_image extends MIME_Viewer {
     function render(&$mime)
     {
         $data = $this->mime_part->getContents();
         return $data;
     }
     function getType() {
         $mime_type = $this->mime_part->getType();
         return $mime_type;
     }
}

The outcome is that image attachments get the image icon next to them and, 
when clicked, open a new browser window to view them. The appropriate MIME 
content type is sent, and the browser will handle it accordingly.

If I were to do the same for other attachment types, I would probably 
create a similar setup for each different icon I wanted to show next to the 
attachment (i.e. a separate setup for each MS application, if I wanted each 
kind to have its own icon, and/or a generic application handler that deal 
with other types for which you don't have or want a specific icon).

Regards,
         Colin


At 09:58 AM 2/1/2002, Terry Davis wrote:
>well, I am using linux but my clients are using windows.  I just want it 
>to open excel if they click on the link to the excel file.  The action for 
>the "save" icon is fine however.  Sorry, but is the problem in the browser 
>or the application?  haha or the user?  :)
>
>
>nlin@newton.berkeley.edu wrote:
>
>>Did you want it to open using a unix reader, which converts excel to html 
>>first, or to have windows (if you're using that) to open it?
>>I had a similar problem w/ word documents and it went away after I 
>>installed wvHtml.  For excel, it's another program.  So now, if you click 
>>on the document icon, it'll convert it to html, and if you click on the 
>>little disk icon, it'll try to open it w/ ms word or prompt you to save 
>>it, depending on how you configured your browser.
>>nancy
>>Quoting Terry Davis <tdavis@birddog.com>:
>>
>>>Do any of you really smart PHP people have an idea on this one?
>>>I further tested this on mozilla and got same results.
>>>
>>>Thank you!
>>>
>>>Terry Davis wrote:
>>>
>>>
>>>>Hello,
>>>>
>>>>I am having trouble opening mime attachments.  For example, if I
>>>receive an
>>>>excel file, I should be able to click on the link and have it open up
>>>excel and
>>>>be done with it.  Rather, it opens up another browser window and that's
>>>it.
>>>
>>>>The only thing that works is clicking on the "save" icon and then going
>>>to
>>>>open.  I am testing this on Internet Explorer 6.  I have xls defined in
>>>the
>>>>mime_mapping.  Is there something I am missing?
>>>>
>>>>THank you!
>>>>
>>>>
>>>
>>>-- Terry Davis
>>>Systems Administrator
>>>BirdDog Solutions, Inc.
>>>(402) 829-6059
>>>www.birddog.com
>>>
>>>
>>>-- IMP mailing list: http://horde.org/imp/
>>>Archive: http://marc.theaimsgroup.com/?l=imp&r=1&w=2
>>>Frequently Asked Questions: http://horde.org/faq/
>>>To unsubscribe, mail: imp-unsubscribe@lists.horde.org
>>>
>>
>
>
>--
>Terry Davis
>Systems Administrator
>BirdDog Solutions, Inc.
>(402) 829-6059
>www.birddog.com
>
>
>--
>IMP mailing list: http://horde.org/imp/
>Archive: http://marc.theaimsgroup.com/?l=imp&r=1&w=2
>Frequently Asked Questions: http://horde.org/faq/
>To unsubscribe, mail: imp-unsubscribe@lists.horde.org
>

-------------------------------------------------------------------
Colin Kelly
Technical Yahoo!
ckelly@yahoo-inc.com
(408) 349-7589                          



>From marcus@riboflavin.net Date: Mon,  4 Feb 2002 14:07:34 -0600
Return-Path: <marcus@riboflavin.net>
Mailing-List: contact imp-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list imp@lists.horde.org
Received: (qmail 49378 invoked from network); 4 Feb 2002 20:08:16 -0000
Received: from dsl.75.79.networkiowa.com (HELO www.riboflavin.net) (209.234.75.79)
  by clark.horde.org with SMTP; 4 Feb 2002 20:08:16 -0000
Received: from localhost (dsl.75.91.networkiowa.com [209.234.75.91])
	by www.riboflavin.net (8.11.1/8.11.1) with ESMTP id g14KAq184523
	for <imp@lists.horde.org>; Mon, 4 Feb 2002 14:10:52 -0600 (CST)
	(envelope-from marcus@riboflavin.net)
Received: from 209.234.75.79 ( [209.234.75.79])
	as user marcus@imap.riboflavin.net by horde.riboflavin.net with HTTP;
	Mon,  4 Feb 2002 14:07:34 -0600
Message-ID: <1012853254.3c5eea06e000e@horde.riboflavin.net>
Date: Mon,  4 Feb 2002 14:07:34 -0600
From: "Marcus I. Ryan" <marcus@riboflavin.net>
To: imp@lists.horde.org
References: <1012617512.3c5b51280ef25@horde.riboflavin.net> <1012707455.3c5cb07f265a8@marina.horde.org>
In-Reply-To: <1012707455.3c5cb07f265a8@marina.horde.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Originating-IP: 209.234.75.79
Subject: Re: [imp] Select checks still off, $folder still in list...ideas?

Chuck - right on both accounts.  Thanks!

-- 
Marcus I. Ryan, marcus@riboflavin.net
-----------------------------------------------------------------------
 "Love is a snowmobile racing across the tundra and then suddenly it
 flips over, pinning you underneath.  At night, the ice weasels come."
                 -- Matt Groening
-----------------------------------------------------------------------





>From chuck@horde.org Date: Mon,  4 Feb 2002 15:43:34 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact imp-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list imp@lists.horde.org
Received: (qmail 51216 invoked from network); 4 Feb 2002 20:44:11 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.196.127)
  by clark.horde.org with SMTP; 4 Feb 2002 20:44:11 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id 59DF639CB; Mon,  4 Feb 2002 15:43:34 -0500 (EST)
Received: from 192.168.0.123 ( [192.168.0.123])
	as user chuck@localhost by marina.horde.org with HTTP;
	Mon,  4 Feb 2002 15:43:34 -0500
Message-ID: <1012855414.3c5ef276303e0@marina.horde.org>
Date: Mon,  4 Feb 2002 15:43:34 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: imp@lists.horde.org
References: <Pine.LNX.4.43.0202011259580.16959-100000@centaur.ccs.yorku.ca>
In-Reply-To: <Pine.LNX.4.43.0202011259580.16959-100000@centaur.ccs.yorku.ca>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [imp] Spell checking now finding errors

Quoting Ramon Kagan <rkagan@yorku.ca>:

> I've got ispell installed and have setup the spell checker for compose in
> $HORDE/imp/conf.php with
> 
> $conf['utils']['spellchecker'] = 'ispell';
> 
> but when I run the spell checker I don't get any errors, it just doen't
> find any spelling mistakes.

Make sure that the dictionary is correct in horde/config/lang.php.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in the
arms of silence. All we ever have is here, now." - Ursula K. Le Guin


>From nlin@newton.berkeley.edu Date: Mon,  4 Feb 2002 12:53:34 -0800
Return-Path: <nlin@newton.berkeley.edu>
Mailing-List: contact imp-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list imp@lists.horde.org
Received: (qmail 52254 invoked from network); 4 Feb 2002 20:53:35 -0000
Received: from webmail.decf.berkeley.edu (128.32.142.69)
  by clark.horde.org with SMTP; 4 Feb 2002 20:53:35 -0000
Received: (from apache@localhost)
	by webmail.decf.berkeley.edu (8.11.6/8.11.6) id g14KrZt01393
	for imp@lists.horde.org; Mon, 4 Feb 2002 12:53:35 -0800
Received: from okepler.me.berkeley.edu ( [okepler.me.berkeley.edu])
	as user nlin@maxwell.berkeley.edu by webmail.decf.berkeley.edu with HTTP;
	Mon,  4 Feb 2002 12:53:34 -0800
Message-ID: <1012856014.3c5ef4cee5f39@webmail.decf.berkeley.edu>
Date: Mon,  4 Feb 2002 12:53:34 -0800
From: nlin@newton.berkeley.edu
To: imp@lists.horde.org
References: <1012599947.3c5b0c8b96c44@webmail.decf.berkeley.edu> <1012696106.3c5c842a132f8@marina.horde.org>
In-Reply-To: <1012696106.3c5c842a132f8@marina.horde.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
X-Originating-IP: 128.32.142.3
Subject: Re: [imp]  save drafts doesn't work if no Drafts folder.

?? YOu mean the cvs mailing list?  I do.  

Sorry.  I didn't realize that code changes could actually affect values in 
the database.  

I would move back to the RELENG_3 version of IMP.  But it doesn't support 
nag yet right?

nancy

Quoting Chuck Hagenbuch <chuck@horde.org>:

> Quoting nlin@newton.berkeley.edu:
> 
> >  I have the latest horde & imp HEAD cvs. 
> > 
> >  My mail directory on the server is ~/mail/.  When I try to save a
> draft, my
> >  draft is saved to ~/Drafts instead of ~/mail/Drafts. 
> 
> How preferences are saved has changed; the full folder path is now
> included for 
> folders. So you need to resave your preferences for folders.
> 
> You need to keep up with the CVS commits list if you are going to use
> HEAD.
> 
> -chuck
> 
> --
> Charles Hagenbuch, <chuck@horde.org>
> "What was and what may be, lie, like children whose faces we cannot see,
> in the
> arms of silence. All we ever have is here, now." - Ursula K. Le Guin
> 
> -- 
> IMP mailing list: http://horde.org/imp/
> Archive: http://marc.theaimsgroup.com/?l=imp&r=1&w=2
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: imp-unsubscribe@lists.horde.org
> 




>From chuck@horde.org Date: Mon,  4 Feb 2002 16:13:32 -0500
Return-Path: <chuck@horde.org>
Mailing-List: contact imp-help@lists.horde.org; run by ezmlm
Delivered-To: mailing list imp@lists.horde.org
Received: (qmail 53507 invoked from network); 4 Feb 2002 21:14:12 -0000
Received: from h00104bc60b3c.ne.mediaone.net (HELO marina.horde.org) (24.91.196.127)
  by clark.horde.org with SMTP; 4 Feb 2002 21:14:12 -0000
Received: by marina.horde.org (Postfix, from userid 33)
	id C2E4539C5; Mon,  4 Feb 2002 16:13:32 -0500 (EST)
Received: from 192.168.0.123 ( [192.168.0.123])
	as user chuck@localhost by marina.horde.org with HTTP;
	Mon,  4 Feb 2002 16:13:32 -0500
Message-ID: <1012857212.3c5ef97c9986c@marina.horde.org>
Date: Mon,  4 Feb 2002 16:13:32 -0500
From: Chuck Hagenbuch <chuck@horde.org>
To: imp@lists.horde.org
References: <1012828610.3c5e89c2bc3bb@imp3.khbo.be>
In-Reply-To: <1012828610.3c5e89c2bc3bb@imp3.khbo.be>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Internet Messaging Program (IMP) 4.0-cvs
Subject: Re: [imp] wrong message with shared folders

Quoting Philip Steeman <philip.steeman@kh.khbo.be>:

> With the Option "Use IMAP folder subscribtion" ON
>  - In the "open folder" listbox, you can see #shared/test         = OK
>  - in the folderview, you can see #shared/test                    = OK
>  - when you open de folder #shared/test, you can see the messages = OK
>  - when you select a message -> an error occcurred
>      "There was an error viewing the requested message"           = NOT OK

This is probably a different question which was already fixed.

> With the Option "Use IMAP folder subscription" OFF
>  - in the "open folder" listbox, you CAN'T see #shared/test       = NOK
>  - in the folderview, you can see only the map #shared            = NOK
>  - you can't go to the messages in #shared/test                   = NOK

This I can't reproduce.

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in the
arms of silence. All we ever have is here, now." - Ursula K. Le Guin