Extension:MobileFrontend/Configuration: Difference between revisions
All configuration options are detailed in the README.md file |
mNo edit summary |
||
| Line 7: | Line 7: | ||
<!--T:3--> |
<!--T:3--> |
||
Note that for a simple site adding <tvar name=1><syntaxhighlight lang=php inline>$wgMFAutodetectMobileView = true;</syntaxhighlight></tvar> might be all you need to make it Just Work™. |
Note that for a simple site adding <tvar name=1><syntaxhighlight lang=php inline>$wgMFAutodetectMobileView = true;</syntaxhighlight></tvar> might be all you need to make it Just Work™. |
||
</translate> |
|||
== All configuration options == |
== All configuration options == |
||
All configuration options are details in the [https://github.com/wikimedia/mediawiki-extensions-MobileFrontend#configuration-options README.md file] |
All configuration options are details in the [https://github.com/wikimedia/mediawiki-extensions-MobileFrontend#configuration-options README.md file] |
||
<translate> |
|||
== Configuring mobile browser auto detection == <!--T:4--> |
== Configuring mobile browser auto detection == <!--T:4--> |
||
Revision as of 21:32, 29 January 2022
MobileFrontend supports various configuration options that you can define in LocalSettings.php after calling wfLoadExtension( 'MobileFrontend' ); or require_once "$IP/extensions/MobileFrontend/MobileFrontend.php";.
Note that for a simple site adding $wgMFAutodetectMobileView = true; might be all you need to make it Just Work™.
All configuration options
All configuration options are details in the README.md file
Configuring mobile browser auto detection
See Configuring browser auto-detection
Configuring the main page
Configuring a skin
At time of writing, MobileFrontend is packaged up with the Minerva skin.
You can override this by using the configuration flag $wgMFDefaultSkinClass
By default this is configured to:
// $wgMFDefaultSkinClass = 'SkinVector'; // use Vector skin for your mobile site skin.
// $wgMFDefaultSkinClass = 'SkinTimeless'; // Use Timeless skin for your mobile site skin.
$wgMFDefaultSkinClass = 'SkinMinerva'; // Default - use Minerva as your mobile site skin.
Enable Nearby
MobileFrontend provides the Special:Nearby page with a little configuration. To get this to work a few optional steps are required:
- Due to browser security you will need to be running a secure site over SSL: it is not possible to request a users location over HTTP
- Install GeoData
- Run update.php
- In LocalSettings.php add
$wgMFNearby = true; - Add data to your articles to one or more pages
{{#coordinates:37.786971|-122.399677|primary}}see the documentation for GeoData for syntax details
Alternatively you can use an alien MediaWiki instance for Nearby with the following 2 lines in your LocalSettings. The nearby endpoint will be used to find related content to a given location.
$wgMFNearbyEndpoint = 'http://en.m.wikipedia.org/w/api.php';
$wgMFNearby = true;