Plugin system - Request for comments

General Discussion around Collabtive

Plugin system - Request for comments

Postby Philipp » 08.07.2009, 13:14

Since the release of Collabtive 0.6 we are working on a plugin system for Collabtive.
This will allow it to write third-party addons for Collabtive in the future.

Some code has already been written.
However, doing a plugin system right requires some serious considerations and design challenges / decisions to be made.

Therefore i ask those of you with some programming knowledge for your input on this.
Please have a look at the code, and post your suggestions or ideas regarding the plugin system here.

What has been implemented
  • Simple plugin directory
  • Register plugins with Collabtive
  • Install Plugins according to XML config files
  • Register custom plugin-events with Collabtive (an event is a custom function from a plugin called at certain conditions)

What needs to be done
  • Finding and implementing a proper way for Plugins to extend the Collabtive User Interface. This should be template-agnostic.
  • Perfecting the current events system
  • Various implementation considerations

If you're interested in this, please have a look at
http://code.google.com/p/collabtiv/sour ... e/init.php
http://code.google.com/p/collabtiv/sour ... lugins.php
http://code.google.com/p/collabtiv/sour ... plugin.php
http://code.google.com/p/collabtiv/sour ... config.xml
http://code.google.com/p/collabtiv/sour ... plugin.php

I'm looking forward to your feedback :)
User avatar
Site Admin
Posts: 1118
Joined: 14.12.2007, 03:06
Location: Saarbrücken, germany

Re: Plugin system - Request for comments

Postby mvsxyz » 08.07.2009, 22:44

I took a look to your plugin draft and I have some question.

Why do I have to configure an explicit class and function in the config.xml (see <name>testplugin::testit()</name>)? Why isn't there an myfile.php or something else for that call? Because in your case I always need a static function. I think, when I write many static functions in one object (as you propose), there is no need to for this object testplugin. In this case (static functions) I can't use inheritance and other useful things of OOP. If I only call a php file I can structure it in a way I think it is useful and use OOP.

The next thing is about the init.php with the hooks. I think this new!? (Sorry, when it doesn't). But I can't figure out how this lines will work. Can you explain briefly how this hooks work and how this work together with the plugins?

Code: Select all
$hookMainmenue = array();


$hookAdminsubmenue = array();
Posts: 3
Joined: 08.07.2009, 22:24

Re: Plugin system - Request for comments

Postby danaketh » 12.08.2009, 19:39

Well, I implemented plugins to my system few months ago, however they're used more like "widgets". So, there is the question: "What do you expect from plugins?" You can have plugins which just provides some more functions, like list of tasks for today, or adding whole new functionality, like SVN browser.

I suggest to create some API for plugins, so while writing a plugin, programmer can access basic Collabtive functions/data. For example I'm writing plugin, which will make that list of tasks which should be done today.

Code: Select all
$API = new CollabtiveAPI();
$tasks = $API->Tasks->getlist( array('end' => date('Y-m-d)) );
// now follows the iteration and building the list

This will provide programmers with easy access to the main data and also eliminate unsafe manipulation with database from 3rd party plugins. It's more likely that programmers will use API instead of writing their own code to change something (which can easily make some mess).


Extending UI should be automatic, using mostly styles from Collabtive template. However, some template file can make it more clean, leaving the plugin logic inside the plugin.php and leave the HTML to the template file, so the code is cleaner. This should be easy to implement, because of Smarty is already present :)

Styling should depend on the selected main theme. There is possible solution (which I implemented in my website) with allowing plugin to have it's own styles.css but if this is used to hard style the plugin, it may cause serious problems with different main themes. Therefore it's wiser to let plugins have only it's own template which will set it's form.
User avatar
Posts: 12
Joined: 12.08.2009, 19:01
Location: Prague, Czech Republic

Re: Plugin system - Request for comments

Postby Philipp » 13.06.2011, 03:36

Several Plugins are now available at http://collabtive.o-dyn.de/service.php
User avatar
Site Admin
Posts: 1118
Joined: 14.12.2007, 03:06
Location: Saarbrücken, germany

Re: Plugin system - Request for comments

Postby DAGparrinha » 13.06.2011, 17:47

How do I create plugins? Until now I've been modifying the core since I can't find how to add extensions and I have not found a hooks system in use.
Posts: 31
Joined: 11.06.2011, 15:54

Re: Plugin system - Request for comments

Postby Bing » 12.08.2011, 11:08

Philipp wrote:Several Plugins are now available at http://collabtive.o-dyn.de/service.php

But I would develop plugin by myself!
Posts: 7
Joined: 27.06.2010, 16:28

Re: Plugin system - Request for comments

Postby collective » 06.05.2013, 19:05

First: Thanks for Collabtive!

Is it possible for 3rd party developers to write plugins for collabtive? This thread is old, but I still can't find any documentation. Is there any plugin API that can be used?
Posts: 3
Joined: 06.05.2013, 18:53

Re: Plugin system - Request for comments

Postby viluki » 03.09.2013, 22:43

Hola, disculpen las molestias pero tengo una consulta con el tema de los plugins existe algun pulgin o API mediante el cual se pueda acceder a los datos que maneja la aplicacion, a la base de datos o a sus repositorios.

Disculpen las molestias, desde ya muchas gracias.

Posts: 1
Joined: 03.09.2013, 22:40

Return to General

Who is online

Users browsing this forum: No registered users