';
Adding non-PHP files, such as images or CSS stylesheets, follows a very
similar pattern as pages. Files should be placed in the plugin's files/
directory, and can only contain a single period in the name. The file's
URI is generated with the plugin_file() function. For our Example plugin,
we'll create a basic CSS stylesheet, and modify the previously shown page
to include the stylesheet:
Example/files/foo.css
p.foo {
color: red;
}
Example/pages/foo.php
Here is a link to page foo.';
echo '',
'
This is red text.
';
Note that while plugin_page() expects only the page's name without the
extension, plugin_file() requires the entire filename so that it can
distinguish between foo.css and a potential file foo.png.
The plugin's filesystem structure at this point looks like this:
Example/
Example.php
pages/
foo.php
files/
foo.css
4.2.3. Events
Plugins have an integrated method for both declaring and hooking events,
without needing to directly call the event API functions. These take the
form of class methods on your plugin.
To declare a new event, or a set of events, that your plugin will
trigger, override the events() method of your plugin class, and return an
associative array with event names as the key, and the event type as the
value. Let's add an event "foo" to our Example plugin that does not
expect a return value (an "execute" event type), and another event 'bar'
that expects a single value that gets modified by each hooked function (a
"chain" event type):
Example/Example.php
EVENT_TYPE_EXECUTE,
'EVENT_EXAMPLE_BAR' => EVENT_TYPE_CHAIN,
);
}
}
When the Example plugin is loaded, the event system in MantisBT will add
these two events to its list of events, and will then allow other plugins
or functions to hook them. Naming the events "EVENT_PLUGINNAME_EVENTNAME"
is not necessary, but is considered best practice to avoid conflicts
between plugins.
Hooking other events (or events from your own plugin) is almost identical
to declaring them. Instead of passing an event type as the value, your
plugin must pass the name of a class method on your plugin that will be
called when the event is triggered. For our Example plugin, we'll create
a foo() and bar() method on our plugin class, and hook them to the events
we declared earlier.
Example/Example.php
'foo',
'EVENT_EXAMPLE_BAR' => 'bar',
);
}
function foo( $p_event ) {
...
}
function bar( $p_event, $p_chained_param ) {
...
return $p_chained_param;
}
}
Note that both hooked methods need to accept the $p_event parameter, as
that contains the event name triggering the method (for cases where you
may want a method hooked to multiple events). The bar() method also
accepts and returns the chained parameter in order to match the
expectations of the "bar" event.
Now that we have our plugin's events declared and hooked, let's modify
our earlier page so that triggers the events, and add some real
processing to the hooked methods:
Example/Example.php
Here is a link to page foo.';
'',
'
';
event_signal( 'EVENT_EXAMPLE_FOO' );
$t_string = 'A sentence with the word "foo" in it.';
$t_new_string = event_signal( 'EVENT_EXAMPLE_BAR', array( $t_string ) );
echo $t_new_string, '
';
When the first event "foo" is signaled, the Example plugin's foo() method
will execute and echo a string. After that, the second event "bar" is
signaled, and the page passes a string parameter; the plugin's bar() gets
the string and replaces any instance of "foo" with "bar", and returns the
resulting string. If any other plugin had hooked the event, that plugin
could have further modified the new string from the Example plugin, or
vice versa, depending on the loading order of plugins. The page then
echos the modified string that was returned from the event.
4.2.4. Configuration
Similar to events, plugins have a simplified method for declaring
configuration options, as well as API functions for retrieving or setting
those values at runtime.
Declaring a new configuration option is achieved just like declaring
events. By overriding the config() method on your plugin class, your
plugin can return an associative array of configuration options, with the
option name as the key, and the default option as the array value. Our
Example plugin will declare an option "foo_or_bar", with a default value
of "foo":
Example/Example.php
'foo',
);
}
}
Retrieving the current value of a plugin's configuration option is
achieved by using the plugin API's plugin_config_get() function, and can
be set to a modified value in the database using plugin_config_set().
With these functions, the config option is prefixed with the plugin's
name, in attempt to automatically avoid conflicts in naming. Our Example
plugin will demonstrate this by adding a secure form to the
"config_page", and handling the form on a separate page "config_update"
that will modify the value in the database, and redirect back to page
"config_page", just like any other form and action page in MantisBT:
Example/pages/config_page.php
Example/pages/config_update.php
name = 'Example'; # Proper name of plugin
$this->description = ''; # Short description of the plugin
$this->page = ''; # Default plugin page
$this->version = '1.0'; # Plugin version string
$this->requires = array( # Plugin dependencies, array of basename => version pairs
'MantisCore' => '1.2.0, <= 1.2.0', # Should always depend on an appropriate version of MantisBT
);
$this->author = ''; # Author/team name
$this->contact = ''; # Author/team e-mail address
$this->url = ''; # Support webpage
}
function events() {
return array(
'EVENT_EXAMPLE_FOO' => EVENT_TYPE_EXECUTE,
'EVENT_EXAMPLE_BAR' => EVENT_TYPE_CHAIN,
);
}
function hooks() {
return array(
'EVENT_EXAMPLE_FOO' => 'foo',
'EVENT_EXAMPLE_BAR' => 'bar',
);
}
function config() {
return array(
'foo_or_bar' => 'foo',
);
}
function foo( $p_event ) {
echo 'In method foo(). ';
}
function bar( $p_event, $p_chained_param ) {
return str_replace( 'foo', 'bar', $p_chained_param );
}
}
4.3.2. Example/files/foo.css
Example/files/foo.cssp.foo {
color: red;
}
4.3.3. Example/lang/strings_english.txt
Example/lang/strings_english.txt
Here is a link to page foo.';
'',
'
';
event_signal( 'EVENT_EXAMPLE_FOO' );
$t_string = 'A sentence with the word "foo" in it.';
$t_new_string = event_signal( 'EVENT_EXAMPLE_BAR', array( $t_string ) );
echo $t_new_string, '
';
4.4. API Usage
--------------
This is a general overview of the plugin API. For more detailed analysis,
you may reference the file core/plugin_api.php in the codebase.
Chapter 5. Events Reference
===========================
5.1. Introduction
-----------------
In this chapter, an attempt will be made to list all events used (or
planned for later use) in the MantisBT 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 types (see Section 3.3,
“Event Types”) 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
*
: Description of parameter one
*
: Description of parameter two
Return Value
*
: Description of return value
5.2. System Events
------------------
These events are initiated by the plugin system itself to allow certain
functionality to simplify plugin development.
EVENT_PLUGIN_INIT (Execute)
This event is triggered by the MantisBT 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. No parameters are
passed to hooked functions, and no return values are expected.
This event is the first point in page execution where all
registered plugins are guaranteed to be enabled (assuming
dependencies and such are met). At any point before this event,
any or all plugins may not yet be loaded. Note that the core
system has not yet completed the bootstrap process when this
event is signalled.
Suggested uses for the event include:
*
Checking for plugins that aren't require for normal usage.
*
Interacting with other plugins outside the context of pages
or events.
EVENT_CORE_HEADERS (Execute)
This event is triggered by the MantisBT bootstrap process just
before emitting the headers. This enables plugins to emit their
own headers or use API that enables tweaking values of headers
emitted by core. An example, of headers that can be tweaked is
Content-Security-Policy header which can be tweaked using
http_csp_*() APIs.
EVENT_CORE_READY (Execute)
This event is triggered by the MantisBT bootstrap process after
all core APIs have been initialized, including the plugin system,
but before control is relinquished from the bootstrap process
back to the originating page. No parameters are passed to hooked
functions, and no return values are expected.
This event is the first point in page execution where the entire
system is considered loaded and ready.
EVENT_LOG (Execute)
This event is triggered by MantisBT to log a message. The
contents of the message should be hyper linked based on the
following rules: #123 means issue 123, ~123 means issue note 123,
@P123 means project 123, @U123 means user 123. Logging plugins
can capture extra context information like timestamp, current
logged in user, etc. This event receives the logging string as a
parameter.
Parameters
*
: the logging string
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
*
: bug ID string to be displayed
*
: bug ID number
Return Value
*
: 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
*
: input string to be displayed
Return Value
*
: 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
*
: input string for email subject
Return Value
*
: 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
*
: input string to be displayed
Return Value
*
: modified input string
*
: 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
*
: input string to be displayed
*
: multiline input string
Return Value
*
: 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
*
: input string to be displayed
*
: multiline input string
Return Value
*
: modified input string
5.3.2. 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_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
*
: List of HTML links for the user account 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
*
: List of HTML links for the documents menu.
EVENT_MENU_FILTER (Default)
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.
Return Value
*
: List of HTML links for the issue list menu.
EVENT_MENU_ISSUE (Default)
This event gives plugins the opportunity to add new links to the
issue menu available to users when viewing issues.
Parameters
*
: bug ID
Return Value
*
: List of HTML links for the documents menu.
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
*
: List of HTML links for the main menu.
EVENT_MENU_MAIN_FRONT (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 '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.
Return Value
*
: 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
*
: 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
*
: 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
*
: List of HTML links for the summary menu.
5.3.3. 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
tag, for use with CSS, Javascript, RSS, or any other
similar resources. Note that this event is signaled after all
other CSS and Javascript resources are linked by MantisBT.
Return Value
*
: HTML code to output.
EVENT_LAYOUT_BODY_BEGIN (Output)
This event allows plugins to output HTML code immediately after
the tag is opened, so that MantisBT may be integrated
within another website's template, or other similar use.
Return Value
*
: HTML code to output.
EVENT_LAYOUT_PAGE_HEADER (Output)
This event allows plugins to output HTML code immediately after
the MantisBT header content, such as the logo image.
Return Value
*
: 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
*
: 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
*
: 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
*
: HTML code to output.
EVENT_LAYOUT_BODY_END (Output)
This event allows plugins to output HTML code immediately before
the end tag, to so that MantisBT may be integrated within
another website's template, or other similar use.
Return Value
*
: HTML code to output.
EVENT_VIEW_BUG_ATTACHMENT (Output)
This event allows plugins to output HTML code immediately after
the line of an attachment. Receives the attachment data as a
parameter, in the form of an attachment array from within the
array returned by the file_get_visible_attachments() function.
Parameters
*
: the attachment data as an array (see
core/file_api.php)
Return Value
*
: HTML code to output.
5.4. Bug Filter Events
----------------------
5.4.1. Custom Filters and Columns
EVENT_FILTER_FIELDS (Default)
This event allows a plugin to register custom filter objects
(based on the MantisFilter class) that will allow the user to
search for issues based on custom criteria or datasets. The
plugin can return either a class name (which will be instantiated
at runtime) or an already instantiated object. The plugin must
ensure that the filter class has been defined before returning
the class name for this event.
Return Value
*
: Array of class names or objects for custom filters
EVENT_FILTER_COLUMNS (Default)
This event allows a plugin to register custom column objects
(based on the MantisColumn class) that will allow the user to
view data for issues based on custom datasets. The plugin can
return either a class name (which will be instantiated at
runtime) or an already instantiated object. The plugin must
ensure that the column class has been defined before returning
the class name for this event.
Return Value
*
: Array of class names or objects for custom columns
5.5. Bug and Bugnote Events
---------------------------
5.5.1. Bug View
EVENT_VIEW_BUG_DETAILS (Execute)
This event allows a plugin to either process information or
display some data in the bug view page. It is triggered after the
row containing the target version and product build fields, and
before the bug summary is displayed.
Any output here should be defining appropriate rows and columns
for the surrounding
elements.
Parameters
*
: Bug ID
EVENT_VIEW_BUG_EXTRA (Execute)
This event allows a plugin to either process information or
display some data in the bug view page. It is triggered after the
bug notes have been displayed, but before the history log is
shown.
Any output here should be contained within its own
element.
Parameters
*
: Bug ID
5.5.2. Bug Actions
EVENT_REPORT_BUG_FORM (Execute)
This event allows plugins to do processing or display form
elements on the Report Issue page. It is triggered immediately
before the summary text field.
Any output here should be defining appropriate rows and columns
for the surrounding
elements.
Parameters
*
: Project ID
EVENT_REPORT_BUG_FORM_TOP (Execute)
This event allows plugins to do processing or display form
elements at the top of the Report Issue page. It is triggered
before any of the visible form elements have been created.
Any output here should be defining appropriate rows and columns
for the surrounding
elements.
Parameters
*
: Project ID
EVENT_REPORT_BUG_DATA (Chain)
This event allows plugins to perform pre-processing of the new
bug data structure after being reported from the user, but before
the data is saved to the database. At this point, the issue ID is
not yet known, as the data has not yet been persisted.
Parameters
*
: Bug data structure (see core/bug_api.php)
Return Value
*
: Bug data structure
EVENT_REPORT_BUG (Execute)
This event allows plugins to perform post-processing of the bug
data structure after being reported from the user and being saved
to the database. At this point, the issue ID is actually known,
and is passed as a second parameter.
Parameters
*
: Bug data structure (see core/bug_api.php)
*
: Bug ID
EVENT_UPDATE_BUG_FORM (Execute)
This event allows plugins to do processing or display form
elements on the Update Issue page. It is triggered immediately
before the summary text field.
Parameters
*
: Bug ID
EVENT_UPDATE_BUG_FORM_TOP (Execute)
This event allows plugins to do processing or display form
elements on the Update Issue page. It is triggered immediately
before before any of the visible form elements have been created.
Parameters
*
: Bug ID
EVENT_UPDATE_BUG_STATUS_FORM (Execute)
This event allows plugins to do processing or display form
elements in the bug change status form. It is triggered
immediately before the add bugnote fields.
Any output here should be defining appropriate rows and columns
for the surrounding
elements.
Parameters
*
: Bug ID
*
: New Status
EVENT_UPDATE_BUG_DATA (Chain)
This event allows plugins to perform pre-processing of the
updated bug data structure after being modified by the user, but
before being saved to the database.
Parameters
*
: Updated bug data structure (see core/bug_api.php)
*
: Original bug data structure (see core/bug_api.php)
Return Value
*
: Updated bug data structure (see core/bug_api.php)
EVENT_UPDATE_BUG (Execute)
This event allows plugins to perform post-processing of the bug
data structure after being updated.
Parameters
*
: Original bug data structure (see core/bug_api.php)
*
: Updated bug data structure (see core/bug_api.php)
EVENT_BUG_ACTION (Execute)
This event allows plugins to perform post-processing of group
actions performed from the View Issues page. The event will get
called for each bug ID that was part of the group action event.
Parameters
*
: Action title (see bug_actiongroup.php)
*
: Bug ID
EVENT_BUG_DELETED (Execute)
This event allows plugins to perform pre-processing of bug
deletion actions. The actual deletion will occur after execution
of the event, for compatibility reasons.
Parameters
*
: Bug ID
5.5.3. Bugnote View
EVENT_VIEW_BUGNOTES_START (Execute)
This event allows a plugin to either process information or
display some data in the bug notes section, before any bug notes
are displayed. It is triggered after the bug notes section title.
Any output here should be defining appropriate rows and columns
for the surrounding
elements.
Parameters
*
: Bug ID
*
: A list of all bugnotes to be displayed to the user
EVENT_VIEW_BUGNOTE (Execute)
This event allows a plugin to either process information or
display some data in the bug notes section, interleaved with the
individual bug notes. It gets triggered after every bug note is
displayed.
Any output here should be defining appropriate rows and columns
for the surrounding
elements.
Parameters
*
: Bug ID
*
: Bugnote ID
*
: Private bugnote (false if public)
EVENT_VIEW_BUGNOTES_END (Execute)
This event allows a plugin to either process information or
display some data in the bug notes section, after all bugnotes
have been displayed.
Any output here should be defining appropriate rows and columns
for the surrounding
elements.
Parameters
*
: Bug ID
5.5.4. Bugnote Actions
EVENT_BUGNOTE_ADD_FORM (Execute)
This event allows plugins to do processing or display form
elements in the bugnote adding form. It is triggered immediately
after the bugnote text field.
Any output here should be defining appropriate rows and columns
for the surrounding
elements.
Parameters
*
: Bug ID
EVENT_BUGNOTE_ADD (Execute)
This event allows plugins to do post-processing of bugnotes added
to an issue.
Parameters
*
: Bug ID
*
: Bugnote ID
EVENT_BUGNOTE_EDIT_FORM (Execute)
This event allows plugins to do processing or display form
elements in the bugnote editing form. It is triggered immediately
after the bugnote text field.
Any output here should be defining appropriate rows and columns
for the surrounding
elements.
Parameters
*
: Bug ID
*
: Bugnote ID
EVENT_BUGNOTE_EDIT (Execute)
This event allows plugins to do post-processing of bugnote edits.
Parameters
*
: Bug ID
*
: Bugnote ID
EVENT_BUGNOTE_DELETED (Execute)
This event allows plugins to do post-processing of bugnote
deletions.
Parameters
*
: Bug ID
*
: Bugnote ID
EVENT_TAG_ATTACHED (Execute)
This event allows plugins to do post-processing of attached tags.
Parameters
*
: Bug ID
*
: Tag IDs
EVENT_TAG_DETACHED (Execute)
This event allows plugins to do post-processing of detached tags.
Parameters
*
: Bug ID
*
: Tag IDs
5.6. Notification Events
------------------------
5.6.1. Recipient Selection
EVENT_NOTIFY_USER_INCLUDE (Default)
This event allows a plugin to specify a set of users to be
included as recipients for a notification. The set of users
returned is added to the list of recipients already generated
from the existing notification flags and selection process.
Parameters
*
: Bug ID
*
: Notification type
Return Value
*
: User IDs to include as recipients
EVENT_NOTIFY_USER_EXCLUDE (Default)
This event allows a plugin to selectively exclude individual
users from the recipient list for a notification. The event is
signalled for every user in the final recipient list, including
recipients added by the event NOTIFY_USER_INCLUDE as described
above.
Parameters
*
: Bug ID
*
: Notification type
*
: User ID
Return Value
*
: True to exclude the user, false otherwise
5.7. User Account Events
------------------------
5.7.1. Account Preferences
EVENT_ACCOUNT_PREF_UPDATE_FORM (Execute)
This event allows plugins to do processing or display form
elements on the Account Preferences page. It is triggered
immediately after the last core preference element.
Any output here should follow the format found in
account_prefs_inc.php. As of 1.3.x this is no longer table
elements.
Parameters
*
: User ID
EVENT_ACCOUNT_PREF_UPDATE (Execute)
This event allows plugins to do pre-processing of form elements
from the Account Preferences page. It is triggered immediately
before the user preferences are saved to the database.
Parameters
*
: User ID
EVENT_USER_AVATAR (First)
This event gets the user's avatar as an instance of the Avatar
class. The first plugin to respond with an avatar wins. Hence, in
case of multiple avatar plugins, make sure to tweak the
priorities. Avatars should return null if they don't have an
avatar for the specified user id.
Parameters
*
: Avatar instance or null.
5.8. Management Events
----------------------
EVENT_MANAGE_OVERVIEW_INFO (Output)
This event allows plugins to display special information on the
Management Overview page.
Any output here should be defining appropriate rows and columns
for the surrounding
elements.
Parameters
*
: whether user is administrator
5.8.1. Projects and Versions
EVENT_MANAGE_PROJECT_PAGE (Execute)
This event allows plugins to do processing or display information
on the View Project page. It is triggered immediately before the
project access blocks.
Any output here should be contained within its own
element.
Parameters
*
: Project ID
EVENT_MANAGE_PROJECT_CREATE_FORM (Execute)
This event allows plugins to do processing or display form
elements on the Create Project page. It is triggered immediately
before the submit button.
Any output here should follow the format found in
manage_proj_create_page.php. As of 1.3.x this is no longer table
elements.
EVENT_MANAGE_PROJECT_CREATE (Execute)
This event allows plugins to do post-processing of newly-created
projects and form elements from the Create Project page.
Parameters
*
: Project ID
EVENT_MANAGE_PROJECT_UPDATE_FORM (Execute)
This event allows plugins to do processing or display form
elements in the Edit Project form on the View Project page. It is
triggered immediately before the submit button.
Any output here should follow the format found in
manage_proj_edit_page.php. As of 1.3.x this is no longer table
elements.
Parameters
*
: Project ID
EVENT_MANAGE_PROJECT_UPDATE (Execute)
This event allows plugins to do post-processing of modified
projects and form elements from the Edit Project form.
Parameters
*
: Project ID
EVENT_MANAGE_PROJECT_DELETE (Execute)
This event allows plugins to do pre-processing of project
deletion. This event is triggered prior to the project removal
from the database.
Parameters
*
: Project ID
EVENT_MANAGE_VERSION_CREATE (Execute)
This event allows plugins to do post-processing of newly-created
project versions from the View Project page, or versions copied
from other projects. This event is triggered for each version
created.
Parameters
*
: Version ID
EVENT_MANAGE_VERSION_UPDATE_FORM (Execute)
This event allows plugins to do processing or display form
elements on the Update Version page. It is triggered immediately
before the submit button.
Any output here should follow the format found in
manage_proj_ver_edit_page.php. As of 1.3.x this is no longer
table elements.
Parameters
*
: Version ID
EVENT_MANAGE_VERSION_UPDATE (Execute)
This event allows plugins to do post-processing of modified
versions and form elements from the Edit Version page.
Parameters
*
: Version ID
EVENT_MANAGE_VERSION_DELETE (Execute)
This event allows plugins to do pre-processing of version
deletion. This event is triggered prior to the version removal
from the database.
Parameters
*
: Version ID
*
: Replacement version to set on issues that are
currently using the version that is about to be deleted.
EVENT_MANAGE_USER_CREATE_FORM (Execute)
This event allows plugins to do processing or display form
elements on the Create User page. It is triggered immediately
before the submit button.
Any output here should follow the format found in
manage_user_create_page.php.
EVENT_MANAGE_USER_CREATE (Execute)
This event allows plugins to do post-processing of newly-created
users. This event is triggered for each user created. The Manage
Users create form is one possible case for triggering such
events, but there can be other ways users can be created.
Parameters
*
: User ID
EVENT_MANAGE_USER_UPDATE_FORM (Execute)
This event allows plugins to do processing or display form
elements in the Manage User page. It is triggered immediately
before the submit button.
Any output here should follow the format found in
manage_user_edit_page.php.
Parameters
*
: User ID
EVENT_MANAGE_USER_UPDATE (Execute)
This event allows plugins to do post-processing of modified
users. This may be triggered by the Manage User page or some
other path.
Parameters
*
: User ID
EVENT_MANAGE_USER_DELETE (Execute)
This event allows plugins to do pre-processing of user deletion.
Parameters
*
: User ID
EVENT_MANAGE_USER_PAGE (Execute)
This event allows plugins to do processing or display information
on the View User page. It is triggered immediately after the
reset password segment.
Any output here should be contained within its own container.
Parameters
*
: User ID
Chapter 6. Integrating with MantisBT
====================================
The primary means of integrating with MantisBT with web services is with
the bundled SOAP API, which is accessible at
http://server.com/mantis/api/soap/mantisconnect.php.
6.1. Java integration
---------------------
6.1.1. Prebuilt SOAP stubs using Axis
For ease of integration of the Java clients, SOAP stubs are maintained
and deployed in the Maven central repository. For example:
biz.futureware.mantismantis-axis-soap-client1.2.15
To include them in your project, download the latest available version.
6.1.2. Usage in OSGi environments
If you would like to use Axis in an OSGi environment, it is recommended
that you use a ready-made bundle, such as the Axis bundle available from
Eclipse Orbit
6.2. Compatibility between releases
-----------------------------------
The SOAP API signature will change between minor releases, typically to
add new functionality or to extend existing features.
Some of these changes might require a refresh of the client libraries
generated, for instance Apache Axis 1 SOAP stubs must be regenerated if a
complex type receives a new property. Such changes will be announced
before the release of the new MantisBT version on the mantisbt-soap-dev
mailing list. Typically there will be two weeks time to integrate the new
SOAP stubs.
6.3. Support
------------
The primary means of obtaining support for Web Services and the SOAP API
is through the mantisbt-soap-dev mailing list.
Chapter 7. Appendix
===================
7.1. Git References
-------------------
*
The Git SCM web site offers a full reference of Git commands, as well
Scott Chacon's excellent Pro Git book.
*
Github's Git Reference
*
Official documentation (from kernel.org)
*
Manual Page
*
Tutorial
*
Everyday Git With 20 Commands
*
Git Crash Course for SVN Users
*
Git From the Bottom Up (PDF)
Appendix A. Revision History
============================
Revision History
Revision 1.3-31
Thu Sep 26 2019
Victor Boctor
Release 1.3.20
Revision 1.3-30
Sat Aug 31 2019
Victor Boctor
Release 1.3.19
Revision 1.3-29
Sat Mar 16 2019
Victor Boctor
Release 1.3.18
Revision 1.3-28
Wed Jan 2 2019
Victor Boctor
Release 1.3.17
Revision 1.3-27
Mon Sep 3 2018
Victor Boctor
Release 1.3.16
Revision 1.3-26
Sun Apr 29 2018
Victor Boctor
Release 1.3.15
Revision 1.3-25
Tue Feb 6 2018
Victor Boctor
Release 1.3.14
Revision 1.3-24
Sun Dec 3 2017
Victor Boctor
Release 1.3.13
Revision 1.3-23
Sun Sep 3 2017
Victor Boctor
Release 1.3.12
Revision 1.3-22
Sat May 20 2017
Victor Boctor
Release 1.3.11
Revision 1.3-21
Sun Apr 16 2017
Victor Boctor
Release 1.3.10
Revision 1.3-20
Fri Mar 31 2017
Victor Boctor
Release 1.3.9
Revision 1.3-19
Tue Mar 21 2017
Damien Regad
Release 1.3.8
Revision 1.3-18
Sun Mar 12 2017
Victor Boctor
Release 1.3.7
Revision 1.3-17
Web Feb 1 2017
Victor Boctor
Release 1.3.6
Revision 1.3-16
Fri Dec 30 2016
Victor Boctor
Release 1.3.5
Revision 1.3-13
Sat Nov 26 2016
Damien Regad
Release 1.3.4
Revision 1.3-12
Sun Oct 30 2016
Victor Boctor
Release 1.3.3
Revision 1.3-11
Sun Oct 2 2016
Victor Boctor
Release 1.3.2
Revision 1.3-10
Sat Aug 27 2016
Damien Regad
Release 1.3.1
Revision 1.3-9
Thu Jul 9 2016
Victor Boctor
Release 1.3.0 stable
Revision 1.3-8
Thu Jul 3 2016
Damien Regad
Preparation for 1.3.0 final release
Revision 1.3-7
Thu Jun 9 2016
Damien Regad
Preparation for 1.3.0-rc.2 release
Revision 1.3-6
Tue Apr 28 2014
Damien Regad
Full review and preparation for 1.3 release
Revision 1.3-5
Tue Dec 31 2013
Damien Regad
2013 revisions by Damien Regad
Revision 1.3-4
Mon Dec 31 2012
Damien Regad
2012 revisions by Kirill Krasnov, Damien Regad, Raymond van Asperen
Revision 1.3-3
Sat Dec 31 2011
Damien Regad
2011 revisions by David Hicks, Dan Moore, Robert Munteanu, John Reese,
Daryn Warriner
Revision 1.3-2
Fri Dec 31 2010
Damien Regad
2010 revisions by David Hicks, John Reese
Revision 1.3-1
Thu Sep 2 2010
Gianluca Sforna
Initial creation of book by publican