Extension:MobileFrontend/bn
Support Level: Active Maintenance This extension is actively maintained by the Reader Growth Team with bug fixes and small feature additions. |
মুক্তির অবস্থা: স্থিতিশীল |
|
|---|---|
| বাস্তবায়ন | ব্যবহারকারী ইন্টারফেস, হুক |
| বিবরণ | একটি মোবাইল-বান্ধব দৃশ্য প্রদান করে |
| লেখক(গণ) | |
| সর্বশেষ সংস্করণ | 2.4.1 |
| সামঞ্জস্য নীতি | Snapshots releases along with MediaWiki. Master is not backward compatible. |
| MediaWiki | 1.33+[1] |
| PHP | 5.5.9+ |
|
|
|
|
| লাইসেন্স | গ্নু জেনারেল পাবলিক লাইসেন্স ২.০ অথবা পরবর্তী |
| ডাউনলোড | README |
| উদাহরণ | m.mediawiki.org |
| ট্রানশলেটউইকি.নেট-এ উপলভ্য থাকলে MobileFrontend বর্ধনাংশটি অনুবাদ করুন | |
| Issues | উন্মুক্ত কাজ · বাগ প্রতিবেদন |
মোবাইলফ্রন্টেন্ড এক্সটেনশন:
Features include:
- creates a separate mobile site for your mobile traffic,
- system administrators are able to provide a different skin, e.g. স্কিন:মিনের্ভা নিউ.
- provides various content transformations to make your content more friendly,
- 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.
- simplifies mobile footer and adds a desktop/mobile site link,
- 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.
Prerequisites
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 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!
In particular, you may want to review your landing page (main page). See Mobile homepage formatting.
Installation
- ডাউনলোড করুন এবং আপনার
extensions/ফোল্ডারেরMobileFrontendনামক ডিরেক্টরিতে ফাইল(গুলি) নিন।
Developers and code contributors should install the extension from Git instead, using:cd extensions/ git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/MobileFrontend
- আপনার LocalSettings.php-এর নিচের অংশে নিম্নলিখিত কোড যোগ করুন:
wfLoadExtension( 'MobileFrontend' );
- If necessary configure at your convenience
করা হয়েছে – এক্সটেনশনটি সফলভাবে ইনস্টল করা হয়েছে কিনা তা যাচাই করতে আপনার উইকির Special:Version-এ যান।
Vagrant installation:
- যদি Vagrant ব্যবহার করেন, তাহলে
vagrant roles enable mobilefrontend --provisionসহকারে ইনস্টল করুন
Setup Nearby
Set up a skin
MobileFrontend provides you with a mobile formatted website to go alongside your existing desktop website. You can skin it however you want.
Choose one of these pairs of lines and add them to the bottom of your LocalSettings.php file.
Note that some of these skins might already be getting loaded in LocalSettings.php, in which case those lines do not need to be repeated.
wfLoadSkin( 'MinervaNeue' );
$wgDefaultMobileSkin = 'minerva'; // use Minerva skin (You need to download and install it separately in 1.37 and older, otherwise you'll get an exception)
wfLoadSkin( 'Vector' );
$wgDefaultMobileSkin = 'vector'; // use Vector skin
wfLoadSkin( 'Timeless' );
$wgDefaultMobileSkin = 'timeless'; // use Timeless skin
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)
- Skin:MonoBook
- Skin:Citizen - responsive skin
Configuration settings
All configuration options are detailed in the README.md file.
Additional tweaks
Get the most out of MobileFrontend by adding these optional compatible extensions:
- Extension:GeoData – Get Special:Nearby and geotag your articles.
- Extension:PageImages – Adds images to search and nearby results.
- Extension:VisualEditor – Add Visual editing to your mobile experience.
Local customisations
CSS styling
| মিডিয়াউইকি সংস্করণ: | ≤ 1.40 |
To apply CSS to your mobile theme, edit MediaWiki:Mobile.css, the counterpart of MediaWiki:Common.css.
In order for the stylesheet to function you may have to add mw.loader.using('mobile.site.styles') to your MediaWiki:Mobile.js.
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: ?useformat=mobile. For example: https://en.wikipedia.org/wiki/MediaWiki?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.
API
APIs are provided by the MobileFrontend extension, but long term we expect to deprecate them in favour of Page Content Service. Use these APIs at your own risk. They may disappear (although we will give you sufficient notice when they do)!
Extended action=parse
action=parse accepts extra parameters:
mobileformat=- Return rendered page HTML in a mobile format 1.23+.
mainpage- Apply mobile main page transformations.
Example:
| ফলাফল |
|---|
{
"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\">
...
|
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 mobileserver key of the general siteinfo information.
For developers/sysadmins
Setup
You may need to run 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)
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.
See Extension:MobileFrontend/Configuring browser auto-detection.
$wgMFMobileHeader = 'X-WAP'; or modify your cache (Varnish) header setting, as long as they match.Using Apache (.htaccess or httpd.conf)
To set up a mobile domain, add the following rule to .htaccess or httpd.conf
<IfModule mod_headers.c>
<If "req('Host') =~ /^mobile./i">
RequestHeader set X-Subdomain "mobile"
</If>
</IfModule>
In your hosts file (assuming your desktop site is on localhost):
127.0.0.1 mobile.localhost
In LocalSettings.php:
wfLoadExtension('MobileFrontend');
$wgMFAutodetectMobileView = true;
$wgMobileUrlCallback = fn( $domain ) => "mobile.$domain";
Now if you navigate to mobile.localhost you should see the mobile site.
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.
Q: How do I detect the mobile site in frontend code?
A: Ideally you shouldn't need to do this.
It is preferable to use mw.config.get('skin') or window.matchMedia('(max-width: 1119px)').matches to detect a mobile user.
You can also make use of the stable mw-mf class which is present on the BODY element if the mobile site is active.
If your code makes modifications to content, you may need to update your code to consider MobileFrontend markup by inspecting the DOM for presence of certain elements.
Please note while mw.config.get( 'wgMFMode' ) exists and can be used by extensions as a last resort (for now) it should not be considered stable for use by gadgets.
Q: How do I customise the main menu of the Minerva skin?
A: This is tracked in Phabricator but you can see Extension talk:MobileFrontend/2017#h-MODIFY THE MAIN MENU-2017-01-04T02:24:00.000Z for 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?
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.
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 this guide on writing MobileFrontend friendly modules will be of help.
See also
- Mobile web browsers supported by MobileFrontend
- Extension:TextExtracts
- Commons:Category:MediaWiki extension MobileFrontend
- Extension:MobileDetect
- Extension:Progressive web application – turn any wiki into a mobile app
References
- ↑ :Fatal error: Uncaught ExtensionDependencyError: MobileFrontend is not compatible with the current MediaWiki core (version 1.32.2), it requires: >= 1.33.0.
| এই এক্সটেনশন এক বা একাধিক উইকিমিডিয়া প্রকল্পসমূহ-এ ব্যবহৃত হচ্ছে। সম্ভবত এটির অর্থ হল এক্সটেনশন স্থিতিশীল এবং এই জাতীয় উচ্চ ট্রাফিক ওয়েবসাইটগুলি ব্যবহার করার জন্য যথেষ্ট ভাল কাজ করে। উইকিমিডিয়ার CommonSettings.php এবং InitialiseSettings.php কনফিগারেশন ফাইলগুলিতে এটি কোথায় ইনস্টল হয়েছে তা দেখতে এই এক্সটেনশনের নামটি সন্ধান করুন। নির্দিষ্ট উইকিতে ইনস্টল করা এক্সটেনশন-এর সম্পূর্ণ তালিকা উইকির Special:Version পৃষ্ঠাতে দেখা যাবে। |
| This extension is included in the following wiki farms/hosts and/or packages: |
- Extensions maintained by Reader Teams/bn
- Extensions maintained by Reader Growth/bn
- Extensions maintained by Reader Teams - Active Maintenance/bn
- Stable extensions/bn
- User interface extensions/bn
- Hook extensions/bn
- APIGetAllowedParams extensions/bn
- APIQuerySiteInfoGeneralInfo extensions/bn
- AbuseFilter-builder extensions/bn
- AbuseFilter-generateUserVars extensions/bn
- AfterBuildFeedLinks extensions/bn
- ApiBeforeMain extensions/bn
- ArticleParserOptions extensions/bn
- AuthChangeFormFields extensions/bn
- BeforeDisplayNoArticleText extensions/bn
- BeforePageDisplay extensions/bn
- BeforePageRedirect extensions/bn
- CentralAuthLoginRedirectData extensions/bn
- CentralAuthSilentLoginRedirect extensions/bn
- ChangeTagsListActive extensions/bn
- CustomEditor extensions/bn
- GetCacheVaryCookies extensions/bn
- GetPreferences extensions/bn
- HTMLFileCache::useFileCache extensions/bn
- ListDefinedTags extensions/bn
- LoginFormValidErrorMessages extensions/bn
- MakeGlobalVariablesScript extensions/bn
- ManualLogEntryBeforePublish extensions/bn
- MediaWikiPerformAction extensions/bn
- OutputPageBeforeHTML extensions/bn
- OutputPageBodyAttributes extensions/bn
- OutputPageParserOutput extensions/bn
- PostLoginRedirect extensions/bn
- RecentChange save extensions/bn
- RequestContextCreateSkin extensions/bn
- ResourceLoaderBeforeResponse extensions/bn
- ResourceLoaderSiteModulePages extensions/bn
- ResourceLoaderSiteStylesModulePages extensions/bn
- SkinAddFooterLinks extensions/bn
- SkinAfterBottomScripts extensions/bn
- SpecialPageBeforeExecute extensions/bn
- SpecialPage initList extensions/bn
- TitleSquidURLs extensions/bn
- UserGetDefaultOptions extensions/bn
- GPL licensed extensions/bn
- Extensions in Wikimedia version control/bn
- All extensions/bn
- Extensions used on Wikimedia/bn
- Extensions included in Canasta/bn
- Extensions included in Fandom/bn
- Extensions included in Miraheze/bn
- Extensions included in MyWikis/bn
- Extensions included in ShoutWiki/bn
- Extensions included in Telepedia/bn
- MobileFrontend/bn
