skins for mobile devices (was: Re: [Pmwiki-users] Modular configurable skin)

Patrick R. Michaud pmichaud
Sun Jan 16 17:55:34 CST 2005


On Sun, Jan 16, 2005 at 02:26:34PM -0500, Neil Herber wrote:
> 
> It would be great if there was a cookbook page that described how to 
> implement skin switching for those of us who are CSS-challenged (like me).

http://www.pmwiki.org/wiki/Cookbook/SkinChange is a good start.

> Ideally, I would like to be able to have a simple HTML start page that 
> would have two (or more) links: one which would invoke a standard PmWiki 
> browser-friendly skin, while the other would invoke a mobile-device 
> friendly skin.

I'll add this to a cookbook soon, but in the meantime:

  if (preg_match('!application/xhtml\\+xml!',$_SERVER['HTTP_ACCEPT']) &&
      preg_match('!text/vnd\\.wap\\.wml!',$_SERVER['HTTP_ACCEPT']))
    $Skin = 'mobile';

This detects if the device is using WML (common for mobile devices)
and switches the skin to 'mobile' if it is.

> If the standard PmWiki distro included the standard skin, the print skin, 
> and a "mobile" skin, then new admins could test the functionality without 
> having to do any skin downloading or config file tweaking. 

I just haven't come up with a mobile skin that I like.

Pm




More information about the pmwiki-users mailing list