Summary: Information on creating a read-only version of a wiki for handheld devices.
Version: 2007-04-10
Prerequisites: None
Status: Active
Maintainer: DaveG
Categories: Handheld, PDA
Users: (View? / Edit)

Questions answered by this recipe

How do I get a read-only copy of my wiki onto a Palm or PocketPC PDA (Personal Digital Assistant)?

Caveat: In general you will not be able to edit your PmWiki wiki from a handheld device. Very few PDAs are able to meet the basic pre-requisites for running PmWiki (PHP, and some form of web server). This page describes methods of getting a read-only copy of your PmWiki wiki onto a handheld device.


The most common way to get the content of a web based wiki like PmWiki on to a PDA is to use some utility to grab the wiki pages (spider the wiki) and convert them into a format readable by the PDA. SunriseXP for the Palm for instance.

Simply 'spidering' the wiki is likely to produce unusable results on the PDA, given the limited screen capacity of most PDAs. So, you'll typically need to create a PDA specific skin.

There are a umber of ways to apply a skin to a wiki:

  • point the spider to the wiki using the new skin using SkinChange, and appending a parameter to the URL
  • automatically detect the spider and apply the skin

User Agents

Whenever something (e.g., Firefox or Internet Explorer) requests a web page it sends basic form of identification summarizing what kind of software is requesting the page. This identification is known as the User Agent. You can determine what User Agent your software uses from various sources. Detect Mobile detects a huge range of user agent for you, allowing you to present a skin variation for mobile users.

Automatically Detecting Spiders

Even spiders have some form of User Agent. Sunrise XP allows you to change the name of the User Agent, but by default it's "Sunrise XP 2.0". We can use this in to automatically switch the skin in config.php. Thus, when we're spidering the wiki we can automatically apply the PDA friendly skin. All other browsers (like Firefox and Internet Explorer) get the normal skin:

For example:

  if (preg_match('/Sunrise/', $_SERVER['HTTP_USER_AGENT']))
     $Skin = 'handheld';
     $Skin = 'normal browsing skin';


Be careful about which cookbooks you activate when converting to PDA format. Specifically cookbooks that affect the User Interface may not produce usable or reasonable results on a PDA. You probably don't want to activate SectionEdit when converting to PDA format. In this case only include the cookbook when the User Agent is a regular browser:

  if (preg_match('/Sunrise/', $_SERVER['HTTP_USER_AGENT']==0)) {


User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.