Extension:MobileFrontendContentProvider

The MobileFrontendContentProvider extension allows developers to make MediaWiki ignore the database and use HTTP APIs to access wiki page content. At the time of writing it can only be used for read only views.

Category:Extensions without an imageCategory:Extensions with invalid or missing typeCategory:Extensions without a compatibility policyCategory:GPL licensed extensions
MediaWiki extensions manual
MobileFrontendContentProvider
Release status: stableCategory:Stable extensions
Description Provides developer tools for testing on the content of a foreign wiki.
Author(s)
MediaWiki 1.33+[1]Category:Extensions with manual MediaWiki version
PHP 5.5.9+
License GNU General Public License 2.0 or later
Download Category:Extensions in Wikimedia version control
Quarterly downloads 0
Translate the MobileFrontendContentProvider extension if it is available at translatewiki.net
Issues Open tasks · Report a bug
Category:All extensionsCategory:Extensions not in ExtensionJson

Setup

MobileFrontendContentProvider was previously part of Extension:MobileFrontend. It can be configured locally to render articles from other MediaWiki instances. See this YouTube demo video

This can help you debug problems locally instead of importing articles which may have dependencies on various templates and Wikibase identifiers from production to your local instance.

This extension is a developer tool and is not recommended for production usage.

View another project

The code below will turn your local MediaWiki site into a Wikivoyage viewer:

$wgMFContentProviderClass = 'MobileFrontendContentProviders\MwApiContentProvider';
$wgMFMwApiContentProviderBaseUri = 'https://en.m.wikivoyage.org/w/api.php';

This is particularly useful for testing different mobile skins in Extension:MobileFrontend using the wgMFDefaultSkinClass config option.

Testing Parsoid content

The extension can be used to test content from the Parsoid parser.

$wgMFContentProviderClass = 'MobileFrontendContentProviders\ParsoidContentProvider';

Local content

In some cases you may want to be able to test both local and foreign content. When enabled local content will be used if it exists. When disabled it will always be ignored.

$wgMFContentProviderTryLocalContentFirst = true;

Popups configuration

To add support for Extension:Popups the following configuration is needed.

wfLoadExtension('MobileFrontendContentProvider');
wfLoadExtension('Popups');
$wgPopupsGateway = 'restbaseHTML';
$wgPopupsRestGatewayEndpoint = 'https://en.wikipedia.org/api/rest_v1/page/summary/';
$wgArticlePath = "/wiki/$1";
  1. Fatal error: Uncaught ExtensionDependencyError: MobileFrontend is not compatible with the current MediaWiki core (version 1.32.2), it requires: >= 1.33.0.
Category:All extensions Category:Extensions in Wikimedia version control Category:Extensions not in ExtensionJson Category:Extensions with invalid or missing type Category:Extensions with manual MediaWiki version Category:Extensions without a compatibility policy Category:Extensions without an image Category:GPL licensed extensions Category:Stable extensions