Extension talk:MobileFrontend

Jump to navigation Jump to search

About this board

If you have a feature request just request it here you'll get a much quicker reply :-) We are also around in #wikimedia-mobile if you want a quicker answer!

If you are trying to replicate behaviour you see on Wikimedia sites, please be sure to read through the configuration options before asking a question here.

How to setup Main Page for Mobile

2 (talkcontribs)

Hi all,

How to setup Main Page for Mobile?


Sokote zaman (talkcontribs)
Reply to "How to setup Main Page for Mobile"


Summary by Jdlrobson

This explains how you can circumvent the lack of main menu customisation in MobileFrontend/Minerva skin.

Jackqbox (talkcontribs)
For anyone interested in an personal change of the menu 
edit includes/skins/SkinMinerva.php
  • find
protected function getDiscoveryTools()
  • find the line
// Nearby link (if supported)
  • add above this line
		$menu->insert( 'Upload' )
				$this->msg( 'mobile-frontend-upload-button' )->escaped(),
				SpecialPage::getTitleFor( 'Upload',
					MWNamespace::getCanonicalName( $config->get( 'MFContentNamespace' ) ) )->getLocalUrl() .
				MobileUI::iconClass( 'mf-upload-invert', 'before' ),
					'id' => 'uploadButton',
					'data-event-name' => 'upload',
		$menu->insert( 'ListImages' )
				$this->msg( 'mobile-frontend-listimages-button' )->escaped(),
				SpecialPage::getTitleFor( 'ListFiles',
					MWNamespace::getCanonicalName( $config->get( 'MFContentNamespace' ) ) )->getLocalUrl() .
				MobileUI::iconClass( 'mf-listimages-invert', 'before' ),
					'id' => 'listimagesButton',
					'data-event-name' => 'ListImages',

edit i18n/en.json
  • find the line
"mobile-frontend-random-button": "Random",
  • add below
