Fundraising 2011/Styleguide/CentralNotice

http://meta.wikimedia.org/wiki/Help:CentralNotice

The CentralNotice extension is the software mechanism that distributes global messages throughout Wikimedia sites. These messages are widely translated and typically relate to matters that concern the community at large, such as the licensing update, the annual Wikimania events, the 2009 Strategy planning initiative, and the annual fundraisers.

These global banners are all managed on Meta-Wiki, the Wikimedia wiki coordination hub, where the banners are created, scheduled, and translated. This page explains how to manage/administrate these notices.

Explanation of terms
  • banners: these are the things that show up at the top of all of the pages. They’re the HTML/CSS that makes up what you see at the top of the page.
  • campaign: this is a group of banners. A campaign tells when the group of banners runs (start/end date/time), what weight each of its banners get (what percentage it runs at), what projects/languages see it, and what regions of the world see that set of banners.

Don't touch CentralNotice if you don't know what you're doing

edit

See topic.

In all seriousness, please don't mess with the settings if your actions have not been approved and/or you don't really know what you're doing. CentralNotice is a great tool, but it can be easily abused or misused, and you can quickly cause big problems without intending to!

See also
  • CentralNotice – A translation landing page for current CentralNotices.

Basic interface

edit

There are two main special pages used in managing CentralNotices:

  • Special:CentralNotice, which is for managing campaigns
  • Special:NoticeTemplate, which is for managing banners
CentralNotice admin

CentralNotice admin is the main part of the CentralNotice interface. From here, you can control almost every aspect of the CentralNotice system.

Campaigns

edit
  • The CentralNotice admin is located at Special:CentralNotice and can only be used by Meta administrators. On this page, one is immediately presented with a list of campaigns. Each campaign broadcasts a set of banners for a specified time period across a specified set of Wikimedia sites.
 
  • Each item above links to a page containing details about a given campaign: its start date and end date; which wikis it targeted to; etc.
  • The checkboxes immediately below customize the relative priority and status of the campaign. Campaigns which are preferred are given precedence over other campaigns in situations when a number of global campaigns are on a rotation. If we wish to get rid of the campaign altogether, we can select "Remove". (However, we need to make sure that the campaign isn’t “Locked” before we do this. Campaigns are locked to prevent accidental removals.) When we are done, click "Submit" at the very bottom of the page.
  • The campaign below is enabled, but not preferred or locked.
 
  • To create a new campaign, scroll to the bottom of the page and fill in the following form. The checkbox options are filled-in and altered later.
 

Banners

edit

Each campaign is assigned banners. Banners actually carry the message text, whereas the campaigns are topical categories for the banners.

 

If we click on a banner link, we are led on to another page from which we can edit the banner and insert translations of the message text. In 2010_JA1_Banner2, we see the following directly below the Preview:

 

Further down, we see the raw code for a banner – its look, color, size, and where formatting is applied. It is inadvisable to edit the text in this box without purpose and without having a good knowledge of CSS.

 

If we wish to assign more banners to a campaign, we can return to the campaign's main page, tick "Add" for the banners we want under "Available banners", and click submit at the bottom of the page.

 

If we wish to create an entirely new banner, we go to the top of Special:CentralNotice, click "Banners", scroll to the bottom, and click "Add a banner":

 

Bottom of Special:NoticeTemplate

 

From Special:NoticeTemplate, we are also able to view, click on, and remove all banners currently available.

edit

 

There are several options which can be set for banners.

"Display to Anonymous/Logged in users" is fairly self-explanatory.

"This is a fundraising banner" - this will class the banner as a fundraising banner, so that it is hidden if the correct cookie is set (e.g. if a reader has clicked close, or donated and seen the thank you page).

"Automatically create wikimediafoundation.org landing page link" - for banners with a landing page on wikimediafoundation.org, this can be used to automatically generate the links without requiring extra javascript in the banner. It can select randomly from a list of base landing pages, and sends every click through the LandingCheck extension for localisation. It also automatically passes the correct campaign and banner name for tracking, so there's no need to set these manually for every banner (less chance for mistakes).

When creating/editing a banner, tick the "This is a fundraising banner" checkbox under Settings. Then enter the base landing page names to use, separating with commas if there's more than one e.g. "WMFJA1,WMFJA2,WMFJA3". Edit the banner code to include a link with id="cn_fundraising_link", which is where the magic will happen.

Remember: most standard banners should link to donate wiki now, which requires this box to be unchecked. Also every link using this system goes through LandingCheck. So don't forget to always create a /en default page, and to watch out for Category 1 chapters.

Testing

edit

You can test-load any banner on any wiki by adding ?banner=<bannername> to the end of the URL. You can simulate loading a wiki page from any country (to test campaign geotargeting) by adding ?country=<countrycode> to the end of the URL. (Use the 2-letter ISO 3166-1 code.)

Checklists

edit

Broader checklist

edit
Pre-launch
  • Set up necessary campaigns in CN, making sure all the settings are correct and checking weights of banners. (Be sure to log your changes!)
  • If possible, launch campaign on testwiki (“test”) first
  • Verify each banner using force banner (?banner=bannername) on a local project that it is going to be running on. Be sure to check the look and click on links.
  • Using force banner, check all banners noticing and/or fixing any differences
  • If you are only displaying notices to anonymous users, verify that they aren't displaying to logged in users. (And vice versa.)
  • Test hide button on all banners
