NOTE: Edit and Attach will be disabled today ...
archive_me1Add my vote for this tag create new tag
, view all tags

Broadcast Message Handling


A broadcast message handling has been added to TWiki's default view template. The idea is to be able to convey an important message to all TWiki users, like for example a scheduled downtime of the server.


  • Add a BROADCASTMESSAGE variable to the TWikiPreferences
  • Add a %BROADCASTMESSAGE% at the beginning of the view.tmpl script
  • Skins can do the same to get this functionality
    • Skin developers: Please take not of this smile
  • If the BROADCASTMESSAGE variable is set to an empty message, nothing is shown. This is the default
  • If the BROADCASTMESSAGE variable is set to a message, it is shown at the top of every TWiki page, like for example:
    NOTE: We will disable edit and attach in one hour for a scheduled server upgrade. Please save your changes now.

Note to Skin developers

You can retrofit your existing view skin. The following is an example using style sheets. Add this to view.myskin.tmpl:

<style type="text/css">
.broadcastmessage {
    background: yellow; display:block;
    border-style:solid;border-width: 2px;border-color:red;
.broadcastmessage strong {color: red}

Then add the NOTE: Edit and Attach will be disabled today ... variable after the #PageTop anchor or after the opening form tag:

<div class="broadcastmessage"> %BROADCASTMESSAGE% </div>


is appreciated. I think this little feature is worthwhile putting into TWiki.

This functionality is useful for the server move which is currently in work; we can add a "please save your changes" message one hour before we turn off editing on the old server. Then we can show a "update is disabled on the old server, visit the new server at (new IP address)" while the DNS propagation is happening.

-- PeterThoeny - 10 Oct 2003

This is now in TWikiAlphaRelease and at Updated also TWikiSkins and SkinDeveloperFAQ.

For Skin developers: Add a %BROADCASTMESSAGE% at the beginning of your view template, and add the following to the "TWiki Platform Settings" of your TWikiPreferences topic:

  • Broadcast message for skins supporting a %BROADCASTMESSAGE% at the top of the page: (IMPORTANT: Set to empty message if not used; #Comment out unused messages)
      NOTE: Edit and Attach will be disabled today between 05:00 PM and 06:00 PM PDT (00:00 to 01:00 GMT) for a scheduled TWiki maintenance

-- PeterThoeny - 12 Oct 2003

A suggestion: Impose to skin authors to embed the %BROADCASTMESSAGE% in their template with already-styled html, so that authors of messages do not have to provide style, as they may conflict with the skin scheme.


<style type='text/css'>
.broadcastmessage {
    background: yellow; display:block;
    border-style:solid;border-width: 2px;border-color:red;
.broadcastmessage strong {color: red}

<div class=broadcastmessage>%<nop>BROADCASTMESSAGE%</div>
So users will only have to add:
   * Set BROADCASTMESSAGE = *NOTE:* Edit and Attach will be disabled today ...

-- ColasNahaboo "Mr CSS :-)" - 12 Oct 2003

Good point Colas. I updated TWikiSkins and this topic to reflect that. XHTMLized your example.

Style sheets can safely be used in most environments. Believe it or not, at my workplace still a considerable percentage of employees are using Netscape 4.7, those users would see just black text on white background!

-- PeterThoeny - 12 Oct 2003

I've just upgraded to TWiki20031108alpha.tar.gz, and every page now starts with "%BROADCASTMESSAGE%" text. I assume that it is not parsed for some reason. Can you advise what to check first?

-- DmitryDiskin - 10 Nov 2003

Please read the note "for Skin developers" I posted on 12 Oct 2003

-- PeterThoeny - 10 Nov 2003

Thanks. The reason of the above problem was an extra space character before '=' sign in my preferences page.

-- DmitryDiskin - 11 Nov 2003

Edit | Attach | Watch | Print version | History: r11 < r10 < r9 < r8 < r7 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r11 - 2003-12-24 - MattWilkie
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2018 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.