From 9de2b0fa7f2f5180b32d82765473df657e9d5c47 Mon Sep 17 00:00:00 2001 From: John Reese Date: Mon, 3 Mar 2008 18:35:44 +0000 Subject: [PATCH] Added example event and description. Added event references for the other display events. git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@5081 f5dc347c-c33d-0410-90a0-b07cc1902cb9 --- .../developers/en/event-reference-output.sgml | 79 ++++++++++++++++++- docbook/developers/en/event-reference.sgml | 43 ++++++++-- 2 files changed, 111 insertions(+), 11 deletions(-) diff --git a/docbook/developers/en/event-reference-output.sgml b/docbook/developers/en/event-reference-output.sgml index df9237e2f6..26789e9482 100644 --- a/docbook/developers/en/event-reference-output.sgml +++ b/docbook/developers/en/event-reference-output.sgml @@ -10,11 +10,61 @@ bugnotes, as well as handling urls to other sites in general. -
- EVENT_DISPLAY_TEXT (Chained) +
+ EVENT_DISPLAY_EMAIL (Chained)
- This is an event to display generic unformatted text. + + 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 @@ -26,9 +76,32 @@ 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 +
+ diff --git a/docbook/developers/en/event-reference.sgml b/docbook/developers/en/event-reference.sgml index 0fcea2452d..7a6ff823ee 100644 --- a/docbook/developers/en/event-reference.sgml +++ b/docbook/developers/en/event-reference.sgml @@ -9,6 +9,36 @@ in the Mantis event system. Each listed event will include details for the event type, when the event is called, and the expected parameters and return values for event callbacks. + + + Here we show an example event definition. For each event, the event identifier will be listed + along with the event type in parentheses. Below that + should be a concise but thorough description of how the event is called and how to use it. + Following that should be a list of event parameters (if any), as well as the expected return + value (if any). + + +
+ EVENT_EXAMPLE (Default) + +
+ + This is an example event description. + + + + Parameters + <Type>: Description of parameter one + <Type>: Description of parameter two + + + + Return Value + <Type>: Description of return value + +
+
+ @@ -20,19 +50,15 @@
- EVENT_PLUGIN_INIT - - - Event Type: Execute - Event Parameters: None - Expected Return Value: None - + EVENT_PLUGIN_INIT (Execute) +
This event is triggered by the Mantis plugin system after all registered and enabled plugins have been initialized (their init() functions have been called). This event should always be the first event triggered for any - page load. + page load. No parameters are passed to hooked functions, and no return values are + expected. @@ -48,6 +74,7 @@ Interacting with other plugins outside the context of pages or events. +