Is it possible to add a Log In link into the side menu? I tried using the Skin:Minerva_Neue/Hooks/MobileMenu but wasn't having any luck.
I am not using Extension:MobileFrontend if that makes any difference. And I do not wish to install it either.
Is it possible to add a Log In link into the side menu? I tried using the Skin:Minerva_Neue/Hooks/MobileMenu but wasn't having any luck.
I am not using Extension:MobileFrontend if that makes any difference. And I do not wish to install it either.
Indeed it is done through this hook. Here is the code that does it on Wikimedica:
$wgHooks['MobileMenu'][] = function ( $name, \MediaWiki\Minerva\Menu\Group &$group )
{
if ( $name == 'discovery' )
{
$group = new \MediaWiki\Minerva\Menu\Group( 'p-navigation' );
$group->insertEntry( new \MediaWiki\Minerva\Menu\Entries\HomeMenuEntry(
'home',
wfMessage('mobile-frontend-home-button')->text(),
\Title::makeTitle(NS_MAIN, 'Accueil')->getLocalUrl()
) );
$group->insert( 'À propos' )->addComponent(
'À propos',
\Title::makeTitle(NS_PROJECT, 'À_propos')->getLocalUrl(),
//MobileUI::iconClass( 'mf-upload-invert', 'before' ),
);
$group->insert( 'FAQ' )->addComponent(
'FAQ',
\Title::makeTitle(NS_PROJECT, 'FAQ')->getLocalUrl(),
//MobileUI::iconClass( 'mf-upload-invert', 'before' ),
);
$group->insert( 'Gestion' )->addComponent(
'Gestion',
\Title::makeTitle(NS_PROJECT, 'Accueil')->getLocalUrl(),
//MobileUI::iconClass( 'mf-upload-invert', 'before' ),
);
}
else if($name == 'sitetools')
{
$group->insert( 'Contribuer' )->addComponent(
'Contribuer',
\Title::makeTitle(NS_PROJECT, 'Contribuer')->getLocalUrl(),
//MobileUI::iconClass( 'check', 'before' ),
);
$group->insert( 'Aide' )->addComponent(
'Aide',
\Title::makeTitle(NS_HELP, 'Accueil')->getLocalUrl(),
//MobileUI::iconClass( 'help', 'before' ),
);
$group->insert( 'Poser une question' )->addComponent(
'Poser une question',
\Title::makeTitle(NS_HELP, 'Forum')->getLocalUrl(),
//MinervaUI::iconClass( 'speechBubbles', 'before' ),
);
}
else if($name == 'sitelinks')
{
$group = new \MediaWiki\Minerva\Menu\Group( 'sitelinks');
$group->insert( 'Conditions d\'utilisation' )->addComponent(
'Conditions d\'utilisation',
\Title::makeTitle(NS_PROJECT, 'Conditions d\'utilisation')->getLocalUrl()
);
}
};
I could not get the icons to work though.