Jump to content

Topic on Extension talk:MobileFrontend

How to show navbox by default?

11
Summary by Jdlrobson

Configure $wgMFRemovableClasses. See README.md in MobileFrontend for more information

Deletedaccount4567435 (talkcontribs)

Users on my site does not care about style at all. They want navbox show as default in MobileFrontend (Skin:Minerva). What can I do to enable the display of navbox?

Navbox disappear after Upgrade MobileFrontend to 1.30 with the Mediawiki system.

Jmarchn (talkcontribs)

Same problem with my wiki. Finally I disabled MobileFrontend. Sniff!

Jdlrobson (talkcontribs)

Configure $wgMFRemovableClasses

Jmarchn (talkcontribs)

I try to solve this problem according your instructions. But nothing... the navbox not appears!.

I read Reading/Web/Projects/Performance/Inlining CSS, and try to recreate its steps in my wiki... nothing. Moreover, I believe that in this article exists repeated errors in the code:

$wgMFRemovableClasses = array(

       'stable' => array(),

       'beta' => array( '.references','.navbox' ),

} <--ERROR -> correct ");"

$wgMFLazyLoadImages = array( ...

README.md does not give any relevant information about how to use it.

Jdlrobson (talkcontribs)

Is this a public wiki? If so maybe I can help debug.

To check if wgMFRemovableClasses is working you should check the source code of the HTML to see if the navbox is present. If it is they may be hidden by a css rule in which case you'll need to override it inside MediaWiki:Mobile.css. the current version of Minerva hides navboxes in mobile mode but displays them in desktop. Still working hard to get them presenting nicely on a mobile screen.

Jdlrobson (talkcontribs)

LazyLoading images should have nothing to do with navboxes.

Lady G2016 (talkcontribs)

I have tried several ways to configure $wgMFRemovableClasses, but nothing would work.

I am testing an implementation which uses CSS classes to differentiate between desktop and mobile users.

To help others, I have posted my prototype Lua module and complete documentation here: Module:User:Lady G2016/NavboxMobile

Both the desktop (Module:Navbox) and mobile (Module:NavboxMobile) modules are called from the same Template:Navbox. Two templates will be seen by the browser, but only the relevant template (mobile or desktop) will be displayed.

I am using MedaWiki 1.27.4 (Long-Term Support) and MobileFrontEnd 1.0.0 (29 June 2016).

Jmarchn (talkcontribs)
Lady G2016 (talkcontribs)

I have copied your template to my prototype (test) wiki. The dot separator does appear. The difference is the CSS style.

Extension MobileFrontend depends on the existence of MediaWiki:Mobile.css to render all CSS rules and styles. (Desktop view depends on MediaWiki:Common.css).

Your wiki has no content for MediaWiki:Mobile.css. I think this is your problem. The web browser does not display the dot separator because there is no CSS style property.

I have uploaded an example MediaWiki:Mobile.css page here. Use your wiki's MediaWiki:Common.css to create your own mobile version. I have modified the documentation in Module:User:Lady G2016/NavboxMobile to include the hlist style. See the "Implementation" section of the documentation.

Jmarchn (talkcontribs)

Wonderful!. It's run correctly!. Thanks you very much, @Lady G2016!.