Commit 39462c3a authored by chimo's avatar chimo

Documentation about plugins

* Content in plugins/doc/Plugin_development.md from:
https://web.archive.org/web/20140821102047/http://status.net/wiki/HOWTO_Make_a_Plugin

* Point link on Plugins Admin Panel page to plugins/README.md
parent a03249dd
Plugins Plugins
======= =======
Beginning with the 0.7.x branch, StatusNet has supported a simple but GNU social supports a simple but
powerful plugin architecture. Important events in the code are named, powerful plugin architecture. Important events in the code are named,
like 'StartNoticeSave', and other software can register interest like 'StartNoticeSave', and other software can register interest
in those events. When the events happen, the other software is called in those events. When the events happen, the other software is called
...@@ -37,7 +37,7 @@ can enable a plugin with the following line in config.php: ...@@ -37,7 +37,7 @@ can enable a plugin with the following line in config.php:
This will look for and load files named 'ExamplePlugin.php' or This will look for and load files named 'ExamplePlugin.php' or
'Example/ExamplePlugin.php' either in the plugins/ directory (for 'Example/ExamplePlugin.php' either in the plugins/ directory (for
plugins that ship with StatusNet) or in the local/ directory (for plugins that ship with GNU social) or in the local/ directory (for
plugins you write yourself or that you get from somewhere else) or plugins you write yourself or that you get from somewhere else) or
local/plugins/. local/plugins/.
......
...@@ -62,7 +62,7 @@ class PluginsadminpanelAction extends AdminPanelAction ...@@ -62,7 +62,7 @@ class PluginsadminpanelAction extends AdminPanelAction
{ {
// TRANS: Instructions at top of plugin admin page. // TRANS: Instructions at top of plugin admin page.
return _('Additional plugins can be enabled and configured manually. ' . return _('Additional plugins can be enabled and configured manually. ' .
'See the <a href="http://status.net/wiki/Plugins">online plugin ' . 'See the <a href="https://git.gnu.io/gnu/gnu-social/blob/master/plugins/README.md">online plugin ' .
'documentation</a> for more details.'); 'documentation</a> for more details.');
} }
......
Several example plugins are included in the plugins/ directory. You Several example plugins are included in the plugins/ directory. You
can enable a plugin with the following line in config.php: can enable a plugin with the following line in config.php:
```php
addPlugin('Example', array('param1' => 'value1', addPlugin('Example', array('param1' => 'value1',
'param2' => 'value2')); 'param2' => 'value2'));
```
This will look for and load files named 'ExamplePlugin.php' or This will look for and load files named 'ExamplePlugin.php' or
'Example/ExamplePlugin.php' either in the plugins/ directory (for 'Example/ExamplePlugin.php' either in the plugins/ directory (for
...@@ -12,10 +14,8 @@ local/plugins/. ...@@ -12,10 +14,8 @@ local/plugins/.
Plugins are documented in their own directories. Plugins are documented in their own directories.
Additional information on using and developing plugins can be found Additional information on using and developing plugins can be found
on the StatusNet wiki: at the following locations:
http://status.net/wiki/Plugins [Plugin Development](doc/Plugin_development.md)
http://status.net/wiki/Plugin_development
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment