[dev] MIMP...

Marc Jauvin marc at register4less.com
Sat Sep 11 09:45:15 PDT 2004


Jan Schneider <jan at horde.org> wrote:

> Zitat von Marc Jauvin <marc at register4less.com>:
>
>> Jan Schneider <jan at horde.org> wrote:
>>
>>>> I don't want to globally treat WinCE browsers as mobile if people 
>>>> don't agree,
>>>> though - thoughts?
>>>
>>> No, this should really depend on the browser, not on the platform.
>>> Nonetheless the user could simply go directly to MIMP and will get the
>>> stripped down HTML interface of MIMP.
>>
>> Since I only want to setup ONE instance of horde, I want the choice 
>> to be made
>> automatically based on the browser capabilities...
>
> You still need only one Horde intances. Anyway, in your special case it
> makes more sense to patch Browser.php locally.

You mean other people running a dual IMP/MIMP wouldn't like the 
interface to be
chosen automatically for their users?

I decided to change the '_horde_select_loginscreen()' function like the
following:

if (!function_exists('_horde_select_loginscreen')) {
     function _horde_select_loginscreen()
     {
         require_once 'Horde/Browser.php';
         $browser = &new Browser();
         if ($browser->isMobile() || preg_match('/; 240x(280|320)/',
$_SERVER['HTTP_USER_AGENT'])) {
             return 'mimp';
         }
         return 'imp';
     }
}

This way, I keep my release clean...

--
Marc Jauvin



More information about the dev mailing list