Difference between revisions of "Plugin API"
From GeeklogWiki
(draft version of a page to list all Plugin API functions) |
(switched to using the plugin_ names so things are documented from the plugin's point of view) |
||
| Line 1: | Line 1: | ||
| − | Geeklog's [[Plugin API]] defines the interface between the core Geeklog code and the plugins. From Geeklog's point of view, all the | + | Geeklog's [[Plugin API]] defines the interface between the core Geeklog code and the plugins. From Geeklog's point of view, all the Plugin API functions are called <code>PLG_something</code>, which will result in a function <code>plugin_something_foo</code> being called in the "foo" plugin (if it exists - all the API functions are optional). |
| + | |||
| + | For details about Plugin API functions that are not documented yet, please refer to the documented source code of [http://project.geeklog.net/src/Geeklog/_system---lib-plugins.php.html lib-plugins.php] | ||
| Line 8: | Line 10: | ||
! Description | ! Description | ||
|- | |- | ||
| − | | | + | |[[Plugin Auto-Uninstall|plugin_autouninstall_]] |
| + | |Plugin should provide data for uninstallation | ||
| + | |- | ||
| + | |plugin_chkVersion_ | ||
|Called to check if a plugin upgrade is required | |Called to check if a plugin upgrade is required | ||
|- | |- | ||
| − | | | + | |plugin_enablestatechange_ |
|Inform plugin that it's about to be enabled or disabled | |Inform plugin that it's about to be enabled or disabled | ||
|- | |- | ||
| − | | | + | |plugin_install_ |
|''(not currently used)'' | |''(not currently used)'' | ||
|- | |- | ||
| − | |[[PLG_migrate]] | + | |[[PLG_migrate|plugin_migrate_]] |
|Site migration underway; plugin should migrate its data | |Site migration underway; plugin should migrate its data | ||
|- | |- | ||
| − | | | + | |plugin_uninstall_ |
| − | |Plugin should uninstall itself | + | |Plugin should uninstall itself |
|- | |- | ||
| − | | | + | |plugin_upgrade_ |
|Plugin should upgrade itself | |Plugin should upgrade itself | ||
|} | |} | ||
| + | |||
| + | |||
| + | = Moderation / Submission = | ||
| + | = Comment = | ||
| + | = Statistics = | ||
| + | = Search = | ||
| + | = UI and Templates = | ||
| + | = User = | ||
| + | = Feeds = | ||
| + | = Spam Filter = | ||
| + | = Misc = | ||
[[Category:Plugin Development]] | [[Category:Plugin Development]] | ||
Revision as of 18:30, 23 May 2009
Geeklog's Plugin API defines the interface between the core Geeklog code and the plugins. From Geeklog's point of view, all the Plugin API functions are called PLG_something, which will result in a function plugin_something_foo being called in the "foo" plugin (if it exists - all the API functions are optional).
For details about Plugin API functions that are not documented yet, please refer to the documented source code of lib-plugins.php
Contents
Installation
| API Function | Description |
|---|---|
| plugin_autouninstall_ | Plugin should provide data for uninstallation |
| plugin_chkVersion_ | Called to check if a plugin upgrade is required |
| plugin_enablestatechange_ | Inform plugin that it's about to be enabled or disabled |
| plugin_install_ | (not currently used) |
| plugin_migrate_ | Site migration underway; plugin should migrate its data |
| plugin_uninstall_ | Plugin should uninstall itself |
| plugin_upgrade_ | Plugin should upgrade itself |