From f2daed5188f5999d6cdf5a4de7e05dc03ac6f69c Mon Sep 17 00:00:00 2001 From: friendica Date: Fri, 18 Oct 2013 17:01:06 -0700 Subject: basic gotcha's enumerated when porting Friendica addons --- doc/Plugins.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'doc/Plugins.md') diff --git a/doc/Plugins.md b/doc/Plugins.md index f22f1b09d..c3eaea348 100644 --- a/doc/Plugins.md +++ b/doc/Plugins.md @@ -242,3 +242,19 @@ we will create an argc/argv list for use by your module functions 3 whatever +***Porting Friendica Plugins*** + +The Red Matrix uses a similar plugin architecture to the Friendica project. The authentication, identity, and permissions systems are completely different. Many Friendica can be ported reasonably easily by renaming a few functions - and then ensuring that the permissions model is adhered to. The functions which need to be renamed are: + +* Friendica's pluginname_install() is pluginname_load() + +* Friendica's pluginname_uninstall() is pluginname_unload() + +The Red Matrix has _install and _uninstall functions but these are used differently. + +* Friendica's "plugin_settings" hook is called "feature_settings" + +* Friendica's "plugin_settings_post" hook is called "feature_settings_post" + +Changing these will often allow your plugin to function, but please double check all your permission and identity code because the concepts behind it are completely different in the Red Matrix. Many structured data names (especially DB schema columns) are also quite different. + -- cgit v1.2.3