Building plugins for MantisBT 2.8.0 - Help with events

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
rkarmann
Posts: 66
Joined: 24 Nov 2017, 10:00
Location: Lille, France

Building plugins for MantisBT 2.8.0 - Help with events

Post by rkarmann »

Hi everyone,

I was wondering if any of you could help me with plugin structure. In fact, my company decided to migrate from Mantis 1.2.14 to 2.8.0. I've read documentation of course, many times, but can't find out where to begin.

In the old version, we used to install many plugins like: HTMLMail, EmailReporter, etc... Some of them doesn't support the new 2.X core system.

So my question is:

- Wich event should I trigger / hook to build a HTML Mail plugin ? (display HTML in mail instead of plain text)


- Wich event should I trigger / hook to build a multi-LDAP connection plugin ? (yeah, I know, that sounds bad but I do really need it)

All replies are welcome !

Romain
Currently working on a wiki-based plugin for MantisBT 2.X. If you'd like to test it, contact me or see the plugin section.
cas
Posts: 1050
Joined: 11 Mar 2006, 16:08
Contact:

Re: Building plugins for MantisBT 2.8.0 - Help with events

Post by cas »

First of all principles are the same,most events are still there, some have been added.
Best way forward is to take a plugin for the 1 series which is also available in the 2 series.
Then do a compare and you will find the differences. This way, you will see how to adjust "old" plugins.
Or you can wait of the original creator provides an update.
rkarmann
Posts: 66
Joined: 24 Nov 2017, 10:00
Location: Lille, France

Re: Building plugins for MantisBT 2.8.0 - Help with events

Post by rkarmann »

Hi there,

I found out some temporary solution for multi-LDAP authentication (doing some changes in core files :? )
cas wrote: Then do a compare and you will find the differences. This way, you will see how to adjust "old" plugins.
Or you can wait of the original creator provides an update.
Sure, i'll do that as soon as possible. But still, there's something I can't understand : event system is not able to hook on email events. The only events available for emails are : EXCLUDE / INCLUDE users... I think the best solution is to create some custom event, to allow the plugin to modify email format.

- Where should I declare it ? In core system, like a patch ? Or in the plugin itself ("function events()" wich returns an array) ?
Currently working on a wiki-based plugin for MantisBT 2.X. If you'd like to test it, contact me or see the plugin section.
cas
Posts: 1050
Joined: 11 Mar 2006, 16:08
Contact:

Re: Building plugins for MantisBT 2.8.0 - Help with events

Post by cas »

You can define new events in the plugin. Next you need to place the plugin at the right spot in one of the core files.
Post Reply