Output Modifiers

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_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_RSS (Chained)

This is an event to format content before being displayed in an RSS feed. Text should be processed to perform any necessary character escaping to preserve hyperlinks and other appropriate markup.

Parameters

  • String: input string to be displayed

  • Boolean: multiline input string

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

Menu Items

These events allow new menu items to be inserted in order for new content to be added, such as new pages or integration with other applications.

EVENT_MENU_MAIN (Default)

This event gives plugins the opportunity to add new links to the main menu at the top (or bottom) of every page in MantisBT. New links will be added after the 'Docs' link, and before the 'Manage' link. Hooked events may return multiple links, in which case each link in the array will be automatically separated with the '|' symbol as usual.

Return Value

  • Array: List of HTML links for the main menu.

EVENT_MENU_MANAGE (Default)

This event gives plugins the opportunity to add new links to the management menu available to site administrators from the 'Manage' link on the main menu. Plugins should try to minimize use of these links to functions dealing with core MantisBT management.

Return Value

  • Array: List of HTML links for the management menu.

EVENT_MENU_MANAGE_CONFIG (Default)

This event gives plugins the opportunity to add new links to the configuration management menu available to site administrators from the 'Manage Configuration' link on the standard management menu. Plugins should try to minimize use of these links to functions dealing with core MantisBT configuration.

Return Value

  • Array: List of HTML links for the manage configuration menu.

EVENT_MENU_SUMMARY (Default)

This event gives plugins the opportunity to add new links to the summary menu available to users from the 'Summary' link on the main menu.

Return Value

  • Array: List of HTML links for the summary menu.

EVENT_MENU_DOCS (Default)

This event gives plugins the opportunity to add new links to the documents menu available to users from the 'Docs' link on the main menu.

Return Value

  • Array: List of HTML links for the documents menu.

EVENT_MENU_ACCOUNT (Default)

This event gives plugins the opportunity to add new links to the user account menu available to users from the 'My Account' link on the main menu.

Return Value

  • Array: List of HTML links for the user account menu.

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_PAGE_HEADER (Output)

This event allows plugins to output HTML code immediatly after the MantisBT header content, such as the logo image.

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_PAGE_FOOTER (Output)

This event allows plugins to output HTML code after the MantisBT version, copyright, and webmaster information, but before the query information.

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.