Extension:DismissableSiteNotice

The DismissableSiteNotice extension allows users to close the sitenotice, using cookies. When you add a new sitenotice and want everyone to see it, change the number on the created page MediaWiki:Sitenotice id by one (e.g. if it would be 5, you'd replace the page with the number 6 and so on).

Installation

 * 1) Download the files from Git or download a snapshot (select your version of MediaWiki) and place the files under $IP/extensions/DismissableSiteNotice
 * 2) Add to the end of LocalSettings.php:
 * 3) Installation can now be verified through Special:Version on your wiki

Redisplay the sitenotice whenever sitenoticed edited
The default behavior allows the site notice to be updated without forcing people who have dismissed it to see it again. Some sites may not need this as they may never make tweaks, updates or corrections to existing notices.

The below code change redisplays the sitenotice whenever the mediawiki:sitenotice content is edited. This eliminates the need for the "sitenotice_id" message entirely.

In DismissableSiteNotice.php change the one line of extension code:

$id = intval( $wgMajorSiteNoticeID ). "." . intval( wfMsgForContent( 'sitenotice_id' ) );

to:

$id = intval( $wgMajorSiteNoticeID ). "." . crc32( wfMsgForContent( 'sitenotice' ) );