Skip to content

Commit

Permalink
Added example event and description.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
amyreese committed Mar 3, 2008
1 parent 1c7fa8f commit 9de2b0f
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 11 deletions.
79 changes: 76 additions & 3 deletions docbook/developers/en/event-reference-output.sgml
Expand Up @@ -10,11 +10,61 @@
bugnotes, as well as handling urls to other sites in general.
</para>

<blockquote id="dev.eventref.output.display.text">
<title>EVENT_DISPLAY_TEXT (Chained)</title>
<blockquote id="dev.eventref.output.display.email">
<title>EVENT_DISPLAY_EMAIL (Chained)</title>

<blockquote>
<para>This is an event to display generic unformatted text.</para>
<para>
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.
</para>

<itemizedlist>
<title>Parameters</title>
<listitem><para>String Input string to be displayed</para></listitem>
</itemizedlist>

<itemizedlist>
<title>Return Value</title>
<listitem><para>String: Modified input string</para></listitem>
</itemizedlist>
</blockquote>
</blockquote>

<blockquote id="dev.eventref.output.display.formatted">
<title>EVENT_DISPLAY_FORMATTED (Chained)</title>

<blockquote>
<para>
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.
</para>

<itemizedlist>
<title>Parameters</title>
<listitem><para>String Input string to be displayed</para></listitem>
</itemizedlist>

<itemizedlist>
<title>Return Value</title>
<listitem><para>String: Modified input string</para></listitem>
</itemizedlist>
</blockquote>
</blockquote>

<blockquote id="dev.eventref.output.display.rss">
<title>EVENT_DISPLAY_RSS (Chained)</title>

<blockquote>
<para>
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.
</para>

<itemizedlist>
<title>Parameters</title>
Expand All @@ -26,9 +76,32 @@
<title>Return Value</title>
<listitem><para>String: Modified input string</para></listitem>
</itemizedlist>
</blockquote>
</blockquote>

<blockquote id="dev.eventref.output.display.text">
<title>EVENT_DISPLAY_TEXT (Chained)</title>
<blockquote>
<para>
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.
</para>

<itemizedlist>
<title>Parameters</title>
<listitem><para>String Input string to be displayed</para></listitem>
<listitem><para>Boolean Multiline input string</para></listitem>
</itemizedlist>

<itemizedlist>
<title>Return Value</title>
<listitem><para>String: Modified input string</para></listitem>
</itemizedlist>
</blockquote>
</blockquote>

</sect2>

<sect2 id="dev.eventref.output.menu">
Expand Down
43 changes: 35 additions & 8 deletions docbook/developers/en/event-reference.sgml
Expand Up @@ -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.
</para>

<para>
Here we show an example event definition. For each event, the event identifier will be listed
along with the <link linkend="dev.events.types">event type</link> 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).
</para>

<blockquote id="dev.eventref.example">
<title>EVENT_EXAMPLE (Default)</title>

<blockquote>
<para>
This is an example event description.
</para>

<itemizedlist>
<title>Parameters</title>
<listitem><para>&lt;Type&gt;: Description of parameter one</para></listitem>
<listitem><para>&lt;Type&gt;: Description of parameter two</para></listitem>
</itemizedlist>

<itemizedlist>
<title>Return Value</title>
<listitem><para>&lt;Type&gt;: Description of return value</para></listitem>
</itemizedlist>
</blockquote>
</blockquote>

</sect1>

<sect1 id="dev.eventref.plugin">
Expand All @@ -20,19 +50,15 @@
</para>

<blockquote id="dev.eventref.plugin.init">
<title>EVENT_PLUGIN_INIT</title>

<itemizedlist>
<listitem><para>Event Type: Execute</para></listitem>
<listitem><para>Event Parameters: None</para></listitem>
<listitem><para>Expected Return Value: None</para></listitem>
</itemizedlist>
<title>EVENT_PLUGIN_INIT (Execute)</title>

<blockquote>
<para>
This event is triggered by the Mantis plugin system after all registered and enabled
plugins have been initialized (their <code>init()</code> functions have been called).
This event should <emphasis>always</emphasis> be the first event triggered for any
page load.
page load. No parameters are passed to hooked functions, and no return values are
expected.
</para>

<para>
Expand All @@ -48,6 +74,7 @@
<listitem><para>Interacting with other plugins outside the context of pages or events.</para></listitem>
</itemizedlist>
</para>
</blockquote>
</blockquote>
</sect1>

Expand Down

0 comments on commit 9de2b0f

Please sign in to comment.