Commons:Wiki Loves Monuments 2012/Mobile banner
This page explains how to setup a Mobile banner for Wiki Loves Monuments 2012.
Intro
[edit]For users using a normal computer, we use the CentralNotice system to make them aware of Wiki Loves Monuments. For mobile users, we have a Wiki Loves Monuments mobile application.
Unfortunately, at the moment there is no CentralNotice-like system available for mobile devices, so we have to fallback to local banners. These banners can only be enabled on a per-language and per-project (though we will only focus on Wikipedia) basis. It's up to the local language Wikipedia community to decide if they want to enable them.
Commons.css
[edit]Edit your MediaWiki:Common.css to hide the banner for normal users (example):
/* Hide the mobile wlm banner on the normal site */ #mf-wlm-banner { display: none; }
Create the banner
[edit]Create a banner template and translate the text; see Sjabloon:Wiki Loves Monuments mobile banner as an example:
<includeonly>{{#ifeq:{{CURRENTMONTH}}|09|</includeonly><div {{#if:{{NAMESPACE}}||id="mf-wlm-banner"}} style="width:100%; background-color:#8E141A; color: white; font-family:helvetica neue, sans-serif; padding: 7px 0;" class="plainlinks"> <div style="float:left; margin-left: 5px"> [[File:Wiki Loves Monuments Logo notext.svg|35px|link=https://play.google.com/store/apps/details?id=org.wikipedia.wlm]]</div> {{clear}} <div style="float:right; margin:-35px 12px 0 0; position:relative; bottom:-7px;"> [[File:WLM phone half.png|25px|link=https://play.google.com/store/apps/details?id=org.wikipedia.wlm]]</div> {{clear}} <div style="text-align:center; margin:-3.8em auto 0; padding:6px 0;font-size:.9em; line-height:.01em"> <span style="font-size: .9em">[https://play.google.com/store/apps/details?id=org.wikipedia.wlm <span style="color: white">Join the photo contest that helps Wikipedia</span>]</span> [https://play.google.com/store/apps/details?id=org.wikipedia.wlm <span style="color: white">»Click here! for the free <span style="font-weight:bold">Android app</span>«</span>]</div> </div><includeonly>}}</includeonly>
Enable it at the main page
[edit]The template contains some logic to only show the banner in September so you can safely add it to your main page in August. You might need to do a dummy (null) edit to update the page in September (See an example on the Dutch Wikipedia).