aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRedMatrix <info@friendica.com>2014-09-29 13:08:56 +1000
committerRedMatrix <info@friendica.com>2014-09-29 13:08:56 +1000
commit6370713cc189a26db7a319c588158b4f05f61b35 (patch)
tree008b73b3a2c9c649cc3492113534a6cfe3731e7e
parente18dfbe3ce0a8d89a5320e4f239801d0b84dd83e (diff)
parentc07643e407aab16ecabfdf5f641166583e02ec36 (diff)
downloadvolse-hubzilla-6370713cc189a26db7a319c588158b4f05f61b35.tar.gz
volse-hubzilla-6370713cc189a26db7a319c588158b4f05f61b35.tar.bz2
volse-hubzilla-6370713cc189a26db7a319c588158b4f05f61b35.zip
Merge pull request #605 from habeascodice/master
2 minor bug-fixes, a line of docu, and a call_hooks() hook
-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 {