Open main menu

Extension talk:MobileFrontend

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.

Why is this extension not in core?

1
182.232.0.157 (talkcontribs)

From my experience, it is definitely expected in 2019 from anyone who develops a CMS that people use from smartphone, to be responsive.

As I understand MobileFrontend allows responsivness, I believe it should be included in core.

Reply to "Why is this extension not in core?"

Why "display: table" for hx, etc.?

1
Kghbln (talkcontribs)

On this wiki the headings go berserk in mobile view because of:

.content .mw-parser-output > h1,
.content .mw-parser-output > h2,
.content .mw-parser-output > h3,
.content .mw-parser-output > h4,
.content .mw-parser-output > h5,
.content .section-heading,
.content .in-block {
    display: table;
}

I am not sure where this comes from? Should this be reported and is there a way to prevent this from happening?

Reply to "Why "display: table" for hx, etc.?"

MODIFY THE MAIN MENU

5
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' )
			->addComponent(
				$this->msg( 'mobile-frontend-upload-button' )->escaped(),
				SpecialPage::getTitleFor( 'Upload',
					MWNamespace::getCanonicalName( $config->get( 'MFContentNamespace' ) ) )->getLocalUrl() .
						'#/test',
				MobileUI::iconClass( 'mf-upload-invert', 'before' ),
				[
					'id' => 'uploadButton',
					'data-event-name' => 'upload',
				]
			);
			
		$menu->insert( 'ListImages' )
			->addComponent(
				$this->msg( 'mobile-frontend-listimages-button' )->escaped(),
				SpecialPage::getTitleFor( 'ListFiles',
					MWNamespace::getCanonicalName( $config->get( 'MFContentNamespace' ) ) )->getLocalUrl() .
						'#/test',
				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

Nicolas NALLET (talkcontribs)

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

Thanks

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' )

                        ->addComponent(

                                $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.

Reply to "MODIFY THE MAIN MENU"

Why's this extension not part of core extensions?

1
182.232.39.241 (talkcontribs)

I humbly think it should be... ~~~~

Reply to "Why's this extension not part of core extensions?"
Wolf530 (talkcontribs)

Using MinervaNeue with MW 1.32.2, when the mobile page loads and you tap on the hamburger menu you get nothing - no pop-up.

Reply to "Hamburger menu not working"
46.211.45.135 (talkcontribs)

In mobile version not displayed radiobuttons & checkboxes (they disappear as the page loads). It's with Extension:Quiz. Help me please!

Reply to "Radiobutton & CheckBox"

undefined option: 'ResourceLoaderLESSVars'

2
Sakshale (talkcontribs)

Upgrade, using Softaculous, from 1.31.0 to 1.32.0.


The Site died with following error. "undefined option: 'ResourceLoaderLESSVars'"


Added "$wgResourceLoaderLESSVars = false;" to the end of LocalSettings.php and error disappeared.


@Sakshale

Reedy (talkcontribs)

You should upgrade extensions when you upgrade core. It sounds like you're running MobileFrontend older than your MW Core version

Reply to "undefined option: 'ResourceLoaderLESSVars'"

Is there anyway to detect page in or not in Mobile mode?

1
Zoglun (talkcontribs)

Hi,

We are trying to add JavaScript A when user visiting Desktop page, and add JavaScript B when Mobile page. We can successfully add JS file with BeforePageDisplay hook now. But can't detect the status.

Is there any way to distinguish between Viewing status (some ways to get a if/else statement status ) from Desktop and Mobile?

Thank you!


Reply to "Is there anyway to detect page in or not in Mobile mode?"

New scripts to make it easier to edit Wikipedia using mobile interface

1
PAC2 (talkcontribs)

I've developed some extension to make editing Wikipedia easier using the mobile interface.

My script is available on the English version here https://en.m.wikipedia.org/wiki/User:PAC2/chouette.

The original script is designed for the French version : https://fr.m.wikipedia.org/wiki/Utilisateur:PAC2/chouette.js

Basically it adds links to what links here, move, pageviews, Wikidata, reasonator, etc.

I've another script making it easier to revert contributions : Utilisateur:PAC2/chouette-revert.js

Do you think it would be relevant to add those functionalities natively in the mobile view ?

Reply to "New scripts to make it easier to edit Wikipedia using mobile interface"

Google is mad at one of my pages

1
Renamed user cYe83dBqLD (talkcontribs)

Somehow Google crawled one page and then toggled to the Desktop View version and now is saying my site is not completely mobile-friendly. What do?

Reply to "Google is mad at one of my pages"
Return to "MobileFrontend" page.