1 Friendica Addon development
6 Please see the sample addon 'randplace' for a working example of using some of these features.
7 Addons work by intercepting event hooks - which must be registered.
8 Modules work by intercepting specific page requests (by URL path).
12 Addon names are used in file paths and functions names, and as such:
13 - Can't contain spaces or punctuation.
14 - Can't start with a number.
18 You can provide human-readable information about your addon in the first multi-line comment of your addon file.
24 * Name: {Human-readable name}
25 * Description: {Short description}
27 * Author: {Author1 Name}
28 * Author: {Author2 Name} <{Author profile link}>
29 * Maintainer: {Maintainer1 Name}
30 * Maintainer: {Maintainer2 Name} <{Maintainer profile link}>
31 * Status: {Unsupported|Arbitrary status}
35 You can also provide a longer documentation in a `README` or `README.md` file.
36 The latter will be converted from Markdown to HTML in the addon detail page.
40 If your addon uses hooks, they have to be registered in a `<addon>_install()` function.
41 This function also allows to perform arbitrary actions your addon needs to function properly.
43 Uninstalling an addon automatically unregisters any hook it registered, but if you need to provide specific uninstallation steps, you can add them in a `<addon>_uninstall()` function.
45 The install and uninstall functions will be called (i.e. re-installed) if the addon changes after installation.
46 Therefore your uninstall should not destroy data and install should consider that data may already exist.
47 Future extensions may provide for "setup" amd "remove".
51 Register your addon hooks during installation.
53 \Friendica\Core\Hook::register($hookname, $file, $function);
55 `$hookname` is a string and corresponds to a known Friendica PHP hook.
57 `$file` is a pathname relative to the top-level Friendica directory.
58 This *should* be 'addon/*addon_name*/*addon_name*.php' in most cases and can be shortened to `__FILE__`.
60 `$function` is a string and is the name of the function which will be executed when the hook is called.
63 Your hook callback functions will be called with at least one and possibly two arguments
65 function <addon>_<hookname>(App $a, &$b) {
69 If you wish to make changes to the calling data, you must declare them as reference variables (with `&`) during function declaration.
72 $a is the Friendica `App` class.
73 It contains a wealth of information about the current state of Friendica:
75 * which module has been called,
76 * configuration information,
77 * the page contents at the point the hook was invoked,
78 * profile and user information, etc.
80 It is recommeded you call this `$a` to match its usage elsewhere.
83 $b can be called anything you like.
84 This is information specific to the hook currently being processed, and generally contains information that is being immediately processed or acted on that you can use, display, or alter.
85 Remember to declare it with `&` if you wish to alter it.
89 Your addon can provide user-specific settings via the `addon_settings` PHP hook, but it can also provide node-wide settings in the administration page of your addon.
91 Simply declare a `<addon>_addon_admin(App $a)` function to display the form and a `<addon>_addon_admin_post(App $a)` function to process the data from the form.
95 If your addon requires adding a stylesheet on all pages of Friendica, add the following hook:
98 function <addon>_install()
100 \Friendica\Core\Hook::register('head', __FILE__, '<addon>_head');
105 function <addon>_head(App $a)
107 \Friendica\DI::page()->registerStylesheet(__DIR__ . '/relative/path/to/addon/stylesheet.css');
111 `__DIR__` is the folder path of your addon.
117 If your addon requires adding a script on all pages of Friendica, add the following hook:
121 function <addon>_install()
123 \Friendica\Core\Hook::register('footer', __FILE__, '<addon>_footer');
127 function <addon>_footer(App $a)
129 \Friendica\DI::page()->registerFooterScript(__DIR__ . '/relative/path/to/addon/script.js');
133 `__DIR__` is the folder path of your addon.
137 The main Friendica script provides hooks via events dispatched on the `document` property.
138 In your Javascript file included as described above, add your event listener like this:
141 document.addEventListener(name, callback);
144 - *name* is the name of the hook and corresponds to a known Friendica JavaScript hook.
145 - *callback* is a JavaScript anonymous function to execute.
147 More info about Javascript event listeners: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
149 #### Current JavaScript hooks
151 ##### postprocess_liveupdate
152 Called at the end of the live update process (XmlHttpRequest) and on a post preview.
153 No additional data is provided.
157 Addons may also act as "modules" and intercept all page requests for a given URL path.
158 In order for a addon to act as a module it needs to declare an empty function `<addon>_module()`.
160 If this function exists, you will now receive all page requests for `https://my.web.site/<addon>` - with any number of URL components as additional arguments.
161 These are parsed into the `App\Arguments` object.
162 So `https://my.web.site/addon/arg1/arg2` would give this:
164 DI::args()->getArgc(); // = 3
165 DI::args()->get(0); // = 'addon'
166 DI::args()->get(1); // = 'arg1'
167 DI::args()->get(2); // = 'arg2'
170 To display a module page, you need to declare the function `<addon>_content(App $a)`, which defines and returns the page body content.
171 They may also contain `<addon>_post(App $a)` which is called before the `<addon>_content` function and typically handles the results of POST forms.
172 You may also have `<addon>_init(App $a)` which is called before `<addon>_content` and should include common logic to your module.
176 If your addon needs some template, you can use the Friendica template system.
177 Friendica uses [smarty3](http://www.smarty.net/) as a template engine.
179 Put your tpl files in the *templates/* subfolder of your addon.
181 In your code, like in the function addon_name_content(), load the template file and execute it passing needed values:
184 use Friendica\Core\Renderer;
186 # load template file. first argument is the template name,
187 # second is the addon path relative to friendica top folder
188 $tpl = Renderer::getMarkupTemplate('mytemplate.tpl', __DIR__);
190 # apply template. first argument is the loaded template,
191 # second an array of 'name' => 'values' to pass to template
192 $output = Renderer::replaceMacros($tpl, array(
193 'title' => 'My beautiful addon',
197 See also the wiki page [Quick Template Guide](https://github.com/friendica/friendica/wiki/Quick-Template-Guide).
202 Called when a user attempts to login.
203 `$b` is an array containing:
205 - **username**: the supplied username
206 - **password**: the supplied password
207 - **authenticated**: set this to non-zero to authenticate the user.
208 - **user_record**: successful authentication must also return a valid user record from the database
211 Called after a user has successfully logged in.
212 `$b` contains the `$a->user` array.
215 Called when formatting a post for display.
218 - **item**: The item (array) details pulled from the database
219 - **output**: the (string) HTML representation of this item prior to adding it to the page
222 Called when a status post or comment is entered on the local system.
223 `$b` is the item array of the information to be stored in the database.
224 Please note: body contents are bbcode - not HTML.
227 Called when a local status post or comment has been stored on the local system.
228 `$b` is the item array of the information which has just been stored in the database.
229 Please note: body contents are bbcode - not HTML
232 Called when receiving a post from another source. This may also be used to post local activity or system generated messages.
233 `$b` is the item array of information to be stored in the database and the item body is bbcode.
236 Called when generating the HTML for the addon settings page.
237 `$data` is an array containing:
239 - **addon** (output): Required. The addon folder name.
240 - **title** (output): Required. The addon settings panel title.
241 - **href** (output): Optional. If set, will reduce the panel to a link pointing to this URL, can be relative. Incompatible with the following keys.
242 - **html** (output): Optional. Raw HTML of the addon form elements. Both the `<form>` tags and the submit buttons are taken care of elsewhere.
243 - **submit** (output): Optional. If unset, a default submit button with `name="<addon name>-submit"` will be generated.
244 Can take different value types:
245 - **string**: The label to replace the default one.
246 - **associative array**: A list of submit button, the key is the value of the `name` attribute, the value is the displayed label.
247 The first submit button in this list is considered the main one and themes might emphasize its display.
254 'addon' => 'advancedcontentfilter',
255 'title' => DI::l10n()->t('Advanced Content Filter'),
256 'href' => 'advancedcontentfilter',
259 ##### With default submit button
262 'addon' => 'fromapp',
263 'title' => DI::l10n()->t('FromApp Settings'),
267 ##### With no HTML, just a submit button
270 'addon' => 'opmlexport',
271 'title' => DI::l10n()->t('OPML Export'),
272 'submit' => DI::l10n()->t('Export RSS/Atom contacts'),
275 ##### With multiple submit buttons
278 'addon' => 'catavar',
279 'title' => DI::l10n()->t('Cat Avatar Settings'),
282 'catavatar-usecat' => DI::l10n()->t('Use Cat as Avatar'),
283 'catavatar-morecat' => DI::l10n()->t('Another random Cat!'),
284 'catavatar-emailcat' => DI::pConfig()->get(Session::getLocalUser(), 'catavatar', 'seed', false) ? DI::l10n()->t('Reset to email Cat') : null,
289 ### addon_settings_post
290 Called when the Addon Settings pages are submitted.
291 `$b` is the $_POST array.
293 ### connector_settings
294 Called when generating the HTML for a connector addon settings page.
295 `$data` is an array containing:
297 - **connector** (output): Required. The addon folder name.
298 - **title** (output): Required. The addon settings panel title.
299 - **image** (output): Required. The relative path of the logo image of the platform/protocol this addon is connecting to, max size 48x48px.
300 - **enabled** (output): Optional. If set to a falsy value, the connector image will be dimmed.
301 - **html** (output): Optional. Raw HTML of the addon form elements. Both the `<form>` tags and the submit buttons are taken care of elsewhere.
302 - **submit** (output): Optional. If unset, a default submit button with `name="<addon name>-submit"` will be generated.
303 Can take different value types:
304 - **string**: The label to replace the default one.
305 - **associative array**: A list of submit button, the key is the value of the `name` attribute, the value is the displayed label.
306 The first submit button in this list is considered the main one and themes might emphasize its display.
310 ##### With default submit button
313 'connector' => 'diaspora',
314 'title' => DI::l10n()->t('Diaspora Export'),
315 'image' => 'images/diaspora-logo.png',
316 'enabled' => $enabled,
321 ##### With custom submit button label and no logo dim
324 'connector' => 'ifttt',
325 'title' => DI::l10n()->t('IFTTT Mirror'),
326 'image' => 'addon/ifttt/ifttt.png',
328 'submit' => DI::l10n()->t('Generate new key'),
332 ##### With conditional submit buttons
334 $submit = ['pumpio-submit' => DI::l10n()->t('Save Settings')];
335 if ($oauth_token && $oauth_token_secret) {
336 $submit['pumpio-delete'] = DI::l10n()->t('Delete this preset');
340 'connector' => 'pumpio',
341 'title' => DI::l10n()->t('Pump.io Import/Export/Mirror'),
342 'image' => 'images/pumpio.png',
343 'enabled' => $enabled,
350 Called when posting a profile page.
351 `$b` is the $_POST array.
354 Called prior to output of profile edit page.
355 `$b` is an array containing:
357 - **profile**: profile (array) record from the database
358 - **entry**: the (string) HTML of the generated entry
361 Called when the HTML is generated for the Advanced profile, corresponding to the Profile tab within a person's profile page.
362 `$b` is the HTML string representation of the generated profile.
363 The profile array details are in `$a->profile`.
366 Called from the Directory page when formatting an item for display.
369 - **contact**: contact record array for the person from the database
370 - **entry**: the HTML string of the generated entry
372 ### profile_sidebar_enter
373 Called prior to generating the sidebar "short" profile for a page.
374 `$b` is the person's profile array
377 Called when generating the sidebar "short" profile for a page.
380 - **profile**: profile record array for the person from the database
381 - **entry**: the HTML string of the generated entry
383 ### contact_block_end
384 Called when formatting the block of contacts/friends on a profile sidebar has completed.
387 - **contacts**: array of contacts
388 - **output**: the generated HTML string of the contact block
391 Called after conversion of bbcode to HTML.
392 `$b` is an HTML string converted text.
395 Called after tag conversion of HTML to bbcode (e.g. remote message posting)
396 `$b` is a string converted text
399 Called when building the `<head>` sections.
400 Stylesheets should be registered using this hook.
401 `$b` is an HTML string of the `<head>` tag.
404 Called after building the page navigation section.
405 `$b` is a string HTML of nav region.
408 Called prior to output of personal XRD file.
411 - **user**: the user record array for the person
412 - **xml**: the complete XML string to be output
415 Called prior to output home page content, shown to unlogged users.
416 `$b` is the HTML sring of section region.
419 Called when editing contact details on an individual from the Contacts page.
422 - **contact**: contact record (array) of target contact
423 - **output**: the (string) generated HTML of the contact edit page
425 ### contact_edit_post
426 Called when posting the contact edit page.
427 `$b` is the `$_POST` array
430 Called just after DB has been opened and before session start.
434 Called after HTML content functions have completed.
435 `$b` is (string) HTML of content div.
438 Called after HTML content functions have completed.
439 Deferred Javascript files should be registered using this hook.
440 `$b` is (string) HTML of footer div/element.
443 Called when looking up the avatar. `$b` is an array:
445 - **size**: the size of the avatar that will be looked up
446 - **email**: email to look up the avatar for
447 - **url**: the (string) generated URL of the avatar
449 ### emailer_send_prepare
450 Called from `Emailer::send()` before building the mime message.
451 `$b` is an array of params to `Emailer::send()`.
453 - **fromName**: name of the sender
454 - **fromEmail**: email fo the sender
455 - **replyTo**: replyTo address to direct responses
456 - **toEmail**: destination email address
457 - **messageSubject**: subject of the message
458 - **htmlVersion**: html version of the message
459 - **textVersion**: text only version of the message
460 - **additionalMailHeader**: additions to the smtp mail header
461 - **sent**: default false, if set to true in the hook, the default mailer will be skipped.
464 Called before calling PHP's `mail()`.
465 `$b` is an array of params to `mail()`.
471 - **sent**: default false, if set to true in the hook, the default mailer will be skipped.
474 Called during `App` initialization to allow addons to load their own configuration file(s) with `App::loadConfigFile()`.
477 Called after the navigational menu is build in `include/nav.php`.
478 `$b` is an array containing `$nav` from `include/nav.php`.
481 Called before vars are passed to the template engine to render the page.
482 The registered function can add,change or remove variables passed to template.
483 `$b` is an array with:
485 - **template**: filename of template
486 - **vars**: array of vars passed to the template
489 Called after the other queries have passed.
490 The registered function can add, change or remove the `acl_lookup()` variables.
492 - **results**: array of the acl_lookup() vars
494 ### prepare_body_init
495 Called at the start of prepare_body
498 - **item** (input/output): item array
500 ### prepare_body_content_filter
501 Called before the HTML conversion in prepare_body. If the item matches a content filter rule set by an addon, it should
502 just add the reason to the filter_reasons element of the hook data.
505 - **item**: item array (input)
506 - **filter_reasons** (input/output): reasons array
509 Called after the HTML conversion in `prepare_body()`.
512 - **item** (input): item array
513 - **html** (input/output): converted item body
514 - **is_preview** (input): post preview flag
515 - **filter_reasons** (input): reasons array
517 ### prepare_body_final
518 Called at the end of `prepare_body()`.
521 - **item**: item array (input)
522 - **html**: converted item body (input/output)
524 ### put_item_in_cache
525 Called after `prepare_text()` in `put_item_in_cache()`.
528 - **item** (input): item array
529 - **rendered-html** (input/output): final item body HTML
530 - **rendered-hash** (input/output): original item body hash
532 ### magic_auth_success
533 Called when a magic-auth was successful.
536 visitor => array with the contact record of the visitor
537 url => the query string
540 Called when displaying the post permission screen.
541 Hook data is a list of form fields that need to be displayed along the ACL.
542 Form field array structure is:
544 - **type**: `checkbox` or `select`.
545 - **field**: Standard field data structure to be used by `field_checkbox.tpl` and `field_select.tpl`.
547 For `checkbox`, **field** is:
548 - [0] (String): Form field name; Mandatory.
549 - [1]: (String): Form field label; Optional, default is none.
550 - [2]: (Boolean): Whether the checkbox should be checked by default; Optional, default is false.
551 - [3]: (String): Additional help text; Optional, default is none.
552 - [4]: (String): Additional HTML attributes; Optional, default is none.
554 For `select`, **field** is:
555 - [0] (String): Form field name; Mandatory.
556 - [1] (String): Form field label; Optional, default is none.
557 - [2] (Boolean): Default value to be selected by default; Optional, default is none.
558 - [3] (String): Additional help text; Optional, default is none.
559 - [4] (Array): Associative array of options. Item key is option value, item value is option label; Mandatory.
562 Called just before dispatching the router.
563 Hook data is a `\FastRoute\RouterCollector` object that should be used to add addon routes pointing to classes.
565 **Notice**: The class whose name is provided in the route handler must be reachable via auto-loader.
569 Called before trying to detect the target network of a URL.
570 If any registered hook function sets the `result` key of the hook data array, it will be returned immediately.
571 Hook functions should also return immediately if the hook data contains an existing result.
575 - **uri** (input): the profile URI.
576 - **network** (input): the target network (can be empty for auto-detection).
577 - **uid** (input): the user to return the contact data for (can be empty for public contacts).
578 - **result** (output): Leave null if address isn't relevant to the connector, set to contact array if probe is successful, false otherwise.
582 Called when trying to probe an item from a given URI.
583 If any registered hook function sets the `item_id` key of the hook data array, it will be returned immediately.
584 Hook functions should also return immediately if the hook data contains an existing `item_id`.
587 - **uri** (input): the item URI.
588 - **uid** (input): the user to return the item data for (can be empty for public contacts).
589 - **item_id** (output): Leave null if URI isn't relevant to the connector, set to created item array if probe is successful, false otherwise.
593 Called to assert whether a connector addon provides follow capabilities.
596 - **protocol** (input): shorthand for the protocol. List of values is available in `src/Core/Protocol.php`.
597 - **result** (output): should be true if the connector provides follow capabilities, left alone otherwise.
599 ### support_revoke_follow
601 Called to assert whether a connector addon provides follow revocation capabilities.
604 - **protocol** (input): shorthand for the protocol. List of values is available in `src/Core/Protocol.php`.
605 - **result** (output): should be true if the connector provides follow revocation capabilities, left alone otherwise.
609 Called before adding a new contact for a user to handle non-native network remote contact (like Twitter).
613 - **url** (input): URL of the remote contact.
614 - **contact** (output): should be filled with the contact (with uid = user creating the contact) array if follow was successful.
618 Called when unfollowing a remote contact on a non-native network (like Twitter)
621 - **contact** (input): the target public contact (uid = 0) array.
622 - **uid** (input): the id of the source local user.
623 - **result** (output): wether the unfollowing is successful or not.
627 Called when making a remote contact on a non-native network (like Twitter) unfollow you.
630 - **contact** (input): the target public contact (uid = 0) array.
631 - **uid** (input): the id of the source local user.
632 - **result** (output): a boolean value indicating wether the operation was successful or not.
636 Called when blocking a remote contact on a non-native network (like Twitter).
639 - **contact** (input): the remote contact (uid = 0) array.
640 - **uid** (input): the user id to issue the block for.
641 - **result** (output): a boolean value indicating wether the operation was successful or not.
645 Called when unblocking a remote contact on a non-native network (like Twitter).
648 - **contact** (input): the remote contact (uid = 0) array.
649 - **uid** (input): the user id to revoke the block for.
650 - **result** (output): a boolean value indicating wether the operation was successful or not.
654 Called when a custom storage is used (e.g. webdav_storage)
657 - **name** (input): the name of the used storage backend
658 - **data['storage']** (output): the storage instance to use (**must** implement `\Friendica\Core\Storage\IWritableStorage`)
662 Called when the admin of the node wants to configure a custom storage (e.g. webdav_storage)
665 - **name** (input): the name of the used storage backend
666 - **data['storage_config']** (output): the storage configuration instance to use (**must** implement `\Friendica\Core\Storage\Capability\IConfigureStorage`)
668 ## Complete list of hook callbacks
670 Here is a complete list of all hook callbacks with file locations (as of 24-Sep-2018). Please see the source for details of any hooks not documented above.
674 Hook::callAll('init_1');
675 Hook::callAll('app_menu', $arr);
676 Hook::callAll('page_content_top', DI::page()['content']);
677 Hook::callAll($a->module.'_mod_init', $placeholder);
678 Hook::callAll($a->module.'_mod_init', $placeholder);
679 Hook::callAll($a->module.'_mod_post', $_POST);
680 Hook::callAll($a->module.'_mod_content', $arr);
681 Hook::callAll($a->module.'_mod_aftercontent', $arr);
682 Hook::callAll('page_end', DI::page()['content']);
686 Hook::callAll('logged_in', $a->user);
687 Hook::callAll('authenticate', $addon_auth);
688 Hook::callAll('logged_in', $a->user);
690 ### include/enotify.php
692 Hook::callAll('enotify', $h);
693 Hook::callAll('enotify_store', $datarray);
694 Hook::callAll('enotify_mail', $datarray);
695 Hook::callAll('check_item_notification', $notification_data);
697 ### src/Content/Conversation.php
699 Hook::callAll('conversation_start', $cb);
700 Hook::callAll('render_location', $locate);
701 Hook::callAll('display_item', $arr);
702 Hook::callAll('display_item', $arr);
703 Hook::callAll('item_photo_menu', $args);
704 Hook::callAll('jot_tool', $jotplugins);
706 ### mod/directory.php
708 Hook::callAll('directory_item', $arr);
712 Hook::callAll('personal_xrd', $arr);
714 ### mod/parse_url.php
716 Hook::callAll("parse_link", $arr);
718 ### src/Module/Delegation.php
720 Hook::callAll('home_init', $ret);
724 Hook::callAll('acl_lookup_end', $results);
728 Hook::callAll('network_content_init', $arr);
729 Hook::callAll('network_tabs', $arr);
731 ### mod/friendica.php
733 Hook::callAll('about_hook', $o);
737 Hook::callAll('profile_post', $_POST);
738 Hook::callAll('profile_edit', $arr);
742 Hook::callAll('addon_settings_post', $_POST);
743 Hook::callAll('connector_settings_post', $_POST);
744 Hook::callAll('display_settings_post', $_POST);
745 Hook::callAll('addon_settings', $settings_addons);
746 Hook::callAll('connector_settings', $settings_connectors);
747 Hook::callAll('display_settings', $o);
751 Hook::callAll('photo_post_init', $_POST);
752 Hook::callAll('photo_post_file', $ret);
753 Hook::callAll('photo_post_end', $foo);
754 Hook::callAll('photo_post_end', $foo);
755 Hook::callAll('photo_post_end', $foo);
756 Hook::callAll('photo_post_end', $foo);
757 Hook::callAll('photo_post_end', intval($item_id));
758 Hook::callAll('photo_upload_form', $ret);
762 Hook::callAll('profile_advanced', $o);
766 Hook::callAll('home_init', $ret);
767 Hook::callAll("home_content", $content);
771 Hook::callAll('contact_edit_post', $_POST);
772 Hook::callAll('contact_edit', $arr);
776 Hook::callAll('post_local_end', $arr);
780 Hook::callAll('uexport_options', $options);
784 Hook::callAll('register_post', $arr);
785 Hook::callAll('register_form', $arr);
789 Hook::callAll('post_local_start', $_REQUEST);
790 Hook::callAll('post_local', $datarray);
791 Hook::callAll('post_local_end', $datarray);
795 Hook::callAll('jot_tool', $jotplugins);
797 ### src/Render/FriendicaSmartyEngine.php
799 Hook::callAll("template_vars", $arr);
803 Hook::callAll('load_config');
804 Hook::callAll('head');
805 Hook::callAll('footer');
806 Hook::callAll('route_collection');
808 ### src/Model/Item.php
810 Hook::callAll('post_local', $item);
811 Hook::callAll('post_remote', $item);
812 Hook::callAll('post_local_end', $posted_item);
813 Hook::callAll('post_remote_end', $posted_item);
814 Hook::callAll('tagged', $arr);
815 Hook::callAll('post_local_end', $new_item);
816 Hook::callAll('put_item_in_cache', $hook_data);
817 Hook::callAll('prepare_body_init', $item);
818 Hook::callAll('prepare_body_content_filter', $hook_data);
819 Hook::callAll('prepare_body', $hook_data);
820 Hook::callAll('prepare_body_final', $hook_data);
822 ### src/Model/Contact.php
824 Hook::callAll('contact_photo_menu', $args);
825 Hook::callAll('follow', $arr);
827 ### src/Model/Profile.php
829 Hook::callAll('profile_sidebar_enter', $profile);
830 Hook::callAll('profile_sidebar', $arr);
831 Hook::callAll('profile_tabs', $arr);
832 Hook::callAll('zrl_init', $arr);
833 Hook::callAll('magic_auth_success', $arr);
835 ### src/Model/Event.php
837 Hook::callAll('event_updated', $event['id']);
838 Hook::callAll("event_created", $event['id']);
840 ### src/Model/Register.php
842 Hook::callAll('authenticate', $addon_auth);
844 ### src/Model/User.php
846 Hook::callAll('authenticate', $addon_auth);
847 Hook::callAll('register_account', $uid);
848 Hook::callAll('remove_user', $user);
850 ### src/Module/Notifications/Ping.php
852 Hook::callAll('network_ping', $arr);
854 ### src/Module/PermissionTooltip.php
856 Hook::callAll('lockview_content', $item);
858 ### src/Module/Settings/Delegation.php
860 Hook::callAll('authenticate', $addon_auth);
862 ### src/Module/Settings/TwoFactor/Index.php
864 Hook::callAll('authenticate', $addon_auth);
866 ### src/Security/Authenticate.php
868 Hook::callAll('authenticate', $addon_auth);
870 ### src/Security/ExAuth.php
872 Hook::callAll('authenticate', $addon_auth);
874 ### src/Content/ContactBlock.php
876 Hook::callAll('contact_block_end', $arr);
878 ### src/Content/Text/BBCode.php
880 Hook::callAll('bbcode', $text);
881 Hook::callAll('bb2diaspora', $text);
883 ### src/Content/Text/HTML.php
885 Hook::callAll('html2bbcode', $message);
887 ### src/Content/Smilies.php
889 Hook::callAll('smilie', $params);
891 ### src/Content/Feature.php
893 Hook::callAll('isEnabled', $arr);
894 Hook::callAll('get', $arr);
896 ### src/Content/ContactSelector.php
898 Hook::callAll('network_to_name', $nets);
900 ### src/Content/OEmbed.php
902 Hook::callAll('oembed_fetch_url', $embedurl, $j);
904 ### src/Content/Nav.php
906 Hook::callAll('page_header', DI::page()['nav']);
907 Hook::callAll('nav_info', $nav);
909 ### src/Core/Authentication.php
911 Hook::callAll('logged_in', $a->user);
913 ### src/Core/Protocol.php
915 Hook::callAll('support_follow', $hook_data);
916 Hook::callAll('support_revoke_follow', $hook_data);
917 Hook::callAll('unfollow', $hook_data);
918 Hook::callAll('revoke_follow', $hook_data);
919 Hook::callAll('block', $hook_data);
920 Hook::callAll('unblock', $hook_data);
922 ### src/Core/Logger/Factory.php
924 Hook::callAll('logger_instance', $data);
926 ### src/Core/StorageManager
928 Hook::callAll('storage_instance', $data);
929 Hook::callAll('storage_config', $data);
931 ### src/Worker/Directory.php
933 Hook::callAll('globaldir_update', $arr);
935 ### src/Worker/Notifier.php
937 Hook::callAll('notifier_end', $target_item);
939 ### src/Module/Login.php
941 Hook::callAll('login_hook', $o);
943 ### src/Module/Logout.php
945 Hook::callAll("logging_out");
947 ### src/Object/Post.php
949 Hook::callAll('render_location', $locate);
950 Hook::callAll('display_item', $arr);
954 Hook::callAll('contact_select_options', $x);
955 Hook::callAll($a->module.'_pre_'.$selname, $arr);
956 Hook::callAll($a->module.'_post_'.$selname, $o);
957 Hook::callAll($a->module.'_pre_'.$selname, $arr);
958 Hook::callAll($a->module.'_post_'.$selname, $o);
959 Hook::callAll('jot_networks', $jotnets);
961 ### src/Core/Authentication.php
963 Hook::callAll('logged_in', $a->user);
964 Hook::callAll('authenticate', $addon_auth);
966 ### src/Core/Hook.php
968 self::callSingle(self::getApp(), 'hook_fork', $fork_hook, $hookdata);
970 ### src/Core/Worker.php
972 Hook::callAll("proc_run", $arr);
974 ### src/Util/Emailer.php
976 Hook::callAll('emailer_send_prepare', $params);
977 Hook::callAll("emailer_send", $hookdata);
981 Hook::callAll('generate_map', $arr);
982 Hook::callAll('generate_named_map', $arr);
983 Hook::callAll('Map::getCoordinates', $arr);
985 ### src/Util/Network.php
987 Hook::callAll('avatar_lookup', $avatar);
989 ### src/Util/ParseUrl.php
991 Hook::callAll("getsiteinfo", $siteinfo);
993 ### src/Protocol/DFRN.php
995 Hook::callAll('atom_feed_end', $atom);
996 Hook::callAll('atom_feed_end', $atom);
998 ### src/Protocol/Email.php
1000 Hook::callAll('email_getmessage', $message);
1001 Hook::callAll('email_getmessage_end', $ret);
1005 document.dispatchEvent(new Event('postprocess_liveupdate'));