Wikimedia Developer Support

Skin: Lost in "mobile" mode

I inserted the code lines

       } elseif ( $boxName == 'TOOLBOX' ) {
            $html .= $this->getToolboxBox();
        } elseif ( $boxName == 'AD1' ) {
            $tmp_name = isset($wgAdSidebarTopType) ? $wgAdSidebarTopType : 'advertising';
            $html .= $this->getBox( $tmp_name, $wgAdSidebarTopCode );
        } elseif ( $boxName == 'AD2' ) {
            $tmp_name = isset($wgAdSidebarBottomType) ? $wgAdSidebarBottomType : 'advertising';
            $html .= $this->getBox( $tmp_name, $wgAdSidebarBottomCode );
        } elseif ( $boxName == 'LANGUAGES' ) {
            $html .= $this->getLanguageBox();

into function getRenderedSidebar() of the skin MonoBook.

With the placement of the AD1 and AD2 in MediaWiki:Sidebar can be specified the appearance of the advertisement in the sidebar.

This works so far. But in mobile mode it is lost.

What happens there and how to deal with it?

You don’t have to use mobile mode. The timeless skin is mobile friendly…

Use the MobileMenu hook.

This was not my question. It is self-evident, that there are other skins as alternative.
I want to understand what is going on there. As I have investigated and found, there are external resources that are not part of the skin package.
This mechanism of loading more (unknown) resources seems very strange to me.

Thank you for your hint. I didn’t know this hook. But this hook is not used in MonoBook, isn’t it?

It is used by the MinervaNeue skin, which is always used in mobile mode (I presume you mean the interface generated by the extension MobileFrontend). Monobook does not have a mobile menu (and probably does not work well on mobile in general).

My question was not about MinervaNeue.

My question relates to the behavior of MonoBook on mobile devices. During my investigation I noticed that external resources are loaded afterwards (over which I apparently have no influence), which for me is a surprising and incomprehensible behavior. My question is about understanding this strange behavior of the mechanism used in MonoBook.
To understand this, explanations about MinervaNeue do not help.

Even if MonoBook should not be considered as a skin for mobile devices and MinervaNeue offers itself as an alternative. That’s all a different issue.

The focus of my question is clearly to understand how and why MonoBook does the (for the skin installer) uncontrolled reloading of unknown resources and what that means in terms of handling the customization of standard skins.