Différences entre versions de « Nous Aurons:À propos »

De Wikipédia 2197
Sauter à la navigation Sauter à la recherche
Ligne 2 : Ligne 2 :
  
 
Présentation de Nous Aurons, le jeu vidéo.
 
Présentation de Nous Aurons, le jeu vidéo.
 +
<languages />
 +
{{Extension|templatemode=
 +
|status        = stable
 +
|type1        = interface
 +
|type2        = hook
 +
|newhook1      = MobileFrontendBeforeDOM
 +
|newhook2      = EnterMobileMode
 +
|newhook3      = GetMobileUrl
 +
|newhook4      = RequestContextCreateSkinMobile
 +
|newhook5      = BeforePageDisplayMobile
 +
|newhook6      = MobileLicenseLink
 +
|newhook7      = MobileSiteOutputPageBeforeExec
 +
|newhook8      = MobileFrontendFeaturesRegistration
 +
|newhook9      = MobileSpecialPageStyles
 +
|newhook10    = BeforeSpecialMobileDiffDisplay
 +
|newhook11    = SpecialMobileEditWatchlist::images
 +
|username      =
 +
|author        =
 +
* [https://github.com/wikimedia/mediawiki-extensions-MobileFrontend/blob/master/CREDITS.mediawiki#developers-alphabetically See repo]
 +
|description  = <translate><!--T:156--> Provides a mobile-friendly view</translate>
 +
|image        = MediaWiki-Vagrant MobileFrontend Extension.png
 +
|imagesize    = border{{!}}350
 +
|update        =
 +
|mediawiki    = 1.33+<ref>:Fatal error: Uncaught ExtensionDependencyError: MobileFrontend is not compatible with the current MediaWiki core (version 1.32.2), it requires: >= '''1.33.0.'''</ref>
 +
|php          = 5.5.9+
 +
|download      = {{WikimediaDownload|MobileFrontend}}
 +
|readme        = {{git file|project=mediawiki/extensions/MobileFrontend|branch=master|file=README.md|text=README}}
 +
|changelog    =
 +
|tags          =
 +
|example      =
 +
[https://m.mediawiki.org/w/index.php?title=Extension:MobileFrontend&mobileaction=toggle_view_mobile m.mediawiki.org]
 +
|compatibility policy = rel
 +
|bugzilla      = MobileFrontend
 +
|phabricator  = MobileFrontend
 +
}}
 +
<translate>
 +
<!--T:2-->
 +
The '''MobileFrontend''' extension:
 +
 +
<!--T:121-->
 +
* Creates a separate mobile site for your mobile traffic,</translate>
 +
<translate>
 +
<!--T:159-->
 +
** System administrators are able to provide a different skin, e.g. [[<tvar|1>Special:MyLanguage/Skin:Minerva Neue</>|Skin:Minerva Neue]].</translate>
 +
<translate>
 +
<!--T:160-->
 +
* provides various content transformations to make your content more friendly,</translate>
 +
<translate>
 +
<!--T:161-->
 +
** Notably section collapsing and content re-arrangement and removal, including putting the lead paragraph above the lead photo or info box, even if the lead paragraph is below them in the page's source code.</translate>
 +
<translate>
 +
<!--T:162-->
 +
* simplifies mobile footer and adds a desktop/mobile site link,</translate>
 +
<translate>
 +
<!--T:163-->
 +
* provides replacements for special pages that are not mobile friendly:</translate> [[Special:History/Extension:MobileFrontend|Special:History]], [[Special:Contributions/Jdlrobson|Special:Contributions]], [[Special:Watchlist]], [[Special:Preferences]], [[Special:MobileDiff]]
 +
<translate>
 +
<!--T:164-->
 +
* provides the special pages Special:Nearby, [[Special:MobileOptions]] (for mobile skin preferences), [[Special:MobileLanguages]] (for language selection),</translate>
 +
<translate>
 +
<!--T:165-->
 +
* provides a beta mode with a feature management system for adding experimental features for anonymous users.
 +
</translate>
 +
 +
<translate>
 +
<!--T:122-->
 +
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 [[Special:MyLanguage/Mobile_Web|get involved]].
 +
</translate>
 +
 +
{{ReadingWebExtension}}
 +
 +
<translate>
 +
== Prerequisites == <!--T:3-->
 +
 +
<!--T:4-->
 +
* Although MediaWiki does not require it, PHP must have <tvar|mbstring>[https://php.net/mbstring mbstring]</> support for this extension to work ({{task|T62174}}).
 +
</translate>
 +
 +
<translate><!--T:136--> 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.</translate>
 +
<translate><!--T:137--> The <tvar|1>{{ll|Extension:TemplateStyles|TemplateStyles}}</> extension can be used to style content so that it renders nicely on mobile and desktop. MobileFrontend will not magically fix this for you!</translate>
 +
 +
<translate><!--T:138--> In particular, you may want to review your landing page (main page).</translate>
 +
<translate><!--T:139--> See [[<tvar|1>Special:MyLanguage/Mobile Gateway/Mobile homepage formatting</>|Mobile homepage formatting]].</translate>
 +
 +
<translate>
 +
== Installation == <!--T:140-->
 +
</translate>
 +
 +
{{ExtensionInstall
 +
|vagrant=mobilefrontend
 +
|repo-name=MobileFrontend
 +
|registration=required
 +
|custom-steps=<translate>
 +
<!--T:6-->
 +
* [[<tvar|1>#Configuration settings</>|If necessary configure at your convenience]]
 +
</translate>
 +
}}
 +
 +
{{anchor|Configuration settings}}
 +
<translate>
 +
=== Setup Nearby === <!--T:61-->
 +
 +
<!--T:88-->
 +
MobileFrontend provides the Special:Nearby page with a little configuration. To get this to work a few optional steps are required:
 +
 +
<!--T:120-->
 +
# 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.</translate>
 +
<translate>
 +
<!--T:89-->
 +
# Install the [[<tvar|geodata>Special:MyLanguage/Extension:GeoData</>|GeoData extension]]</translate>
 +
# <translate><!--T:170--> Run {{manual|update.php}}</translate>
 +
# <translate><!--T:171--> In LocalSettings.php add <tvar|nearby><code>$wgMFNearby = true;</code></></translate>
 +
# <translate><!--T:172--> Determine article coordinates:</translate>
 +
## <translate><!--T:173--> Add location data to your articles by using the <code>coordinates</code> parser function, for example <tvar|coordinates><code><nowiki>{{#coordinates:37.786971|-122.399677|primary}}</nowiki></code></>.</translate> <translate><!--T:193--> For syntax details, see the documentation for <tvar|1>{{ll|Extension:GeoData|GeoData}}</>.</translate>
 +
## <translate><!--T:174--> Alternatively you can use a separate MediaWiki installation for Nearby by setting <tvar|endpoint><code>$wgMFNearbyEndpoint</code></> in your LocalSettings.php file.</translate> <translate><!--T:175--> For example, <tvar|url><code><nowiki>$wgMFNearbyEndpoint = 'https://en.m.wikipedia.org/w/api.php';</nowiki></code></> will use coordinates of English Wikipedia articles.</translate> <translate><!--T:176--> The nearby endpoint will be used to find content related to a given location.</translate>
 +
 +
{{anchor|Setup a skin}}
 +
<translate>
 +
=== Setup a skin === <!--T:141-->
 +
 +
<!--T:142-->
 +
MobileFrontend provides you with a mobile formatted website to go alongside your existing desktop website. You can skin it however you want.
 +
</translate>
 +
 +
<syntaxhighlight lang="php">
 +
// <translate nowrap><!--T:195--> Choose one of these and add chosen code to bottom of <tvar|1>LocalSettings.php</> file:</translate>
 +
wfLoadSkin( 'MinervaNeue' );
 +
$wgMFDefaultSkinClass = 'SkinMinerva'; // <translate nowrap><!--T:196--> use Minerva skin</translate> <translate nowrap><!--T:197--> (You need to download and install it separately, otherwise you'll get an exception)</translate>
 +
wfLoadSkin( 'Vector' );
 +
$wgMFDefaultSkinClass = 'SkinVector'; // <translate nowrap><!--T:198--> use Vector skin</translate>
 +
wfLoadSkin( 'Timeless' );
 +
$wgMFDefaultSkinClass = 'SkinTimeless'; // <translate nowrap><!--T:199--> use Timeless skin</translate>
 +
</syntaxhighlight>
 +
 +
<translate>
 +
<!--T:143-->
 +
The following skins are compatible with MobileFrontend:
 +
 +
<!--T:200-->
 +
* [[<tvar|minerva>Special:MyLanguage/Skin:Minerva Neue</>|Skin:Minerva Neue]] (stable, default on WMF wikis)</translate>
 +
<translate>
 +
<!--T:201-->
 +
* [[<tvar|vector>Special:MyLanguage/Skin:Vector</>|Skin:Vector]] (default desktop skin, uses an experimental responsive mode for mobile)</translate>
 +
<translate>
 +
<!--T:202-->
 +
* [[<tvar|timeless>Special:MyLanguage/Skin:Timeless</>|Skin:Timeless]] (experimental skin)
 +
 +
== Configuration settings == <!--T:7-->
 +
 +
<!--T:169-->
 +
See <tvar|1>{{ll|Extension:MobileFrontend/Configuration}}</>
 +
 +
=== Additional tweaks === <!--T:62-->
 +
 +
<!--T:90-->
 +
Get the most out of MobileFrontend by adding these optional compatible extensions:
 +
</translate>
 +
 +
* {{ll|Extension:GeoData}} - <translate><!--T:91--> Get Special:Nearby and geotag your articles.</translate>
 +
* {{ll|Extension:PageImages}} - <translate><!--T:92--> Adds images to search and nearby results.</translate>
 +
* {{ll|Extension:VisualEditor}} - <translate><!--T:93--> Add Visual editing to your mobile experience.</translate>
 +
 +
<translate>
 +
== Local customisations == <!--T:63-->
 +
 +
=== CSS styling === <!--T:168-->
 +
</translate>
 +
<translate><!--T:94--> To apply CSS to your mobile theme, edit '''MediaWiki:Mobile.css''', the counterpart of [[<tvar|stylesheets>Special:MyLanguage/Manual:Interface/Stylesheets</>|MediaWiki:Common.css]].</translate>
 +
<translate><!--T:194--> In order for the stylesheet to function you may have to add <tvar|1><code>mw.loader.using('mobile.site.styles')</code></> to your <tvar|2>'''MediaWiki:Mobile.js'''</>.</translate>
 +
 +
<translate>
 +
<!--T:127-->
 +
MobileFrontend does not load the global MediaWiki:Common.css, neither does it load any of the user stylesheets.
 +
 +
=== More information === <!--T:64-->
 +
 +
<!--T:95-->
 +
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 URL query string: <tvar|useformat><code>?useformat=mobile</code></>. For example: <tvar|url>https://en.wikipedia.org/wiki/Chuck_Schuldiner?useformat=mobile</>
 +
 +
<!--T:66-->
 +
If you would like to view the mobile version of a page without enabling the extension across the entire site you can append the string to the URL on that page, too.
 +
 +
== Legacy features of MobileFrontend == <!--T:124-->
 +
 +
<!--T:125-->
 +
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.
 +
</translate>
 +
 +
{{anchor|API}}
 +
<translate>
 +
=== API === <!--T:68-->
 +
</translate>
 +
<translate><!--T:126--> APIs are provided by the MobileFrontend extension, but long term we expect to deprecate them in favour of [[<tvar|1>Mobile Content Service</>|Mobile Content Service]].</translate> <translate><!--T:177--> Use these APIs at your own risk.</translate>
 +
<translate><!--T:178--> They may disappear (although we will give you sufficient notice when they do)!</translate>
 +
 +
<translate>
 +
==== MobileView API==== <!--T:157-->
 +
 +
<!--T:158-->
 +
See {{<tvar|1>ll|Extension:MobileFrontend/MobileViewAPI</>|Extension:MobileFrontend/MobileViewAPI}}.
 +
 +
==== Extended <tvar|parse>action=parse</> ==== <!--T:96-->
 +
 +
<!--T:179-->
 +
<tvar|1><code>{{ll|API:Parse|action{{=}}parse}}</code></> accepts extra parameters:
 +
</translate>
 +
 +
; <code>mobileformat=</code>
 +
: <translate><!--T:180--> Return rendered page HTML in a mobile format {{MW version-inline|1.23+}}.</translate> <translate><!--T:181--> Prior to MediaWiki 1.23, you could specify <code>mobileformat=html</code> to output HTML for modern phones or <code>mobileformat=wml</code> to output WML for dumb phones (see [https://lists.wikimedia.org/pipermail/mediawiki-api/2013-October/003131.html mailing list message]for details).</translate>
 +
; <code>noimages</code>
 +
: <translate><!--T:182--> Disable images in mobile output.</translate>
 +
; <code>mainpage</code>
 +
: <translate><!--T:183--> Apply mobile main page transformations.</translate>
 +
 +
<translate>
 +
<!--T:69-->
 +
Example:
 +
</translate>
 +
 +
{{ApiEx
 +
| p1=action=parse
 +
| p2=page=Therion_(band)
 +
| p3=mobileformat=
 +
| p4=prop=text
 +
| result=<syntaxhighlight lang=javascript>{
 +
    "parse": {
 +
        "title": "Therion (band)",
 +
    "text": {
 +
            "*": "<div><table class=\"infobox vcard plainlist\" style=\"width:22em\"><tr><th colspan=\"2\" style=\"text-align:center;font-size:125%;font-weight:bold;background-color: #b0c4de\"><span class=\"fn org\">Therion</span></th>\n</tr><tr><td colspan=\"2\" style=\"text-align:center\"><a href=\"/wiki/File:2130860153_281d30b3bf_b.jpg\" class=\"image\">
 +
            ...
 +
</syntaxhighlight>
 +
}}
 +
 +
==== meta=siteinfo ====
 +
<translate>
 +
<!--T:129-->
 +
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 <code>mobileserver</code> key of the general siteinfo information.
 +
 +
== For developers/sysadmins == <!--T:130-->
 +
 +
=== Setup === <!--T:166-->
 +
 +
<!--T:167-->
 +
You may need to run <tvar|1><code>npm install</code></> and install php composer to get the precommit hook to run, depending on what you're doing with the extension.
 +
 +
=== Testing with articles on a foreign wiki (live data) === <!--T:131-->
 +
</translate>
 +
<translate><!--T:132--> MobileFrontend can now be configured locally to render articles from other MediaWiki instances.</translate><ref><translate><!--T:184--> See this [<tvar|1>https://www.youtube.com/watch?v=uRQzjN0hBlY&feature=youtu.be</> YouTube demo video]</translate></ref>
 +
<translate><!--T:185--> 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.</translate>
 +
<translate><!--T:186--> This is not recommended for production usage.</translate>
 +
 +
<translate>
 +
<!--T:133-->
 +
The code below will turn your local MediaWiki mobile site into a Wikivoyage viewer:
 +
</translate>
 +
 +
<syntaxhighlight lang="php">
 +
$wgMFContentProviderClass = 'MobileFrontend\ContentProviders\MwApiContentProvider';
 +
$wgMFMwApiContentProviderBaseUri = 'https://en.m.wikivoyage.org/w/api.php';
 +
</syntaxhighlight>
 +
 +
<translate>
 +
<!--T:134-->
 +
This is particularly useful for testing different mobile skins using the '''wgMFDefaultSkinClass''' config option.
 +
 +
== Using the mobile view == <!--T:77-->
 +
 +
=== WMF sites === <!--T:99-->
 +
 +
<!--T:100-->
 +
On Wikimedia Foundation-run sites, we use Varnish caching servers to check the user agent of your device.
 +
 +
=== Non-WMF sites === <!--T:81-->
 +
 +
<!--T:104-->
 +
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.
 +
</translate>
 +
 +
{{Note|1=<translate><!--T:117--> Starting from the snapshot version 1.28, the default $wgMFMobileHeader was changed from X-WAP to X-Subdomain.</translate> <translate><!--T:118--> You could either set <tvar|code><code>$wgMFMobileHeader = 'X-WAP';</code></> or modify your cache (Varnish) header setting, as long as they match.</translate>}}
 +
 +
<translate>
 +
== FAQ == <!--T:144-->
 +
</translate>
 +
<translate><!--T:145--> The following questions frequently appear on our talk page.</translate>
 +
<translate><!--T:187--> Please check this list before posting about them on the talk page or use the existing talk topic, if available, to receive clarifications.</translate>
 +
 +
<translate>
 +
==== '''''Q: How do I customise the main menu of the Minerva skin?''''' ==== <!--T:146-->
 +
 +
<!--T:147-->
 +
A: This is [[phab:T65459|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?''''' ==== <!--T:148-->
 +
 +
<!--T:149-->
 +
A: You can do this by editing the template file for the skin (currently <code>include/skins/minerva.mustache</code>). See this [[Topic:Teh93e4dqmruxlms|discussion]] for details.
 +
 +
==== '''''Q: The extension I am using doesn't seem to work on MobileFrontend. Why?''''' ==== <!--T:150-->
 +
</translate>
 +
<translate><!--T:151--> A: It's likely the extension is old and needs to add compatibility to MobileFrontend.</translate>
 +
<translate><!--T:188--> Please contact the developer of the extension and point them to [[<tvar|1>ResourceLoader/Writing a MobileFrontend friendly ResourceLoader module</>|ResourceLoader/Writing a MobileFrontend friendly ResourceLoader module]].</translate>
 +
<translate><!--T:189--> Please do not post to the talk page, as in this case it would be better to file a bug on [[phab:|Phabricator]] (you can login using your MediaWiki.org username) for a quicker response.</translate>
 +
 +
<translate>
 +
==== '''''Q: I upgraded MobileFrontend and now I'm getting a fatal exception!''''' ==== <!--T:152-->
 +
</translate>
 +
<translate><!--T:153--> A: You are probably using incompatible versions of MobileFrontend and MediaWiki.</translate>
 +
<translate><!--T:190--> In most cases, we can't help you here.</translate>
 +
<translate><!--T:191--> Try upgrading MobileFrontend or MediaWiki to resolve your issue.</translate>
 +
 +
<translate>
 +
==== '''''Q: After upgrading MediaWiki I'm getting an exception wgMFDefaultSkinClass is not setup correctly.''''' ==== <!--T:154-->
 +
</translate>
 +
<translate><!--T:155--> A: MobileFrontend currently assumes you have the <tvar|1>{{ll|Skin:Minerva Neue|nsp=0}}</> skin installed.</translate>
 +
<translate><!--T:192--> If you don't you'll need to install this or configure your mobile skin [[<tvar|2>#Setup a skin</>|per instructions above]].</translate>
 +
 +
<translate>
 +
== For Extension Developers == <!--T:82-->
 +
 +
<!--T:105-->
 +
By default resource modules in extensions will not be loaded in mobile view.
 +
 +
<!--T:106-->
 +
Should a module need to be loaded while in mobile view [[<tvar|1>Special:MyLanguage/ResourceLoader/Writing a MobileFrontend friendly ResourceLoader module</>|this guide on writing MobileFrontend friendly modules]] will be of help.
 +
 +
== See also == <!--T:83-->
 +
</translate>
 +
* {{ll|Compatibility/Software for using MediaWiki#Mobile browsers|2=<translate><!--T:107--> Mobile web browsers supported by MobileFrontend</translate>}}
 +
* {{ll|Extension:TextExtracts}}
 +
* [http://noc.wikimedia.org/conf/highlight.php?file=mobile.php <translate><!--T:108--> Wikimedia's MobileFrontend configuration file</translate>]
 +
* [[Commons:Category:MediaWiki extension MobileFrontend]]
 +
 +
<translate>
 +
==References== <!--T:135-->
 +
</translate>
 +
<references/>
 +
 +
{{OnWikimedia}}
 +
 +
[[Category:MobileFrontend{{#translation:}}| ]]

Version du 2 mars 2021 à 05:14


Présentation de Nous Aurons, le jeu vidéo. <languages /> Modèle:Extension <translate> The MobileFrontend extension:

  • Creates a separate mobile site for your mobile traffic,</translate>

<translate>

    • System administrators are able to provide a different skin, e.g. [[<tvar|1>Special:MyLanguage/Skin:Minerva Neue</>|Skin:Minerva Neue]].</translate>

<translate>

  • provides various content transformations to make your content more friendly,</translate>

<translate>

    • Notably section collapsing and content re-arrangement and removal, including putting the lead paragraph above the lead photo or info box, even if the lead paragraph is below them in the page's source code.</translate>

<translate>

  • simplifies mobile footer and adds a desktop/mobile site link,</translate>

<translate>

<translate>

<translate>

  • provides a beta mode with a feature management system for adding experimental features for anonymous users.

</translate>

<translate> 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. </translate>

Modèle:ReadingWebExtension

<translate>

Prerequisites

  • Although MediaWiki does not require it, PHP must have <tvar|mbstring>mbstring</> support for this extension to work (Modèle:Task).

</translate>

<translate> 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.</translate> <translate> The <tvar|1>Modèle:Ll</> extension can be used to style content so that it renders nicely on mobile and desktop. MobileFrontend will not magically fix this for you!</translate>

<translate> In particular, you may want to review your landing page (main page).</translate> <translate> See [[<tvar|1>Special:MyLanguage/Mobile Gateway/Mobile homepage formatting</>|Mobile homepage formatting]].</translate>

<translate>

Installation

</translate>

Modèle:ExtensionInstall

Modèle:Anchor <translate>

Setup 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.</translate>

<translate>

  1. Install the [[<tvar|geodata>Special:MyLanguage/Extension:GeoData</>|GeoData extension]]</translate>
  2. <translate> Run Modèle:Manual</translate>
  3. <translate> In LocalSettings.php add <tvar|nearby>$wgMFNearby = true;</></translate>
  4. <translate> Determine article coordinates:</translate>
    1. <translate> Add location data to your articles by using the coordinates parser function, for example <tvar|coordinates>{{#coordinates:37.786971|-122.399677|primary}}</>.</translate> <translate> For syntax details, see the documentation for <tvar|1>Modèle:Ll</>.</translate>
    2. <translate> Alternatively you can use a separate MediaWiki installation for Nearby by setting <tvar|endpoint>$wgMFNearbyEndpoint</> in your LocalSettings.php file.</translate> <translate> For example, <tvar|url>$wgMFNearbyEndpoint = 'https://en.m.wikipedia.org/w/api.php';</> will use coordinates of English Wikipedia articles.</translate> <translate> The nearby endpoint will be used to find content related to a given location.</translate>

Modèle:Anchor <translate>

Setup a skin

MobileFrontend provides you with a mobile formatted website to go alongside your existing desktop website. You can skin it however you want. </translate>

// <translate nowrap><!--T:195--> Choose one of these and add chosen code to bottom of <tvar|1>LocalSettings.php</> file:</translate>
wfLoadSkin( 'MinervaNeue' );
$wgMFDefaultSkinClass = 'SkinMinerva'; // <translate nowrap><!--T:196--> use Minerva skin</translate> <translate nowrap><!--T:197--> (You need to download and install it separately, otherwise you'll get an exception)</translate>
wfLoadSkin( 'Vector' );
$wgMFDefaultSkinClass = 'SkinVector'; // <translate nowrap><!--T:198--> use Vector skin</translate>
wfLoadSkin( 'Timeless' );
$wgMFDefaultSkinClass = 'SkinTimeless'; // <translate nowrap><!--T:199--> use Timeless skin</translate>

<translate> The following skins are compatible with MobileFrontend:

  • [[<tvar|minerva>Special:MyLanguage/Skin:Minerva Neue</>|Skin:Minerva Neue]] (stable, default on WMF wikis)</translate>

<translate>

  • [[<tvar|vector>Special:MyLanguage/Skin:Vector</>|Skin:Vector]] (default desktop skin, uses an experimental responsive mode for mobile)</translate>

<translate>

  • [[<tvar|timeless>Special:MyLanguage/Skin:Timeless</>|Skin:Timeless]] (experimental skin)

Configuration settings

See <tvar|1>Modèle:Ll</>

Additional tweaks

Get the most out of MobileFrontend by adding these optional compatible extensions: </translate>

  • Modèle:Ll - <translate> Get Special:Nearby and geotag your articles.</translate>
  • Modèle:Ll - <translate> Adds images to search and nearby results.</translate>
  • Modèle:Ll - <translate> Add Visual editing to your mobile experience.</translate>

<translate>

Local customisations

CSS styling

</translate> <translate> To apply CSS to your mobile theme, edit MediaWiki:Mobile.css, the counterpart of [[<tvar|stylesheets>Special:MyLanguage/Manual:Interface/Stylesheets</>|MediaWiki:Common.css]].</translate> <translate> In order for the stylesheet to function you may have to add <tvar|1>mw.loader.using('mobile.site.styles')</> to your <tvar|2>MediaWiki:Mobile.js</>.</translate>

<translate> MobileFrontend does not load the global MediaWiki:Common.css, neither does it load any of the user stylesheets.

More information

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 URL query string: <tvar|useformat>?useformat=mobile</>. For example: <tvar|url>https://en.wikipedia.org/wiki/Chuck_Schuldiner?useformat=mobile</>

If you would like to view the mobile version of a page without enabling the extension across the entire site you can append the string to the URL on that page, too.

Legacy features of 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. </translate>

Modèle:Anchor <translate>

API

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

<translate>

MobileView API

See {{<tvar|1>ll|Extension:MobileFrontend/MobileViewAPI</>|Extension:MobileFrontend/MobileViewAPI}}.

Extended <tvar|parse>action=parse</>

<tvar|1>Modèle:Ll</> accepts extra parameters: </translate>

mobileformat=
<translate> Return rendered page HTML in a mobile format Modèle:MW version-inline.</translate> <translate> Prior to MediaWiki 1.23, you could specify mobileformat=html to output HTML for modern phones or mobileformat=wml to output WML for dumb phones (see mailing list messagefor details).</translate>
noimages
<translate> Disable images in mobile output.</translate>
mainpage
<translate> Apply mobile main page transformations.</translate>

<translate> Example: </translate>

Modèle:ApiEx

meta=siteinfo

<translate> 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 mobileserver key of the general siteinfo information.

For developers/sysadmins

Setup

You may need to run <tvar|1>npm install</> and install php composer to get the precommit hook to run, depending on what you're doing with the extension.

Testing with articles on a foreign wiki (live data)

</translate> <translate> MobileFrontend can now be configured locally to render articles from other MediaWiki instances.</translate>[1] <translate> 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.</translate> <translate> This is not recommended for production usage.</translate>

<translate> The code below will turn your local MediaWiki mobile site into a Wikivoyage viewer: </translate>

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

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

Using the mobile view

WMF sites

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

Non-WMF sites

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. </translate>

Modèle:Note

<translate>

FAQ

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

<translate>

Q: How do I customise the main menu of the Minerva skin?

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 include/skins/minerva.mustache). See this discussion for details.

Q: The extension I am using doesn't seem to work on MobileFrontend. Why?

</translate> <translate> A: It's likely the extension is old and needs to add compatibility to MobileFrontend.</translate> <translate> Please contact the developer of the extension and point them to [[<tvar|1>ResourceLoader/Writing a MobileFrontend friendly ResourceLoader module</>|ResourceLoader/Writing a MobileFrontend friendly ResourceLoader module]].</translate> <translate> 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.</translate>

<translate>

Q: I upgraded MobileFrontend and now I'm getting a fatal exception!

</translate> <translate> A: You are probably using incompatible versions of MobileFrontend and MediaWiki.</translate> <translate> In most cases, we can't help you here.</translate> <translate> Try upgrading MobileFrontend or MediaWiki to resolve your issue.</translate>

<translate>

Q: After upgrading MediaWiki I'm getting an exception wgMFDefaultSkinClass is not setup correctly.

</translate> <translate> A: MobileFrontend currently assumes you have the <tvar|1>Modèle:Ll</> skin installed.</translate> <translate> If you don't you'll need to install this or configure your mobile skin [[<tvar|2>#Setup a skin</>|per instructions above]].</translate>

<translate>

For Extension Developers

By default resource modules in extensions will not be loaded in mobile view.

Should a module need to be loaded while in mobile view [[<tvar|1>Special:MyLanguage/ResourceLoader/Writing a MobileFrontend friendly ResourceLoader module</>|this guide on writing MobileFrontend friendly modules]] will be of help.

See also

</translate>

<translate>

References

</translate>

  1. <translate> See this [<tvar|1>https://www.youtube.com/watch?v=uRQzjN0hBlY&feature=youtu.be</> YouTube demo video]</translate>

Modèle:OnWikimedia

[[Category:MobileFrontend{{#translation:}}| ]]