I wrote a little plugin that afternoon; yeah... quick and dirty, I know, but it should do the job or at least give you some ideas of how to implement something similar.
Mantis version is 1.2.19.
EDIT:
Note: This version of the plugin
does not work properly with Mantis v1.3.0. See below for the required changes for Mantis version 1.3.0.
To use it, do the following:
1) Add the code below to the bottom of your .css-file.
2) Since there were no usable event_signal()'s, I had to add a few lines to the bugnote_view_inc.php. You can just replace bugnote_view_inc.php with the attached version or you can use the attached diff-file.
Note: The attached script is based on the original script of MantisBT version 1.2.19. By using the attached script, any of your changes to bugnote_view_inc.php will be lost.
3) Extract the BugnoteHighlighting folder to the /plugins/ folder and install the BugnoteHighlighting plugin.
By default the highlighting for administrator level is already activated. To "activate" highlighting for other access levels, change the
color_active_[access_level] value to ON (config()-function in /plugins/BugnoteHighlighting/BugnoteHighlighting.php). You can then change the color via the css-classes below.
Code: Select all
tr .bnhl_10 { background-color: #ffffff; }
tr .bnhl_note_10 { background-color: #ffffff; }
tr .bnhl_25 { background-color: #ffffff; }
tr .bnhl_note_25 { background-color: #ffffff; }
tr .bnhl_40 { background-color: #ffffff; }
tr .bnhl_note_40 { background-color: #ffffff; }
tr .bnhl_55 { background-color: #ffffff; }
tr .bnhl_note_55 { background-color: #ffffff; }
tr .bnhl_70 { background-color: #ffffff; }
tr .bnhl_note_70 { background-color: #ffffff; }
tr .bnhl_90 { background-color: #c08603; }
tr .bnhl_note_90 { background-color: #f0a804; }
These are the css-classes for the defaul access-levels of MantisBT (10: viewer, 25: reporter, 40: updater, 55: developer, 70: manager, 90: administrator). You can change the hexadecimal color codes to whatever color you prefer. Note that there are two classes per user access level. The image below explains where the two classes are applied (in this case .bnhl_90 and .bnhl_note_90 for administrator level).
- bnhl_example.png (17.12 KiB) Viewed 20721 times
As I said, quick and dirty, no configuration page or stuff like that.
But it should at least give you an idea. I can think of a few more features to implement, but I don't have the time for that. Feel free to add more features!