<sect1 id="dev.eventref.output">
	<title>Output Modifier Events</title>

	<sect2 id="dev.eventref.output.display">
		<title>String Display</title>

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

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

			<blockquote>
				<para>
					This is an event to format bug ID numbers before being displayed, using the
					<function>bug_format_id()</function> API call.  The result should be plain-text,
					as the resulting string is used in various formats and locations.
				</para>

				<itemizedlist>
					<title>Parameters</title>
					<listitem><para>String: bug ID string to be displayed</para></listitem>
					<listitem><para>Int: bug ID number</para></listitem>
				</itemizedlist>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>String: modified bug ID string</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

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

			<blockquote>
				<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>
					<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>

		<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">
		<title>Menu Items</title>

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

		<blockquote id="dev.eventref.output.menu.account">
			<title>EVENT_MENU_ACCOUNT (Default)</title>
			<blockquote>
				<para>
					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.
				</para>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>Array: List of HTML links for the user account menu.</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.output.menu.docs">
			<title>EVENT_MENU_DOCS (Default)</title>
			<blockquote>
				<para>
					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.
				</para>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>Array: List of HTML links for the documents menu.</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.output.menu.filter">
			<title>EVENT_MENU_FILTER (Default)</title>
			<blockquote>
				<para>
					This event gives plugins the opportunity to add new links to the issue list
					menu available to users from the 'View Issues' link on the main menu.
				</para>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>Array: List of HTML links for the issue list menu.</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.output.menu.issue">
			<title>EVENT_MENU_ISSUE (Default)</title>
			<blockquote>
				<para>
					This event gives plugins the opportunity to add new links to the issue
					menu available to users when viewing issues.
				</para>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>Array: List of HTML links for the documents menu.</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.output.menu.main">
			<title>EVENT_MENU_MAIN (Default)</title>
			<blockquote>
				<para>
					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.
				</para>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>Array: List of HTML links for the main menu.</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.output.menu.mainfront">
			<title>EVENT_MENU_MAIN_FRONT (Default)</title>
			<blockquote>
				<para>
					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
					'Main' link, and before the 'My View' link.  Hooked events may return multiple
					links, in which case each link in the array will be automatically separated
					with the '|' symbol as usual.
				</para>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>Array: List of HTML links for the main menu.</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.output.menu.manage">
			<title>EVENT_MENU_MANAGE (Default)</title>
			<blockquote>
				<para>
					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.
				</para>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>Array: List of HTML links for the management menu.</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.output.menu.manageconfig">
			<title>EVENT_MENU_MANAGE_CONFIG (Default)</title>
			<blockquote>
				<para>
					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.
				</para>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>Array: List of HTML links for the manage configuration menu.</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.output.menu.summary">
			<title>EVENT_MENU_SUMMARY (Default)</title>
			<blockquote>
				<para>
					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.
				</para>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>Array: List of HTML links for the summary menu.</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

	</sect2>

	<sect2 id="dev.eventref.output.layout">
		<title>Page Layout</title>

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

		<blockquote id="dev.eventref.output.layout.resources">
			<title>EVENT_LAYOUT_RESOURCES (Output)</title>
			<blockquote>
				<para>
					This event allows plugins to output HTML code from inside the
					<literal>&lt;head&gt;</literal> 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.
				</para>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>String: HTML code to output.</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.output.layout.bodybegin">
			<title>EVENT_LAYOUT_BODY_BEGIN (Output)</title>
			<blockquote>
				<para>
					This event allows plugins to output HTML code immediatly after the
					<literal>&lt;body&gt;</literal> tag is opened, so that MantisBT may be
					integrated within another website's template, or other similar use.
				</para>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>String: HTML code to output.</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.output.layout.pageheader">
			<title>EVENT_LAYOUT_PAGE_HEADER (Output)</title>
			<blockquote>
				<para>
					This event allows plugins to output HTML code immediatly after the
					MantisBT header content, such as the logo image.
				</para>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>String: HTML code to output.</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.output.layout.contentbegin">
			<title>EVENT_LAYOUT_CONTENT_BEGIN (Output)</title>
			<blockquote>
				<para>
					This event allows plugins to output HTML code after the top main
					menu, but before any page-specific content begins.
				</para>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>String: HTML code to output.</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.output.layout.contentend">
			<title>EVENT_LAYOUT_CONTENT_END (Output)</title>
			<blockquote>
				<para>
					This event allows plugins to output HTML code after any page-
					specific content has completed, but before the bottom menu bar
					(or footer).
				</para>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>String: HTML code to output.</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.output.layout.pagefooter">
			<title>EVENT_LAYOUT_PAGE_FOOTER (Output)</title>
			<blockquote>
				<para>
					This event allows plugins to output HTML code after the MantisBT
					version, copyright, and webmaster information, but before the
					query information.
				</para>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>String: HTML code to output.</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

		<blockquote id="dev.eventref.output.layout.bodyend">
			<title>EVENT_LAYOUT_BODY_END (Output)</title>
			<blockquote>
				<para>
					This event allows plugins to output HTML code immediatly before
					the <literal>&lt;/body&gt;</literal> end tag, to so that MantisBT may be
					integrated within another website's template, or other similar use.
				</para>

				<itemizedlist>
					<title>Return Value</title>
					<listitem><para>String: HTML code to output.</para></listitem>
				</itemizedlist>
			</blockquote>
		</blockquote>

	</sect2>
</sect1>
