Output Modifier Events
String Display
These events make it possible to dynamically modify output strings to interpret or add
semantic meaning or markup. Examples include the creation of links to other bugs or
bugnotes, as well as handling urls to other sites in general.
EVENT_DISPLAY_BUG_ID (Chained)
This is an event to format bug ID numbers before being displayed, using the
bug_format_id() API call. The result should be plain-text,
as the resulting string is used in various formats and locations.
Parameters
String: bug ID string to be displayed
Int: bug ID number
Return Value
String: modified bug ID string
EVENT_DISPLAY_EMAIL (Chained)
This is an event to format text before being sent in an email. Callbacks should
be used to process text and convert it into a plaintext-readable format so that
users with textual email clients can best utilize the information. Hyperlinks
and other markup should be removed, leaving the core content by itself.
Parameters
String: input string to be displayed
Return Value
String: modified input string
EVENT_DISPLAY_FORMATTED (Chained)
This is an event to display generic formatted text. The string to be displayed is
passed between hooked callbacks, each taking a turn to modify the output in some
specific manner. Text passed to this may be processed for all types of formatting
and markup, including clickable links, presentation adjustments, etc.
Parameters
String: input string to be displayed
Return Value
String: modified input string
EVENT_DISPLAY_TEXT (Chained)
This is an event to display generic unformatted text. The string to be displayed is
passed between hooked callbacks, each taking a turn to modify the output in some
specific manner. Text passed to this event should only be processed for the most
basic formatting, such as preserving line breaks and special characters.
Parameters
String: input string to be displayed
Boolean: multiline input string
Return Value
String: modified input string
Page Layout
These events offer the chance to create output at points relevant to the overall page
layout of MantisBT. Page headers, footers, stylesheets, and more can be created.
Events listed below are in order of runtime execution.
EVENT_LAYOUT_RESOURCES (Output)
This event allows plugins to output HTML code from inside the
<head> tag, for use with CSS, Javascript, RSS,
or any other similary resources. Note that this event is signaled
after all other CSS and Javascript resources are linked by MantisBT.
Return Value
String: HTML code to output.
EVENT_LAYOUT_BODY_BEGIN (Output)
This event allows plugins to output HTML code immediatly after the
<body> tag is opened, so that MantisBT may be
integrated within another website's template, or other similar use.
Return Value
String: HTML code to output.
EVENT_LAYOUT_CONTENT_BEGIN (Output)
This event allows plugins to output HTML code after the top main
menu, but before any page-specific content begins.
Return Value
String: HTML code to output.
EVENT_LAYOUT_CONTENT_END (Output)
This event allows plugins to output HTML code after any page-
specific content has completed, but before the bottom menu bar
(or footer).
Return Value
String: HTML code to output.
EVENT_LAYOUT_BODY_END (Output)
This event allows plugins to output HTML code immediatly before
the </body> end tag, to so that MantisBT may be
integrated within another website's template, or other similar use.
Return Value
String: HTML code to output.