Changes between Version 2 and Version 3 of MotdPlugin
- Timestamp:
- Mar 2, 2011, 3:17:08 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
MotdPlugin
v2 v3 5 5 == Description == 6 6 7 This plugin allows the system-administrator to display a MOTD on everytrac page. Once the user acknowledge the message, it is no longer shown.7 Unlike 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. 8 8 9 9 For 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. … … 17 17 [http://trac-hacks.org/newticket?component=MotdPlugin&owner=ChristianM new ticket]. 18 18 19 == Download ==19 == Download and Source == 20 20 21 Download the zipped source from [download:motdplugin here] .21 Download 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. 22 22 23 == Source==23 == Configuration == 24 24 25 You can check out MotdPlugin from [http://trac-hacks.org/svn/motdplugin here] using Subversion, or [source:motdplugin browse the source] with Trac. 25 MotdPlugin can be configured with the following options: 26 {{{ 27 [motd] 28 message_file = /data/messag_of_the_day.ini 29 message_dir = /data/motd.d 30 date_format = <reserved for future use> 31 }}} 32 33 message_file 34 * default: /data/motd.ini 35 * location of the file containing the messages to display 36 message_dir 37 * default: /data/motd.d 38 * directory containing HTML-files with messages to display 39 date_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 45 MotdPlugin uses an ini-style file for configuring the messages that should be displayed. 46 {{{ 47 [MsgName] 48 title = <message header> 49 message = <message text (in one line!)> 50 priority = <message priority, for future use> 51 valid_until = <expiration date for message> 52 repeat = <for future use> 53 }}} 54 55 The section name (MsgName) has to be unique within the message file. 56 Format of the expiration date is (currently) "yyyy-mm-dd HH:MM", next version will have a configurable format. 57 26 58 27 59 == Example == 28 60 29 will follow... 61 {{{ 62 [Message1] 63 title = System Maintenance 64 message = Trac services will be unavailable next Friday from 4pm to 6pm! 65 valid_until = 2011-03-04 18:00 66 67 [Message2] 68 title = New version of xxx has been installed 69 valid_until = 2011-03-03 23:59 70 }}} 71 72 The 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 30 74 31 75 == Recent Changes ==