Re: [pLog-General] Improving the plugin system...
Brought to you by:
jondaley
From: Oscar R. <os...@re...> - 2004-04-29 10:50:07
|
Hi! > <snip> >> I have been thinking about it and I even have a working implementation >> but I am still not sure if this is going to be enough... The idea is >> that the core will be throwing certain events to which plugins can >> "subscribe". An event could be thrown when a post is loaded, or when a >> comment is received, when a post is removed, etc. The list of events >> can be as big as we want... > <snip> > > The phorum forum software use that kind of hook for plugin management: > http://phorum.org/ > Well at least the 5.x betas. > > Each plugin is in its own directory in ./mods/ directory. The code calls > the ./mods/pluginname/settings.php wich will set the plugin > configuration and the ./mods/pluginname/pluginname.php wich is the > plugin it self. Lastest is an info.txt wich give phorum the hook > contained in the plugin as well as a description for the module > management system. > > Each plugin have functions names set as: > function phorum_mod_<pluginname>_<hookname> > > > Then, in phoorum code, the hook function will call each plugin > specialised function. That's pretty much what we want to do and what nucleuscms does... Though I don't like the idea of that settings.txt file (why not put that into a .php file, it'll save processing time!), our new plugins will also be self-contained and so on. Have you worked with this system? Or with Nucleus' system? I'm interested in what were the advantages of a plugin framework like this, and what the drawbacks were, too... Thanks for the info :) Oscar |