Extension:MobileFrontend/fr

L'extension MobileFrontend :


 * Crée un site séparé dédié aux mobiles, pour le trafic utilisant des appareils mobiles,
 * Les administrateurs système peuvent fournir un habillage différent, par exemple Skin:Minerva Neue.
 * fournit des transformations de contenu variées afin de rendre votre contenu plus sympathique,
 * Plus particulièrement le repli des sections ainsi que le réarrangement de contenu ou sa suppression.
 * simplifie le bas de page sur les mobiles et ajoute un lien vers les versions bureau et mobile du site.
 * provides replacements for special pages that are not mobile friendly - Special:History, Special:Contributions, Special:MobileCite, Special:Watchlist, Special:Preferences, Special:MobileDiff,
 * provides the special pages Special:Nearby, Special:MobileOptions (for mobile skin preferences), Special:MobileLanguages (for language selection),
 * provides a beta mode with a feature management system for adding experimental features for anonymous users.

This page is designed for end users who want to install it on their development instance. If you are keen to help us build it and improve it we encourage you to get involved.

Prérequis

 * Bien que MediaWiki ne l'exige pas, PHP doit avoir la prise en charge de mbstring pour que cette extension fonctionne.

Before installing MobileFrontend, if you make heavy use of templates and/or inline styles (the style attribute) you should review your content to see whether it is mobile friendly. The extension can be used to style content so that it renders nicely on mobile and desktop. MobileFrontend will not magically fix this for you!

En particulier, si vous désirez relire votre page d'arrivée (page d'accueil). Voir le Format de la page d'accueil pour mobiles.

Configurer Nearby
MobileFrontend provides the Special:Nearby page with a little configuration. To get this to work a few optional steps are required:


 * 1) Due to browser security you will need to be running a secure site over SSL — it is not possible to request a user's location over HTTP.
 * 2) Install the GeoData extension
 * 3) Run
 * 4) In LocalSettings.php add
 * 5) Determine article coordinates:
 * 6) Add data to your articles to one or more pages   see the documentation for GeoData for syntax details.
 * 7) Alternatively you can use a separate MediaWiki installation for Nearby by setting   in your LocalSettings.php file. For example,   will use coordinates of English Wikipedia articles. The nearby endpoint will be used to find content related to a given location.

Configurer un habillage
MobileFrontend provides you with a mobile formatted website to go alongside your existing desktop website. You can skin it however you want.

The following skins are compatible with MobileFrontend:
 * Skin:Minerva Neue (stable, default on WMF wikis)
 * Skin:Vector (default desktop skin, uses an experimental responsive mode for mobile)
 * Skin:Timeless (experimental skin)

Paramètres de configuration
Voir

Additional tweaks
Obtenir le meilleur de MobileFrontend en ajoutant ces dépendances facultatives supplémentaires :


 * - obtenir Special:Nearby et baliser géographiquement ses articles.
 * - ajouter des images à rechercher et obtenir des résultats de proximité.
 * - ajoutez la modification visuelle à votre expérience sur les mobiles.

Mise en forme CSS
Pour appliquer le CSS à votre thème mobile, modifiez MediaWiki:Mobile.css, la contrepartie de MediaWiki:Common.css.

MobileFrontend ne charge aucun des fichiers MediaWiki:Common.css globaux, ni aucune des feuilles de style de l'utilisateur.

En savoir plus
If you would like to test the mobile extension on a desktop browser or your device doesn't render the mobile version, you can append the following key-value pair to the query string:  e.g., https://en.wikipedia.org/wiki/Chuck_Schuldiner?useformat=mobile

If you would like to view a page in the beta without enabling it across the entire site you can append to the query string of any page

Anciennes fonctions de MobileFrontend
MobileFrontend has traditionally been a very large extension. Many features have either surpassed their requirements or will do at some future date. These are listed below.

API
APIs are provided by the MobileFrontend extension, but long term we expect to deprecate them in favour of Mobile Content Service. Use these APIs at your own risk. They may disappear (although we will give you sufficient notice when they do)!

API MobileView
Voir.

action=parse étendu
accepts extra parameters:
 * : Return rendered page HTML in a mobile format . Prior to MediaWiki 1.23, you could specify  to output HTML for modern phones or   to output WML for dumb phones (see mailing list messagefor details).
 * : Disable images in mobile output.
 * : Apply mobile main page transformations.

Exemple :

meta=siteinfo
The domain of the mobile version of the site (which might or might not be the same as the normal domain) is available under the  key of the general siteinfo information.

Configuration
You may need to run  and install php composer to get the precommit hook to run, depending on what you're doing with the extension.

Tester avec les articles d'un wiki externe (données actuelles)
MobileFrontend can now be configured locally to render articles from other MediaWiki instances. 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 is not recommended for production usage.

Le code ci-dessous va transformer votre site mobile MediaWiki local en un afficheur Wikivoyage :

This is particularly useful for testing different mobile skins using the wgMFDefaultSkinClass config option.

Sites WMF
On Wikimedia Foundation-run sites, we use Varnish caching servers to check the user agent of your device.

Sites non-WMF
For non-WMF sites, you can either set up your configuration to mimic how things are done at the WMF (doing device detection at the proxy layer and setting specific X-Device headers), or you can simply use "?useformat=mobile" to switch an article to use the mobile view.

FAQ
The following questions frequently appear on our talk page. Please check this list before posting about them on the talk page or use the existing talk topic, if available, to receive clarifications.

Question: comment personnaliser le menu principal de l'habillage Minerva ?
A: This is tracked in phabricator but you can see Topic:Tiggc18fvd3stmsf has an interim solution.

Q: How do I add HTML to the Minerva skin, for example to add ads or additional script tags?
A: You can do this by editing the template file for the skin (currently ). See this discussion for details.

Q: The extension I am using doesn't seem to work on MobileFrontend. Why?
A: It's likely the extension is old and needs to add compatibility to MobileFrontend. Please contact the developer of the extension and point them to ResourceLoader/Writing a MobileFrontend friendly ResourceLoader module. Please do not post to the talk page, as in this case it would be better to file a bug on Phabricator (you can login using your MediaWiki.org username) for a quicker response.

Q: I upgraded MobileFrontend and now I'm getting a fatal exception!
A: You are probably using incompatible versions of MobileFrontend and MediaWiki. In most cases, we can't help you here. Try upgrading MobileFrontend or MediaWiki to resolve your issue.

Q: After upgrading MediaWiki I'm getting an exception wgMFDefaultSkinClass is not setup correctly.
A: MobileFrontend currently assumes you have the skin installed. If you don't you'll need to install this or configure your mobile skin per instructions above.

Pour les développeurs d'extensions
By default resource modules in extensions will not be loaded in mobile view.

Should a module need to be loaded while in mobile view this guide on writing MobileFrontend friendly modules will be of help.

Voir aussi

 * Fichier de configuration de MobileFrontend Wikimedia
 * Commons:Category:MediaWiki extension MobileFrontend
 * Fichier de configuration de MobileFrontend Wikimedia
 * Commons:Category:MediaWiki extension MobileFrontend