Extension talk:DismissableSiteNotice/Archive

Can install directions be included for those of us who are just marginally capable of adding extensions to our wikis? :) --PurplePopple 00:16, 29 December 2007 (UTC)

Increment ID of MediaWiki:Sitenotice
Hello, after installation of this Extension i added text to MediaWiki:Sitenotice. I sucessully clicked the dissmiss -link at the top right, but i now do not know how to add another Sitenotice? If a add MediaWiki:Sitenotice 2 it is not displayed at the top of the page. So, can any1 answer the question how to add a new Sitenotice if the user dismissed the first one?

Thanks in advance kind regards TurboKanne


 * No, that's not how you do it. You edit MediaWiki:Sitenotice on your wiki as normal, add the new notice there and whatever you like. Then you go to MediaWiki:Sitenotice id on your wiki and increment the number there by one. For example, if it is 1, you replace the number 1 by the number 2 and then everyone will see your new sitenotice. -- Sayuri 12:16, 3 February 2008 (UTC)


 * Thanks, now i understood. I thought i have to replace the "id" by an incremental number. this was what confudes me. i checked it with your help and it works great. Thanks a lot for your quick response.
 * kind regards
 * TurboKanne

An alternative to MediaWIki:Sitenotice_id
Change the one line of extension code:
 * $id = intval( $wgMajorSiteNoticeID ) . "." . intval( wfMsgForContent( 'sitenotice_id' ) );

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

This should eliminate the need for the "sitenotice_id" message entirely by calculating a checksum-like value and using it to force the redisplay of the sitenotice whenever its content is changed in any manner. --Carlb 21:37, 24 March 2008 (UTC)