Mobile Gateway

The MobileFrontend MediaWiki extension is the primary mobile web interface for all Wikimedia projects, written in PHP. It replaced the first mobile gateway written in Ruby.

Behind the scenes
The mobile interface of a Wikimedia project can be reached by visiting langcode.m.X.org (where X is the name of a Wikimedia project)

For instance:
 * pl.m.wikipedia.org
 * en.m.wikinews.org
 * en.m.wikisource.org

Alternatively, any user going to a domain without .m will automatically be redirected to the mobile interface.

When a user loads one of the above urls the'll be presented with a screen layout that is appropriate for their device. Articles will be automatically reformatted but the home page will not. In order for a homepage to be mobile friendly it has to be configured with the appropriate selectors.

This page gives some information about how to make sure the mobile interface works best for your project.

Mobile homepage
By default, the only content that a user will see on their project homepage is search, license, and action control. In order to see content you have to use the appropriate css selectors.

Selectors
We currently support a predefined list of selectors and a global prefix. The mobile interface uses these selectors to create the various sections of the homepage automatically.

Predefined Selectors
An example of the usage of these CSS selectors can be seen in the source of the main page of the English Wikipedia (Go to the page and choose "view source" in your browser. Also see the wikicode).

Global Prefix
More generally, any selector that is prefixed with mf- will be added to the mobile main page for any project. All selectors must have a corresponding title. For instance:

would create a section named Wikimedia Blog within the corresponding div.

Redirecting users
All redirects are now handled by our Varnish proxy, which allows us to use the WURFL db for all device detection.

More information
If you have a question, just ask Patrick Reilly or Tomasz Finc.

You can also talk to the developers in the IRC channel, via [mailto:mobile@wikipedia.org e-mail], and on Twitter

Development
Just pop into the IRC room. The code is available to anyone. Just get the repot and start hacking!


 * Report a new bug
 * List of known bugs