[pmwiki-users] DetectMobile misidentifies lynx

Lars Eighner surname at larseighner.com
Thu Jul 5 04:30:05 CDT 2012


On Thu, 5 Jul 2012, Eric Forgeot wrote:

> I think it was done on purpose: mobile website are ofter lighter than
> full website, so it's ofter better to use the mobile version with lynx
> (for my website, at least)

I should say that this also is a problem with the free version, since both
versions rely on the same non-licensed base.

To remove particular strings from mobile detection it is probably better to
do something like this:

if( detect_mobile_device() && 
! stripos($_SERVER['HTTP_USER_AGENT'],'lynx') === false ) {
    $Skin = 'ipmwiki'; # iphone mobile skin
} else {
    $Skin = 'mynews'; # the default skin
}

in your config.php than to edit the recipe directly.

I admit the ipmwiki skin is not entirely horrible with lynx, but it does do
things like run the horizontal buttons together so that no amount of editing
Site.PageActions will fix it.  There may be better mobile skins, or you may
be willing to live with it as is.

It would be nice if there were a more reliable way to distinguish devices,
but the browser string (HTTP_USER_AGENT) seems to be all that is available,
and it is not clear that it is universal populated with device info.


>
> 2012/7/5 Lars Eighner <surname at larseighner.com>:
>>
>> detect_mobile.php incorrectly identifies the lynx browser as a mobile
>> device.
>>
>> Until you know this, you may spend many hours trying to figure out why pages
>> are messed up in lynx.  The breakage which results from treating lynx as a
>> mobile device may result in defeating accessibility features authors have
>> included for those who use lynx in conjunction with text-to-speech software
>> and in poor readibility for sighted users of lynx.
>>
>>
>> --
>> Lars Eighner
>> http://www.larseighner.com/index.html
>> 8800 N IH35 APT 1191 AUSTIN TX 78753-5266
>>
>>
>> _______________________________________________
>> pmwiki-users mailing list
>> pmwiki-users at pmichaud.com
>> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
>

-- 
Lars Eighner
http://www.larseighner.com/index.html
8800 N IH35 APT 1191 AUSTIN TX 78753-5266




More information about the pmwiki-users mailing list