X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=PLUGINS.txt;h=44d2ea2d447b32b3f4b91cfae07f507ea380b851;hb=8a07edec5f2378813b107b5cf7308a7738992eab;hp=79533b96dea55f346e0638ad899c956f34948590;hpb=c751be1c0639dd02432b8f7ddd365a91504e331c;p=quix0rs-gnu-social.git diff --git a/PLUGINS.txt b/PLUGINS.txt index 79533b96de..44d2ea2d44 100644 --- a/PLUGINS.txt +++ b/PLUGINS.txt @@ -1,7 +1,7 @@ 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, like 'StartNoticeSave', and other software can register interest in those events. When the events happen, the other software is called @@ -10,13 +10,13 @@ and has a choice of accepting or rejecting the events. In the simplest case, you can add a function to config.php and use the Event::addHandler() function to hook an event: - function AddGoogleLink($action) - { - $action->menuItem('http://www.google.com/', _('Google'), _('Search engine')); - return true; - } +function AddMyWebsiteLink($action) +{ +$action->menuItem('http://mywebsite.net/', _('My web site'), _('Example web link')); +return true; +} - Event::addHandler('EndPrimaryNav', 'AddGoogleLink'); +Event::addHandler('EndPrimaryNav', 'AddMyWebsiteLink'); This adds a menu item to the end of the main navigation menu. You can see the list of existing events, and parameters that handlers must @@ -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 '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 local/plugins/.