Check banners on the following browsers
  • IE 6/7
  • Chrome (Current)
  • Firefox (Current)
  • IE (Current)
  • Safari (Current)
  • Opera (Current)
  • iPhone/Pad and related i-gadgets
Post-launch

Regardless of where banner is targeted:

  • Check enwiki - flagship product, don't break it
  • Check dewiki - hauptprodukt, nicht brechen =) Also, their layout is sometimes different
  • Check arwiki - RTL
  • Check hewiki - RTL
  • Check ruwiki - occasionally different layout

Deployment

edit

Once a banner is configured in the CentralNotice system, it is up to the user to make sure it looks correct across all of our supported browsers. There are currently four steps to verifying any one banner.

  1. After saving your HTML/CSS/js use the inline preview to verify that the content is as it should be. Having multiple browsers to test with is extremely important as we have a diverse set of users who use both IE6+, Firefox2+ and many others.
  2. If the inline preview looks okay, then select the option labeled "Preview" all available translations of banner. If you have any translations other than English, you should see them now. Pay close attention to spacing and text that is too long and adjust either the messaging or HTML/CSS to accommodate it as best as possible.
  3. Add the banner to the rotation on test.wiki by taking your creation and adding it to the test campaign
  • You should then be able to see your new banner on test.wiki. (You may need to do a hard refresh to see the new banner since the banner list is cached.) Just as before, test with a full suite of browsers to see how the notice does with actual page content. Make sure that no styling within the body of the message overrides the styling of the page text.
4. If all has gone well, you're likely ready to push it into production. Please clear any messaging that is to go out with their respective communities before enabling anything. Having gotten the correct approval, add your banner to the correct campaign and load it on the project in question. While it may seem like you have already validated your banner both in preview and on test, there are still CSS quirks that show up in each project. These have to be dealt with on a case by case basis.

Do not rely on the NoticeTemplate view to be an accurate representation of the banner. The only way to see a correct preview is to use the banner force mechanism on the project in question (add ?banner=bannername to the end of any page url. If the page url already has a ? in it use & instead "&banner=bannername" )

Logging

edit
NEEDS UPDATING

Unfortunately, CentralNotice does not have a built-in logging functionality. As a result, you should log any changes that you make to running campaigns at CentralNotice/Log. This includes changes to: the enabled status of the campaign, start and end dates, banners in a campaign, the projects/languages/countries of a campaign, banner weights, etc.

Even if something has a history page, still log exactly what was running when. This includes the code making up each banner and the text/translations for each banner, as these are all MediaWiki messages that have a history page.

Tips

edit

General

edit
  • Link to a page to translate the banner; it's best to have that be a subpage of CentralNotice (see the others for examples).
    • However, if this banner is being shown to all readers (logged-in and anonymous), it's best to omit that link. (Vandalism frequently occurs in these cases, and we don't want bad words showing at the top of all of our wikis.)
  • Links are necessary, but remember that we can't use wikitext, so be sure to use <a href= instead.

Using {{SITENAME}} in a banner

edit

If the banner is supposed to be showing up on all wikis, you should avoid using a project name (i.e. just use "Wikimedia" or "Wikimedia Foundation" or whatever). However, if you need to name the project, you should use {{SITENAME}}.

In translations, you'll need to work with the translators to make sure that {{SITENAME}} works properly in the language. The best way to do this is with the {{GRAMMAR:}} magic word, if that language supports it. However, most languages do not, so you need to use the {{#switch:}} ParserFunction.

Example

{{#switch:{{SITENAME}}
|Wikipedia|Wikipedia in local language=Wikipedia grammatically correct
|Wiktionary|Wiktionary in local language=Wiktionary grammatically correct
|... etc
|#default=Wikimedia grammatically correct
}}

Chapter campaign setup

edit

For chapter websites without the landing check extension, when using multiple landing pages and multiple banners, a separate banner should be created for each LP type. Each banner can then have a localised URL option for each language of the landing page. Currently there is no automated way of doing this.

See example: http://meta.wikimedia.org/w/index.php?title=Special:NoticeTemplate/view&template=B_JW_Footer_WM_HU

Helpful user scripts

edit

There are a couple of user scripts that have been written to make working with CentralNotice easier.

User:Pgehres_(WMF)/centralnotice.js
This affects individual campaign pages. It hides the list of banners by default (can be shown by clicking), and also lists the selected languages and countries on the right of the page for QA/sanity check purposes.
User:Pcoombe_(WMF)/cnDeluxe.js
This script includes a number of functions:
  • Modify page titles in CentralNotice to be more meaningful (including banner/campaign names) so that it is easier to work with multiple tabs open.
  • On "Manage campaigns" page: add link at bottom to disable all campaigns in an emergency.
  • On campaign pages: add multiple selection options below geotargeting box.
  • On campaign pages: add link in header to related log entries.
  • On banner pages: add link in header to test banner on English Wikipedia.


The scripts can be installed by adding the following to Special:MyPage/common.js

if ( wgCanonicalSpecialPageName == "CentralNotice" ) {
    importScript('User:Pgehres_(WMF)/centralnotice.js');
}
 
if ( wgCanonicalSpecialPageName == "CentralNotice" || wgCanonicalSpecialPageName == "NoticeTemplate" || wgCanonicalSpecialPageName == "BannerAllocation" || wgCanonicalSpecialPageName == "CentralNoticeLogs" ) {
    importScript('User:Pcoombe_(WMF)/cnDeluxe.js');
}