Changes between Version 2 and Version 3 of MotdPlugin


Ignore:
Timestamp:
Mar 2, 2011, 3:17:08 PM (13 years ago)
Author:
Christian Masopust
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MotdPlugin

    v2 v3  
    55== Description ==
    66
    7 This plugin allows the system-administrator to display a MOTD on every trac page. Once the user acknowledge the message, it is no longer shown.
     7Unlike the NewsFlashMacro, this plugin allows the system-administrator to display a MOTD on ''every'' trac page. Once the user acknowledge the message, it is no longer shown.
    88
    99For a system-admin it was always hard to inform every trac user about upcoming system updates, maintenance periods, hardware changes or whatever. With this plugin it's now possible to display such message(s) to every trac page, even when having many projects, by simply editing 1 (one!!) textfile.
     
    1717[http://trac-hacks.org/newticket?component=MotdPlugin&owner=ChristianM new ticket].
    1818
    19 == Download ==
     19== Download and Source ==
    2020
    21 Download the zipped source from [download:motdplugin here].
     21Download the zipped source from [download:motdplugin here], check out MotdPlugin from [http://trac-hacks.org/svn/motdplugin here] using Subversion, or [source:motdplugin browse the source] with Trac.
    2222
    23 == Source ==
     23== Configuration ==
    2424
    25 You can check out MotdPlugin from [http://trac-hacks.org/svn/motdplugin here] using Subversion, or [source:motdplugin browse the source] with Trac.
     25MotdPlugin can be configured with the following options:
     26{{{
     27[motd]
     28message_file = /data/messag_of_the_day.ini
     29message_dir = /data/motd.d
     30date_format = <reserved for future use>
     31}}}
     32
     33message_file
     34 * default: /data/motd.ini
     35 * location of the file containing the messages to display
     36message_dir
     37 * default: /data/motd.d
     38 * directory containing HTML-files with messages to display
     39date_format
     40 * default: yyyy-mm-dd HH:MM
     41 * allows configuration of the date-format for parameter ''valid_until''
     42
     43=== motd.ini file ===
     44
     45MotdPlugin uses an ini-style file for configuring the messages that should be displayed.
     46{{{
     47[MsgName]
     48title = <message header>
     49message = <message text (in one line!)>
     50priority = <message priority, for future use>
     51valid_until = <expiration date for message>
     52repeat = <for future use>
     53}}}
     54
     55The section name (MsgName) has to be unique within the message file.
     56Format of the expiration date is (currently) "yyyy-mm-dd HH:MM", next version will have a configurable format.
     57
    2658
    2759== Example ==
    2860
    29 will follow...
     61{{{
     62[Message1]
     63title = System Maintenance
     64message = Trac services will be unavailable next Friday from 4pm to 6pm!
     65valid_until = 2011-03-04 18:00
     66
     67[Message2]
     68title = New version of xxx has been installed
     69valid_until = 2011-03-03 23:59
     70}}}
     71
     72The first example should be selfexplaining. In the second example there is the ''message'' parameter missing! In that case MotdPlugin searches for a file named ''Message2.html'' in the directory specified by ''message_dir'' in trac.ini and displays the complete content of this file.
     73
    3074
    3175== Recent Changes ==