aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/plugins.bb5
-rw-r--r--include/identity.php2
-rw-r--r--mod/profile_photo.php4
3 files changed, 9 insertions, 2 deletions
diff --git a/doc/plugins.bb b/doc/plugins.bb
index 099f9fdf4..7709976c4 100644
--- a/doc/plugins.bb
+++ b/doc/plugins.bb
@@ -240,6 +240,11 @@ we will create an argc/argv list for use by your module functions
3 whatever
[/code]
+If you want to keep your plugin hidden from the siteinfo page, simply create a file called '.hidden' in your addon directory
+[code]
+ touch addon/<addon name>/.hidden
+[/code]
+
***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:
diff --git a/include/identity.php b/include/identity.php
index d26eced2c..bfdd02682 100644
--- a/include/identity.php
+++ b/include/identity.php
@@ -364,7 +364,7 @@ function create_identity($arr) {
if($role_permissions) {
set_pconfig($newuid,'system','permissions_role',$arr['permissions_role']);
if(array_key_exists('online',$role_permissions))
- set_pconfig('system','hide_presence',1-intval($role_permissions['online']));
+ set_pconfig($newuid,'system','hide_presence',1-intval($role_permissions['online']));
}
// Create a group with yourself as a member. This allows somebody to use it
diff --git a/mod/profile_photo.php b/mod/profile_photo.php
index c587b9606..aad9c9d16 100644
--- a/mod/profile_photo.php
+++ b/mod/profile_photo.php
@@ -364,7 +364,9 @@ function profile_photo_content(&$a) {
// FIXME - yuk
'$select' => sprintf('%s %s', t('or'), ($newuser) ? '<a href="' . $a->get_baseurl() . '">' . t('skip this step') . '</a>' : '<a href="'. $a->get_baseurl() . '/photos/' . $a->channel['channel_address'] . '">' . t('select a photo from your photo albums') . '</a>')
));
-
+
+ call_hooks('profile_photo_content_end', $o);
+
return $o;
}
else {