| 1 | = Note boxes with icons = |
| 2 | [[PageOutline(2-5,Contents,pullout)]] |
| 3 | |
| 4 | == Description == |
| 5 | |
| 6 | The !NoteBox macro will render an HTML-!DivContainer in different colors with different Icons. The following containers are possible: |
| 7 | |
| 8 | * ![[NoteBox(warn, my Text)]] |
| 9 | * will render a red div-container with the given Text and a stopsign-image |
| 10 | * ![[NoteBox(tip, my Text)]] |
| 11 | * will render a green div-container with the given Text and a lightbulb-image |
| 12 | * ![[NoteBox(note, my Text)]] |
| 13 | * will render a blue div-container with the given Text and a notepaper-image |
| 14 | |
| 15 | It will look like this: |
| 16 | [[Image(notebox_preview_v0.1.png)]] |
| 17 | |
| 18 | The [http://trac.edgewall.org/browser/tags/trac-0.11/trac/wiki/api.py?marks=118-139#L118 parse_args] function from the Trac API is used to parse the input, therefore commas must be escaped with a backslash. That is, make the following replacement: `,` -> `\,`. Everything in the second argument is interpreted as wiki markup, however a second macro cannot be embedded within the macro. |
| 19 | |
| 20 | See also: WikiExtrasPlugin |
| 21 | |
| 22 | == Bugs/Feature Requests == |
| 23 | |
| 24 | Existing bugs and feature requests for NoteBoxMacro are |
| 25 | [report:9?COMPONENT=NoteBoxMacro here]. |
| 26 | |
| 27 | If you have any issues, create a |
| 28 | [http://trac-hacks.org/newticket?component=NoteBoxMacro&owner=rjollos new ticket]. |
| 29 | |
| 30 | == Download / Source == |
| 31 | |
| 32 | Download the zipped source from [download:noteboxmacro here]. |
| 33 | |
| 34 | You can check out NoteBoxMacro from [/svn/noteboxmacro here] using Subversion, or [source:noteboxmacro browse the source] with Trac (the anchor will only be present in Trac 0.12 or later, so you'll have to scroll to the appropriate location the page in earlier version of Trac. |
| 35 | |
| 36 | == Installation == |
| 37 | |
| 38 | For detailed installation steps, please refer to t:TracPlugins. The following steps should work for most Trac configurations. |
| 39 | |
| 40 | 1. Unzip the code and type |
| 41 | {{{ |
| 42 | $>python setup.py install |
| 43 | }}} |
| 44 | 2. or use {{{easy_install}}} as below then, restart web server, finally enable it at {{{admin/general/plugins}}} |
| 45 | {{{ |
| 46 | #!sh |
| 47 | easy_install http://trac-hacks.org/svn/noteboxmacro/0.11 |
| 48 | }}} |
| 49 | |
| 50 | If the plugin is installed and functioning correctly, you should see example of its use at WikiMacros#NoteBox-macro. |
| 51 | |
| 52 | == Example == |
| 53 | |
| 54 | Use either |
| 55 | * '''![[NoteBox(warn, my Text)]]''' |
| 56 | * '''![[NoteBox(tip, my Text)]]''' |
| 57 | * '''![[NoteBox(note, my Text)]]''' |
| 58 | where ''my Text'' can be replaced with your text. |
| 59 | |
| 60 | == Recent Changes == |
| 61 | |
| 62 | [[ChangeLog(noteboxmacro, 3)]] |
| 63 | |
| 64 | == Author/Contributors == |
| 65 | |
| 66 | '''Author:''' [wiki:gruenebe] [[BR]] |
| 67 | '''Maintainer:''' rjollos [[BR]] |
| 68 | '''Contributors:''' |