Merge pull request #605 from habeascodice/master

2 minor bug-fixes, a line of docu, and a call_hooks() hook
This commit is contained in:
RedMatrix 2014-09-29 13:08:56 +10:00
commit 6370713cc1
3 changed files with 9 additions and 2 deletions

View File

@ -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:

View File

@ -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

View File

@ -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 {