Extension:CentralNotice

CentralNotice adds the possibility to manage sitenotices from one central wiki.

Installation

 * 1) Download the latest snapshot and extract it to your extensions directory.
 * 2) Run central-auth.sql
 * 3) Add rebuildTemplates.php to your periodic scheduler (cron).
 * 4) Add  to LocalSettings.php
 * 5) The extension should be now active.

Design
The CentralNotice system consists of both campaigns and templates.


 * Template - a single text/css/image that will display at the top of all set wiki pages.
 * Notices - a collection of templates that are set to show at specified percentages.

You can configure as many notices at the same time as you want and each one will show with its configured templates at their own percentages.

''This was used during the 2008 fundraiser when we wanted a new notice to exist only for EN even though it overlapped with another for EN. This highlighted a limitation in the system because the old notice was set to all languages and any new notice would have shown all templates instead of just the new subset.''
 * Preferred - A notice with preferred set will always replace any other notice that happens to have the same language & wiki combo.
 * Locked - A locked notice can not be deleted unless it is unset.
 * Enabled - when rebuildTemplates.php is run, only notices with enabled will be written out.

New Template

 * 1) Load Special:NoticeTemplate
 * 2) Click on the add template link at the bottom of the page.
 * 3) Enter in a name and the raw html for the given notice.
 * 4) If this notice is going to be translated then enclose any text lines with  triple parens.
 * 5) Submit

New Notice

 * Each template has its template definition stored in MediaWiki:Centralnotice-template_name
 * All of its messages are stored below the template def ala MediaWiki:Centralnotice-template_name-dismiss/language_code


 * 1) Load Special:CentralNotice
 * 2) Add a notice with a given start time at the bottom portion of the page and click submit.
 * 3) If this campaign is only run on a specific wiki and or language then select it from the pull downs.
 * 4) Click on the new notice and add the templates you want within this running notice and their respective percentages.
 * 5) If all looks well then set this notice to enabled and it will show at the corresponding time.

Centralized Message Store
It was quickly realized that we were duplicating work when messages were copied over for such strings as Dismiss to each template. Instead of this, the accepted practice to is to use a shared message notice for commonly used messages. Then use the following (only 2 parens) to reference it.


 * If there is a need to only do this for two messages then you might want to use the clone feature at the bottom of any template page.

Addendum

 * Each notice will be as fresh as the last run of rebuildTemplates.php