Building plugins for MantisBT 2.8.0 - Help with events

Get help from other users here.

Moderators: Contributor, Developer

Building plugins for MantisBT 2.8.0 - Help with events

Postby rkarmann » Nov 27, 2017 9:42 am

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
rkarmann
 
Posts: 22
Joined: Nov 24, 2017 5:00 am
Location: Lille, France

Re: Building plugins for MantisBT 2.8.0 - Help with events

Postby cas » Nov 30, 2017 5:59 am

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.
cas
 
Posts: 323
Joined: Mar 11, 2006 11:08 am

Re: Building plugins for MantisBT 2.8.0 - Help with events

Postby rkarmann » Nov 30, 2017 11:35 am

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) ?
rkarmann
 
Posts: 22
Joined: Nov 24, 2017 5:00 am
Location: Lille, France

Re: Building plugins for MantisBT 2.8.0 - Help with events

Postby cas » Nov 30, 2017 3:20 pm

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.
cas
 
Posts: 323
Joined: Mar 11, 2006 11:08 am


Return to Help

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 14 guests