petee 2 Oct 2009 We need to define some more conventions for plugins. I propose the following:
If I plugin requires a configuration file it should follow this naming schema
{plugin_name}_config.php
If possible, default values can be hard-coded but overridden by {plugin_name}_config.php
Provide a sample configuration file: {plugin_name}_config-sample.php
If a plugin cannot be loaded, for example, due to a missing configuration file we should write to a log file or display a warning message in the UI. A misconfigured plugin should not crash the entire wiki due a PHP error.
If a plugin requires a database table, by default the tables should exist in the wikidb, not a separate database. However, a plugin should be configurable so the tables can exist in a separate database.
Putting the tables in the wiki database makes migrations much easier.
If a plugin requires a database table(s) the tables should have a standard prefix. For example:
plugin_{plugin_name}
The table name must not exceed 64 characters.
The DDL to create tables should be named the following and should exist within the root of the plugin directory:
{plugin_name}.sql
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by