MWI Team Blog

Dispatches from members of the W3C Mobile Web Initiative Team

Categories: Current state (32) | Developing Countries (15) | Events (20) | Looking forward (13) | News (42) | Technical (33) |

The Pythia casts mobileOK spells — 18 November 2009

Web authoring tools ease publication process. Simplicity comes with some loss of control over the generated content. There is hardly anything an authoring tool user may do to improve her content when the W3C mobileOK Checker reports that pop-up windows should not be used. So what?! I do not have any of these pop-up links in my content!

The underlying theme can be updated, but this approach works up to a point when e.g. the post would best be split into multiple pages when delivered on mobile devices. Authoring tools that do not provide content adaptation mechanisms need to be extended to be able to serve mobile-friendly content to mobile devices.

I have been working on an open-source suite of tools written in PHP lately, named mobileOK Pythia, designed to help generate mobileOK content and more generically speaking to help adapt content to fit the properties of the requesting device. Here is a short overview of the outcome of this work. More information (including crucial information about the choice of Pythia as a name ;)) can be found in the documentation of mobileOK Pythia.

This work is part of the MobiWeb 2.0 project supported by the European Union's 7th Research Framework Programme (FP7).

Plug-ins for WordPress and Joomla!

WordPress and Joomla home pages with the mobileOK Pythia plug-in

From a user's point of view, the visual and hopefully useful outcome of this work is the creation of the mobileOK Pythia plug-ins for WordPress and Joomla! that make it possible to generate mobileOK content with these tools.

The plug-ins feature:

  • Device identification: based on WURFL, an open-source DDR published as an XML file, and accessed through a standard DDR Simple API interface.
  • Content adaptation to fit the properties of the requesting device in terms of e.g. screen size, script support, page size limit.
  • Theme switching: possibility to switch to a more mobile-friendly theme when the requesting device is identified as mobile.
  • POWDER: a machine-readable mobileOK claim for the Web site can be automatically created and served using a POWDER document. The POWDER document is made discoverable through the addition of a Link HTTP header field as decribed in the POWDER Primer.
  • W3C mobileOK Checker link: a link to the W3C mobileOK Checker is added next to the authoring input form to be able to assert the mobile-friendliness of the created content while it is being written.
  • mobileOK theme: a mobileOK template may be installed with the plug-in.

The development of a third plug-in for Moodle has started but it is still work in progress.

There exist other plug-ins that provide similar functionality (see for instance WordPress Mobile Plugin, WordPress Mobile Pack, Mobilebot 1.0 or WAFL: Mobile Content Adaptation). mobileOK Pythia separates tool-specific functionalities from tool-agnostic libraries to ease porting to other tools. In particular, the plug-ins wrap the same extensible libraries:

  • AskPythia to identify and retrieve the properties of the requesting device.
  • TransPythia to adapt content based on the properties of the requesting device.


AskPythia is an open-source conforming implementation of the Device Description Repository Simple API in PHP. It is not a DDR but a wrapper to existing DDRs.

AskPythia ships with an implementation on top of the WURFL database that maps WURFL capabilities to properties defined in the Device Description Repository Core Vocabulary standard. Support for other DDRs is welcome!

Check AskPythia's documentation for more information.


TransPythia is a transcoding library that adapts content (HTML, CSS, images) based on the capabilities of the requesting device. The library ships with a set of transcoding actions that are particularly adapted to mobile devices and that may be extended as needed.

Main transformations are:

  • Images conversion and adaptation: adapts images to match the requesting device's list of supported image formats and to fit the screen size. Removes images that cannot be converted or that are still too big for mobile consumption after conversion.
  • Pagination: a generic pagination algorithm that may be used to paginate HTML pages or HTML fragments when the requesting device is identified as a mobile device.
  • Tables linearization: to remove nested tables and linearize tables when the requesting device does not support them.

Check TransPythia's documentation for more information.


If you would like to comment, contribute, report bugs or simply tell us what you think, you are very welcome! Feel free to send an email to the mailing-list (with public archives).

by Francois Daoust in News, Technical 1 comment Permalink

Comments, Pingbacks:

Comment from: Edward [Visitor]
I use a Joomla component built on Wordpress called "mojoBlog" and its quite effective. Most WP plugins are supported as well. Only problem is it is not yet J!1.5 compatible. Only works for J!1.0. A new stable version is on the production roll.
PermalinkPermalink 2010-01-22 @ 08:22

Contacts: Dominique Hazael-Massieux