[pmwiki-users] DetectMobile misidentifies lynx

Dieter Wirz didi.wirz at gmail.com
Mon Jul 9 04:50:07 CDT 2012


On Thu, Jul 5, 2012 at 11:30 AM, Lars Eighner <surname at larseighner.com> wrote:
> 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.

Or you use another text based browser like w3m (see w3m.sourceforge.net)

w3m has some pro's and con's in comparison to lynx.
_And_
w3m is not recognized by detectmobilebrowsers.php .

-didi



More information about the pmwiki-users mailing list