"mobile-frontend-upload-button": "Upload",
"mobile-frontend-listimages-button": "List Images",
edit extension.json
  • find the line "mobile.mainMenu.icons": {
  • find section

"images": { "anonymous": "resources/mobile.mainMenu.icons/anonymous.svg",

  • add below this line
"upload": "resources/mobile.mainMenu.icons/upload.svg",
"listimages": "resources/mobile.mainMenu.icons/listimages.svg",

allocate the folder resources/mobile.mainMenu.icons
  • add in resources/mobile.mainMenu.icons the required 2 new svg files with the desired icon
  • upload.svg
  • listimages.svg

i have tested this modification at twh4u.ddns.net

Sokote zaman (talkcontribs)


in the Address not found:

For anyone interested in an personal change of the menu edit includes/skins/SkinMinerva.php

please check

i am using mediawiki 1.33

minerva:– (1903d1a)

MobileFrontend: 2.1.0

thanks@Jackqbox (talkcontribs)


Sokote zaman (talkcontribs)


Nicolas NALLET (talkcontribs)

Hi, With which versions of MediaWiki and MobileFrontend have you tested ?


Jackqbox (talkcontribs)

MediaWiki 1.28.0 PHP 5.5.38 (fpm-fcgi) MariaDB 5.5.51-MariaDB

also in older versions ,but i don't have any reference of them anymore. i am focussing right now on 1.28.x There are more easy and fancy menu changes possible like selectable menu items etc , but until now i don't need them. You can see the concept idea of them in an pubic dutch news side NOS . com

-- press pagina's wijzigen --

Aloist (talkcontribs)

Does this work also on Mediawiki 1.31?

Silkwood (talkcontribs)

With MobileFrontend 2.1.0 and MW 1.32 insert:

$menu->insert( 'Upload' )


                                $this->msg( 'mobile-frontend-upload-button' )->escaped(),

                                SpecialPage::getTitleFor( 'Upload')->getLocalUrl() .'#/upload',

                                MobileUI::iconClass( 'mf-upload-invert', 'before' ),


                                        'id' => 'uploadButton',

                                        'data-event-name' => 'upload',



instead. (talkcontribs)

Hi! Thanks for this guide! Just finding trouble with the last part - When you say 'edit extension.json' where are you finding that file? I look in the MobileFront end extension.json but i cannot file mobile.mainMenu.icons in the code, not the folder in the resources folder

Silkwood (talkcontribs)

MobileFrontend extension has changed since 1.32 and mobile.mainMenu.icons disappeared in 1.33

I don't know how to solve the problem so now I have a functioning Upload link without the upload Icon...

We need some help or wait for MinervaNeue to become indipendent from MobileFrontend.



Infobox not showing correctly in MF?

Hardly4you (talkcontribs)

See the screenshot here. The infobox was supposed to be of full width but the border is. Any help will be good to me and will be appreciated. Thanks in advance.

Ammarpad (talkcontribs)

What is the code for the template? I think the problem is more likely from the template. Note that MediaWiki.Common.css is not loaded on MF in case you're relying on anything from there.

Hardly4you (talkcontribs)

Hello @Ammarpad, thanks for taking time to help me with my concern.
The code you requested is:{|class="infobox" style="width:300; float:right; clear:right; font-size:12px; background-color:#FFF5EE; border:1px solid #f98686" |align=center colspan=2 bgcolor=#FAAAAA style=font-size:13px|{{PAGENAME}} |- |align=center colspan=2| |-bgcolor=#FFE4E1 style=vertical-align:top align=left |Developer(s) | |-style=vertical-align:top align=left |Publisher(s) | |-bgcolor=#FFE4E1 style=vertical-align:top align=left |Platform(s) | |-style=vertical-align:top align=left |Release date | |-style=vertical-align:top align=left |Rating(s) | |-bgcolor=#FFE4E1 style=vertical-align:top align=left |Mode(s) | |-style=vertical-align:top align=left |Media | |-bgcolor=#FFE4E1 style=vertical-align:top align=left |Input | |}
And there is no CSS in Common.css.

You can see my wiki [here] for inspection purposes.

Hardly4you (talkcontribs)

Hello everyone, it is urgent, so can anyone help me as fast as possible?

Any help would be awesome.

Reply to "Infobox not showing correctly in MF?"

nomobile tag works in DIV, but not in TABLE

Iantresman (talkcontribs)

I'm using the "nomobile" class which works fine in a surrounding <div class="nombile"> .. <.div>, but did not work in a table element, eg. <table align=center cellpadding=10 style="border-radius: 10px" class="nomobile">

Jdlrobson (talkcontribs)

Feel free to add a table.nomobile class in your MediaWiki:Mobile.css We are hoping to deprecate use of .nomobile in the far far future and provide better ways to style content differently on mobile/desktop. (talkcontribs)


Reply to "nomobile tag works in DIV, but not in TABLE" (talkcontribs)

How I can add some html or javascript code in end of each section? I can't find DOM-structure of page in mobie version.

Reply to "Add code in each section"

Posting replies in threads jumping

Lee Vilenski (talkcontribs)

I hope this the correct place. I use mobile view quite a bit. I've seen recently that a lot of my replies using the automated talk page replies system jumps them to different topics. One such entry is this:https://en.wikipedia.org/w/index.php?title=Wikipedia_talk%3AWikiProject_Football&type=revision&diff=940232185&oldid=940231341 which was clearly supposed to reply to the topic below this. This is at least the third time this week this has happened. Any ideas if this has been raised elsewhere? ~~~~

Masumrezarock100 (talkcontribs)

Weird. I never faced this problem before. CC Jon.

Reply to "Posting replies in threads jumping"

SkinVector: how to move menu from bottom sidebar to hamburger?

B.Shapoval (talkcontribs)

It is better to stay at Vector skin in mobile view. Is there easy way to replace Sidebar menu from bottom of page to hamburger menu as in other skins?

Reply to "SkinVector: how to move menu from bottom sidebar to hamburger?"

Poor image quality on mobile

Blinkingline (talkcontribs)

My images look fine on a desktop, and they even look fine on desktop mode on mobile, but it looks like MFE is rendering images using the thumbnail version of the file. Is there a way to tweak Mobile.css to alter the image path to not use the thumb and just use the regular image path?

Reply to "Poor image quality on mobile"

How can I hide certain parts of the page only from mobile view of Mediawiki?

Happily8 (talkcontribs)

I am using MobileFrontEnd to generate the mobile view.

How can I hide certain elements from mobile view of Mediawiki?

Things like


will completely hide the content both from mobile view and desktop view,

but is there any code that will hide the content only from mobile view?

Nemo bis (talkcontribs)

You can use nomobile class, e.g. <span class="nomobile">hide this</span>. We also used to use noprint, but it was removed.

Happily8 (talkcontribs)

Thank you! Your answer helps me a lot. However it seems that there are two things. <span class="nomobile"> and <span class='nomobile'> Is there any difference between the two? Thank you again!

Nemo bis (talkcontribs)

Two things? I only see one, nomobile.

Happily8 (talkcontribs)

Oh I am sorry, I forgot to put nowiki tag when I put codes in the question. I fixed the question. Thank you!

Nemo bis (talkcontribs)

It's the same thing.

Happily8 (talkcontribs)

Thank you! I could check that the tag can hide texts from mobile view. However, it couldn't hide the whole table. I tried

<span class="nomobile"> {| class="wikitable mw-collapsible mw-collapsed" style="width: 50%;" |- ! title |- |dfsdf |- |}</span>

but it didn't hide the table from mobile. So instead I tried this

{| class="wikitable mw-collapsible mw-collapsed" |- !<span class="nomobile">blahblah</span> |- |<span class="nomobile">kk</span> |}

It worked. But isn't there any way to hide the whole table more simply?

Actually I decided to hide it because the table wasn't collapsed in the mobile. So if the question at https://www.mediawiki.org/wiki/Extension_talk:MobileFrontend#mw-collapsible_not_compatible_with_Mobilefrontend.3F_32385 is resolved, then I might not need <span class="nomobile"> in the first place :)

Edokter (talkcontribs)

You can't put a table inside a span; use <div class="nomobile">...</div> instead.

Blinkingline (talkcontribs)

Weird question, but is there a way to make parts of the main page only show up to Mobile view with a similar div class statement?

Reply to "How can I hide certain parts of the page only from mobile view of Mediawiki?"

MediaWiki:Loginprompt equivalent for mobile

Jidanni (talkcontribs)

What is the MediaWiki:Loginprompt equivalent for mobile? No I do not have access to any PHP files. Jidanni (talk) 11:49, 2 January 2020 (UTC)

Reply to "MediaWiki:Loginprompt equivalent for mobile"