Product SiteDocumentation Site

5.3. Output Modifier Events

5.3.1. 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
  • <Integer>: 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_EMAIL_BUILD_SUBJECT (Chained)

This is an event to format the subject line of an email before it is sent.
Parameters
  • <String>: input string for email subject
Return Value
  • <String>: modified subject 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
  • <Boolean>: multiline 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