1 balupton Jul 01, 2006 14:26
3 balupton Jul 02, 2006 01:50
Towards:
Plugin's filename need to end with '.plugin.php' ?
Plugin's directory need to end with '_plugin' ?
Plugin's Class Name need to end with '_plugin' ?
Answer: 3x yes.
Couldn't say _panels.plugin.php do the following:
FOR each file in 'panels' dir
// Panels will be like: '_name.panel.php'
CALL Panels->register <-- name.'_panel', 0, -1, NULL, filename
END FOR
That would work wouldn't it?
Oh but then the panels would be loaded up before the panels plugin...
But that should not be a problem for the time being.
4 blueyed Jul 02, 2006 14:26
yes, something like that should work. BUT there are places where the "_".classname."_plugin.php" scheme gets used hardcoded, that would need to get checked for this.
5 balupton Jul 02, 2006 23:57
I've got everything set up for plugins adding their own type of plugin, except i need the following event request added:
http://forums.b2evolution.net//viewtopic.php?p=39065#39065
balupton wrote:
Just look at the Plugin class: enable_event() and disable_event() are there. So, yes.
PluginSettingsEditDisplayAfter() gets called after the settings form. So, yes.
Yes, of course can plugins save settings themselves. They have a PluginSettings object and can just do $this->Settings->set( 'foo', 'bar' ) - but to make them permanent they must call the Settings's dbupdate() method (we had this before, haven't we?).
Settings that are not defined in GetDefaultSettings() can be used, but won't show up anywhere automatically.
3x yes.
You could say that the panel plugins "require the plugin" panels_plugin (GetDependencies method) and then require_once() the file in each of the panel plugin's source files.
That's not supported yet. Currently b2evo only scans the plugins/ folder and *_plugin subfolders thereof for available plugins (in the Plugins admin section). When loading, it first tries the *_plugin folder and than the general plugins/ folder.
This would require to store the path of the plugin's classfile in T_plugins and use this, when loading the plugin.
I've just implemented this locally, but no promise that it gets committed.
So you are.. :)