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" and "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 most one argument
65 function <addon>_<hookname>(&$b) {
69 If you wish to make changes to the calling data, you must declare them as reference variables (with `&`) during function declaration.
72 $b can be called anything you like.
73 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.
74 Remember to declare it with `&` if you wish to alter it.
78 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.
80 Simply declare a `<addon>_addon_admin()` function to display the form and a `<addon>_addon_admin_post()` function to process the data from the form.0
84 If your addon requires adding a stylesheet on all pages of Friendica, add the following hook:
87 function <addon>_install()
89 \Friendica\Core\Hook::register('head', __FILE__, '<addon>_head');
94 function <addon>_head()
96 \Friendica\DI::page()->registerStylesheet(__DIR__ . '/relative/path/to/addon/stylesheet.css');
100 `__DIR__` is the folder path of your addon.
106 If your addon requires adding a script on all pages of Friendica, add the following hook:
110 function <addon>_install()
112 \Friendica\Core\Hook::register('footer', __FILE__, '<addon>_footer');
116 function <addon>_footer()
118 \Friendica\DI::page()->registerFooterScript(__DIR__ . '/relative/path/to/addon/script.js');
122 `__DIR__` is the folder path of your addon.
126 The main Friendica script provides hooks via events dispatched on the `document` property.
127 In your JavaScript file included as described above, add your event listener like this:
130 document.addEventListener(name, callback);
133 - *name* is the name of the hook and corresponds to a known Friendica JavaScript hook.
134 - *callback* is a JavaScript anonymous function to execute.
136 More info about JavaScript event listeners: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
138 #### Current JavaScript hooks
140 ##### postprocess_liveupdate
141 Called at the end of the live update process (XmlHttpRequest) and on a post preview.
142 No additional data is provided.
146 Addons may also act as "modules" and intercept all page requests for a given URL path.
147 In order for a addon to act as a module it needs to declare an empty function `<addon>_module()`.
149 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.
150 These are parsed into the `App\Arguments` object.
151 So `https://my.web.site/addon/arg1/arg2` would give this:
153 DI::args()->getArgc(); // = 3
154 DI::args()->get(0); // = 'addon'
155 DI::args()->get(1); // = 'arg1'
156 DI::args()->get(2); // = 'arg2'
159 To display a module page, you need to declare the function `<addon>_content()`, which defines and returns the page body content.
160 They may also contain `<addon>_post()` which is called before the `<addon>_content` function and typically handles the results of POST forms.
161 You may also have `<addon>_init()` which is called before `<addon>_content` and should include common logic to your module.
165 If your addon needs some template, you can use the Friendica template system.
166 Friendica uses [smarty3](http://www.smarty.net/) as a template engine.
168 Put your tpl files in the *templates/* subfolder of your addon.
170 In your code, like in the function addon_name_content(), load the template file and execute it passing needed values:
173 use Friendica\Core\Renderer;
175 # load template file. first argument is the template name,
176 # second is the addon path relative to friendica top folder
177 $tpl = Renderer::getMarkupTemplate('mytemplate.tpl', __DIR__);
179 # apply template. first argument is the loaded template,
180 # second an array of 'name' => 'values' to pass to template
181 $output = Renderer::replaceMacros($tpl, array(
182 'title' => 'My beautiful addon',
186 See also the wiki page [Quick Template Guide](https://github.com/friendica/friendica/wiki/Quick-Template-Guide).
191 Called when a user attempts to login.
192 `$b` is an array containing:
194 - **username**: the supplied username
195 - **password**: the supplied password
196 - **authenticated**: set this to non-zero to authenticate the user.
197 - **user_record**: successful authentication must also return a valid user record from the database
200 Called after a user has successfully logged in.
201 `$b` contains the `App->user` array.
204 Called when formatting a post for display.
207 - **item**: The item (array) details pulled from the database
208 - **output**: the (string) HTML representation of this item prior to adding it to the page
211 Called when a status post or comment is entered on the local system.
212 `$b` is the item array of the information to be stored in the database.
213 Please note: body contents are bbcode - not HTML.
216 Called when a local status post or comment has been stored on the local system.
217 `$b` is the item array of the information which has just been stored in the database.
218 Please note: body contents are bbcode - not HTML
221 Called when receiving a post from another source. This may also be used to post local activity or system generated messages.
222 `$b` is the item array of information to be stored in the database and the item body is bbcode.
225 Called when generating the HTML for the addon settings page.
226 `$data` is an array containing:
228 - **addon** (output): Required. The addon folder name.
229 - **title** (output): Required. The addon settings panel title.
230 - **href** (output): Optional. If set, will reduce the panel to a link pointing to this URL, can be relative. Incompatible with the following keys.
231 - **html** (output): Optional. Raw HTML of the addon form elements. Both the `<form>` tags and the submit buttons are taken care of elsewhere.
232 - **submit** (output): Optional. If unset, a default submit button with `name="<addon name>-submit"` will be generated.
233 Can take different value types:
234 - **string**: The label to replace the default one.
235 - **associative array**: A list of submit button, the key is the value of the `name` attribute, the value is the displayed label.
236 The first submit button in this list is considered the main one and themes might emphasize its display.
243 'addon' => 'advancedcontentfilter',
244 'title' => DI::l10n()->t('Advanced Content Filter'),
245 'href' => 'advancedcontentfilter',
248 ##### With default submit button
251 'addon' => 'fromapp',
252 'title' => DI::l10n()->t('FromApp Settings'),
256 ##### With no HTML, just a submit button
259 'addon' => 'opmlexport',
260 'title' => DI::l10n()->t('OPML Export'),
261 'submit' => DI::l10n()->t('Export RSS/Atom contacts'),
264 ##### With multiple submit buttons
267 'addon' => 'catavatar',
268 'title' => DI::l10n()->t('Cat Avatar Settings'),
271 'catavatar-usecat' => DI::l10n()->t('Use Cat as Avatar'),
272 'catavatar-morecat' => DI::l10n()->t('Another random Cat!'),
273 'catavatar-emailcat' => DI::pConfig()->get(Session::getLocalUser(), 'catavatar', 'seed', false) ? DI::l10n()->t('Reset to email Cat') : null,
278 ### addon_settings_post
279 Called when the Addon Settings pages are submitted.
280 `$b` is the $_POST array.
282 ### connector_settings
283 Called when generating the HTML for a connector addon settings page.
284 `$data` is an array containing:
286 - **connector** (output): Required. The addon folder name.
287 - **title** (output): Required. The addon settings panel title.
288 - **image** (output): Required. The relative path of the logo image of the platform/protocol this addon is connecting to, max size 48x48px.
289 - **enabled** (output): Optional. If set to a falsy value, the connector image will be dimmed.
290 - **html** (output): Optional. Raw HTML of the addon form elements. Both the `<form>` tags and the submit buttons are taken care of elsewhere.
291 - **submit** (output): Optional. If unset, a default submit button with `name="<addon name>-submit"` will be generated.
292 Can take different value types:
293 - **string**: The label to replace the default one.
294 - **associative array**: A list of submit button, the key is the value of the `name` attribute, the value is the displayed label.
295 The first submit button in this list is considered the main one and themes might emphasize its display.
299 ##### With default submit button
302 'connector' => 'diaspora',
303 'title' => DI::l10n()->t('Diaspora Export'),
304 'image' => 'images/diaspora-logo.png',
305 'enabled' => $enabled,
310 ##### With custom submit button label and no logo dim
313 'connector' => 'ifttt',
314 'title' => DI::l10n()->t('IFTTT Mirror'),
315 'image' => 'addon/ifttt/ifttt.png',
317 'submit' => DI::l10n()->t('Generate new key'),
321 ##### With conditional submit buttons
323 $submit = ['pumpio-submit' => DI::l10n()->t('Save Settings')];
324 if ($oauth_token && $oauth_token_secret) {
325 $submit['pumpio-delete'] = DI::l10n()->t('Delete this preset');
329 'connector' => 'pumpio',
330 'title' => DI::l10n()->t('Pump.io Import/Export/Mirror'),
331 'image' => 'images/pumpio.png',
332 'enabled' => $enabled,
339 Called when posting a profile page.
340 `$b` is the $_POST array.
343 Called prior to output of profile edit page.
344 `$b` is an array containing:
346 - **profile**: profile (array) record from the database
347 - **entry**: the (string) HTML of the generated entry
350 Called when the HTML is generated for the Advanced profile, corresponding to the Profile tab within a person's profile page.
351 `$b` is the HTML string representation of the generated profile.
352 The profile array details are in `App->profile`.
355 Called from the Directory page when formatting an item for display.
358 - **contact**: contact record array for the person from the database
359 - **entry**: the HTML string of the generated entry
361 ### profile_sidebar_enter
362 Called prior to generating the sidebar "short" profile for a page.
363 `$b` is the person's profile array
366 Called when generating the sidebar "short" profile for a page.
369 - **profile**: profile record array for the person from the database
370 - **entry**: the HTML string of the generated entry
372 ### contact_block_end
373 Called when formatting the block of contacts/friends on a profile sidebar has completed.
376 - **contacts**: array of contacts
377 - **output**: the generated HTML string of the contact block
380 Called after conversion of bbcode to HTML.
381 `$b` is an HTML string converted text.
384 Called after tag conversion of HTML to bbcode (e.g. remote message posting)
385 `$b` is a string converted text
388 Called when building the `<head>` sections.
389 Stylesheets should be registered using this hook.
390 `$b` is an HTML string of the `<head>` tag.
393 Called after building the page navigation section.
394 `$b` is a string HTML of nav region.
397 Called prior to output of personal XRD file.
400 - **user**: the user record array for the person
401 - **xml**: the complete XML string to be output
404 Called prior to output home page content, shown to unlogged users.
405 `$b` is the HTML string of section region.
408 Called when editing contact details on an individual from the Contacts page.
411 - **contact**: contact record (array) of target contact
412 - **output**: the (string) generated HTML of the contact edit page
414 ### contact_edit_post
415 Called when posting the contact edit page.
416 `$b` is the `$_POST` array
419 Called just after DB has been opened and before session start.
423 Called after HTML content functions have completed.
424 `$b` is (string) HTML of content div.
427 Called after HTML content functions have completed.
428 Deferred JavaScript files should be registered using this hook.
429 `$b` is (string) HTML of footer div/element.
432 Called when looking up the avatar. `$b` is an array:
434 - **size**: the size of the avatar that will be looked up
435 - **email**: email to look up the avatar for
436 - **url**: the (string) generated URL of the avatar
438 ### emailer_send_prepare
439 Called from `Emailer::send()` before building the mime message.
440 `$b` is an array of params to `Emailer::send()`.
442 - **fromName**: name of the sender
443 - **fromEmail**: email fo the sender
444 - **replyTo**: replyTo address to direct responses
445 - **toEmail**: destination email address
446 - **messageSubject**: subject of the message
447 - **htmlVersion**: html version of the message
448 - **textVersion**: text only version of the message
449 - **additionalMailHeader**: additions to the smtp mail header
450 - **sent**: default false, if set to true in the hook, the default mailer will be skipped.
453 Called before calling PHP's `mail()`.
454 `$b` is an array of params to `mail()`.
460 - **sent**: default false, if set to true in the hook, the default mailer will be skipped.
463 Called during `App` initialization to allow addons to load their own configuration file(s) with `App::loadConfigFile()`.
466 Called after the navigational menu is build in `include/nav.php`.
467 `$b` is an array containing `$nav` from `include/nav.php`.
470 Called before vars are passed to the template engine to render the page.
471 The registered function can add,change or remove variables passed to template.
472 `$b` is an array with:
474 - **template**: filename of template
475 - **vars**: array of vars passed to the template
478 Called after the other queries have passed.
479 The registered function can add, change or remove the `acl_lookup()` variables.
481 - **results**: array of the acl_lookup() vars
483 ### prepare_body_init
484 Called at the start of prepare_body
487 - **item** (input/output): item array
489 ### prepare_body_content_filter
490 Called before the HTML conversion in prepare_body. If the item matches a content filter rule set by an addon, it should
491 just add the reason to the filter_reasons element of the hook data.
494 - **item**: item array (input)
495 - **filter_reasons** (input/output): reasons array
498 Called after the HTML conversion in `prepare_body()`.
501 - **item** (input): item array
502 - **html** (input/output): converted item body
503 - **is_preview** (input): post preview flag
504 - **filter_reasons** (input): reasons array
506 ### prepare_body_final
507 Called at the end of `prepare_body()`.
510 - **item**: item array (input)
511 - **html**: converted item body (input/output)
513 ### put_item_in_cache
514 Called after `prepare_text()` in `put_item_in_cache()`.
517 - **item** (input): item array
518 - **rendered-html** (input/output): final item body HTML
519 - **rendered-hash** (input/output): original item body hash
521 ### magic_auth_success
522 Called when a magic-auth was successful.
525 visitor => array with the contact record of the visitor
526 url => the query string
529 Called when displaying the post permission screen.
530 Hook data is a list of form fields that need to be displayed along the ACL.
531 Form field array structure is:
533 - **type**: `checkbox` or `select`.
534 - **field**: Standard field data structure to be used by `field_checkbox.tpl` and `field_select.tpl`.
536 For `checkbox`, **field** is:
537 - [0] (String): Form field name; Mandatory.
538 - [1]: (String): Form field label; Optional, default is none.
539 - [2]: (Boolean): Whether the checkbox should be checked by default; Optional, default is false.
540 - [3]: (String): Additional help text; Optional, default is none.
541 - [4]: (String): Additional HTML attributes; Optional, default is none.
543 For `select`, **field** is:
544 - [0] (String): Form field name; Mandatory.
545 - [1] (String): Form field label; Optional, default is none.
546 - [2] (Boolean): Default value to be selected by default; Optional, default is none.
547 - [3] (String): Additional help text; Optional, default is none.
548 - [4] (Array): Associative array of options. Item key is option value, item value is option label; Mandatory.
551 Called just before dispatching the router.
552 Hook data is a `\FastRoute\RouterCollector` object that should be used to add addon routes pointing to classes.
554 **Notice**: The class whose name is provided in the route handler must be reachable via auto-loader.
558 Called before trying to detect the target network of a URL.
559 If any registered hook function sets the `result` key of the hook data array, it will be returned immediately.
560 Hook functions should also return immediately if the hook data contains an existing result.
564 - **uri** (input): the profile URI.
565 - **network** (input): the target network (can be empty for auto-detection).
566 - **uid** (input): the user to return the contact data for (can be empty for public contacts).
567 - **result** (output): Leave null if address isn't relevant to the connector, set to contact array if probe is successful, false otherwise.
571 Called when trying to probe an item from a given URI.
572 If any registered hook function sets the `item_id` key of the hook data array, it will be returned immediately.
573 Hook functions should also return immediately if the hook data contains an existing `item_id`.
576 - **uri** (input): the item URI.
577 - **uid** (input): the user to return the item data for (can be empty for public contacts).
578 - **item_id** (output): Leave null if URI isn't relevant to the connector, set to created item array if probe is successful, false otherwise.
582 Called to assert whether a connector addon provides follow capabilities.
585 - **protocol** (input): shorthand for the protocol. List of values is available in `src/Core/Protocol.php`.
586 - **result** (output): should be true if the connector provides follow capabilities, left alone otherwise.
588 ### support_revoke_follow
590 Called to assert whether a connector addon provides follow revocation capabilities.
593 - **protocol** (input): shorthand for the protocol. List of values is available in `src/Core/Protocol.php`.
594 - **result** (output): should be true if the connector provides follow revocation capabilities, left alone otherwise.
598 Called before adding a new contact for a user to handle non-native network remote contact (like Twitter).
602 - **url** (input): URL of the remote contact.
603 - **contact** (output): should be filled with the contact (with uid = user creating the contact) array if follow was successful.
607 Called when unfollowing a remote contact on a non-native network (like Twitter)
610 - **contact** (input): the target public contact (uid = 0) array.
611 - **uid** (input): the id of the source local user.
612 - **result** (output): wether the unfollowing is successful or not.
616 Called when making a remote contact on a non-native network (like Twitter) unfollow you.
619 - **contact** (input): the target public contact (uid = 0) array.
620 - **uid** (input): the id of the source local user.
621 - **result** (output): a boolean value indicating wether the operation was successful or not.
625 Called when blocking a remote contact on a non-native network (like Twitter).
628 - **contact** (input): the remote contact (uid = 0) array.
629 - **uid** (input): the user id to issue the block for.
630 - **result** (output): a boolean value indicating wether the operation was successful or not.
634 Called when unblocking a remote contact on a non-native network (like Twitter).
637 - **contact** (input): the remote contact (uid = 0) array.
638 - **uid** (input): the user id to revoke the block for.
639 - **result** (output): a boolean value indicating wether the operation was successful or not.
643 Called to assert whether a connector addon provides probing capabilities.
646 - **protocol** (input): shorthand for the protocol. List of values is available in `src/Core/Protocol.php`.
647 - **result** (output): should be true if the connector provides follow capabilities, left alone otherwise.
651 Called when a custom storage is used (e.g. webdav_storage)
654 - **name** (input): the name of the used storage backend
655 - **data['storage']** (output): the storage instance to use (**must** implement `\Friendica\Core\Storage\IWritableStorage`)
659 Called when the admin of the node wants to configure a custom storage (e.g. webdav_storage)
662 - **name** (input): the name of the used storage backend
663 - **data['storage_config']** (output): the storage configuration instance to use (**must** implement `\Friendica\Core\Storage\Capability\IConfigureStorage`)
665 ## Complete list of hook callbacks
667 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.
671 Hook::callAll('init_1');
672 Hook::callAll('app_menu', $arr);
673 Hook::callAll('page_content_top', DI::page()['content']);
674 Hook::callAll($a->module.'_mod_init', $placeholder);
675 Hook::callAll($a->module.'_mod_init', $placeholder);
676 Hook::callAll($a->module.'_mod_post', $_POST);
677 Hook::callAll($a->module.'_mod_content', $arr);
678 Hook::callAll($a->module.'_mod_aftercontent', $arr);
679 Hook::callAll('page_end', DI::page()['content']);
683 Hook::callAll('logged_in', $a->user);
684 Hook::callAll('authenticate', $addon_auth);
685 Hook::callAll('logged_in', $a->user);
687 ### include/enotify.php
689 Hook::callAll('enotify', $h);
690 Hook::callAll('enotify_store', $datarray);
691 Hook::callAll('enotify_mail', $datarray);
692 Hook::callAll('check_item_notification', $notification_data);
694 ### src/Content/Conversation.php
696 Hook::callAll('conversation_start', $cb);
697 Hook::callAll('render_location', $locate);
698 Hook::callAll('display_item', $arr);
699 Hook::callAll('display_item', $arr);
700 Hook::callAll('item_photo_menu', $args);
701 Hook::callAll('jot_tool', $jotplugins);
703 ### mod/directory.php
705 Hook::callAll('directory_item', $arr);
709 Hook::callAll('personal_xrd', $arr);
711 ### mod/parse_url.php
713 Hook::callAll("parse_link", $arr);
715 ### src/Module/Delegation.php
717 Hook::callAll('home_init', $ret);
721 Hook::callAll('acl_lookup_end', $results);
725 Hook::callAll('network_content_init', $arr);
726 Hook::callAll('network_tabs', $arr);
728 ### mod/friendica.php
730 Hook::callAll('about_hook', $o);
734 Hook::callAll('profile_post', $_POST);
735 Hook::callAll('profile_edit', $arr);
739 Hook::callAll('addon_settings_post', $_POST);
740 Hook::callAll('connector_settings_post', $_POST);
741 Hook::callAll('display_settings_post', $_POST);
742 Hook::callAll('addon_settings', $settings_addons);
743 Hook::callAll('connector_settings', $settings_connectors);
744 Hook::callAll('display_settings', $o);
748 Hook::callAll('photo_post_init', $_POST);
749 Hook::callAll('photo_post_file', $ret);
750 Hook::callAll('photo_post_end', $foo);
751 Hook::callAll('photo_post_end', $foo);
752 Hook::callAll('photo_post_end', $foo);
753 Hook::callAll('photo_post_end', $foo);
754 Hook::callAll('photo_post_end', intval($item_id));
755 Hook::callAll('photo_upload_form', $ret);
759 Hook::callAll('profile_advanced', $o);
763 Hook::callAll('home_init', $ret);
764 Hook::callAll("home_content", $content);
768 Hook::callAll('contact_edit_post', $_POST);
769 Hook::callAll('contact_edit', $arr);
773 Hook::callAll('post_local_end', $arr);
777 Hook::callAll('uexport_options', $options);
781 Hook::callAll('register_post', $arr);
782 Hook::callAll('register_form', $arr);
786 Hook::callAll('post_local_start', $_REQUEST);
787 Hook::callAll('post_local', $datarray);
788 Hook::callAll('post_local_end', $datarray);
790 ### src/Render/FriendicaSmartyEngine.php
792 Hook::callAll("template_vars", $arr);
796 Hook::callAll('load_config');
797 Hook::callAll('head');
798 Hook::callAll('footer');
799 Hook::callAll('route_collection');
801 ### src/Model/Item.php
803 Hook::callAll('post_local', $item);
804 Hook::callAll('post_remote', $item);
805 Hook::callAll('post_local_end', $posted_item);
806 Hook::callAll('post_remote_end', $posted_item);
807 Hook::callAll('tagged', $arr);
808 Hook::callAll('post_local_end', $new_item);
809 Hook::callAll('put_item_in_cache', $hook_data);
810 Hook::callAll('prepare_body_init', $item);
811 Hook::callAll('prepare_body_content_filter', $hook_data);
812 Hook::callAll('prepare_body', $hook_data);
813 Hook::callAll('prepare_body_final', $hook_data);
815 ### src/Model/Contact.php
817 Hook::callAll('contact_photo_menu', $args);
818 Hook::callAll('follow', $arr);
820 ### src/Model/Profile.php
822 Hook::callAll('profile_sidebar_enter', $profile);
823 Hook::callAll('profile_sidebar', $arr);
824 Hook::callAll('profile_tabs', $arr);
825 Hook::callAll('zrl_init', $arr);
826 Hook::callAll('magic_auth_success', $arr);
828 ### src/Model/Event.php
830 Hook::callAll('event_updated', $event['id']);
831 Hook::callAll("event_created", $event['id']);
833 ### src/Model/Register.php
835 Hook::callAll('authenticate', $addon_auth);
837 ### src/Model/User.php
839 Hook::callAll('authenticate', $addon_auth);
840 Hook::callAll('register_account', $uid);
841 Hook::callAll('remove_user', $user);
843 ### src/Module/Notifications/Ping.php
845 Hook::callAll('network_ping', $arr);
847 ### src/Module/PermissionTooltip.php
849 Hook::callAll('lockview_content', $item);
851 ### src/Module/Post/Edit.php
853 Hook::callAll('jot_tool', $jotplugins);
855 ### src/Module/Settings/Delegation.php
857 Hook::callAll('authenticate', $addon_auth);
859 ### src/Module/Settings/TwoFactor/Index.php
861 Hook::callAll('authenticate', $addon_auth);
863 ### src/Security/Authenticate.php
865 Hook::callAll('authenticate', $addon_auth);
867 ### src/Security/ExAuth.php
869 Hook::callAll('authenticate', $addon_auth);
871 ### src/Content/ContactBlock.php
873 Hook::callAll('contact_block_end', $arr);
875 ### src/Content/Text/BBCode.php
877 Hook::callAll('bbcode', $text);
878 Hook::callAll('bb2diaspora', $text);
880 ### src/Content/Text/HTML.php
882 Hook::callAll('html2bbcode', $message);
884 ### src/Content/Smilies.php
886 Hook::callAll('smilie', $params);
888 ### src/Content/Feature.php
890 Hook::callAll('isEnabled', $arr);
891 Hook::callAll('get', $arr);
893 ### src/Content/ContactSelector.php
895 Hook::callAll('network_to_name', $nets);
897 ### src/Content/OEmbed.php
899 Hook::callAll('oembed_fetch_url', $embedurl, $j);
901 ### src/Content/Nav.php
903 Hook::callAll('page_header', DI::page()['nav']);
904 Hook::callAll('nav_info', $nav);
906 ### src/Core/Authentication.php
908 Hook::callAll('logged_in', $a->user);
910 ### src/Core/Protocol.php
912 Hook::callAll('support_follow', $hook_data);
913 Hook::callAll('support_revoke_follow', $hook_data);
914 Hook::callAll('unfollow', $hook_data);
915 Hook::callAll('revoke_follow', $hook_data);
916 Hook::callAll('block', $hook_data);
917 Hook::callAll('unblock', $hook_data);
918 Hook::callAll('support_probe', $hook_data);
920 ### src/Core/Logger/Factory.php
922 Hook::callAll('logger_instance', $data);
924 ### src/Core/StorageManager
926 Hook::callAll('storage_instance', $data);
927 Hook::callAll('storage_config', $data);
929 ### src/Worker/Directory.php
931 Hook::callAll('globaldir_update', $arr);
933 ### src/Worker/Notifier.php
935 Hook::callAll('notifier_end', $target_item);
937 ### src/Module/Login.php
939 Hook::callAll('login_hook', $o);
941 ### src/Module/Logout.php
943 Hook::callAll("logging_out");
945 ### src/Object/Post.php
947 Hook::callAll('render_location', $locate);
948 Hook::callAll('display_item', $arr);
952 Hook::callAll('contact_select_options', $x);
953 Hook::callAll($a->module.'_pre_'.$selname, $arr);
954 Hook::callAll($a->module.'_post_'.$selname, $o);
955 Hook::callAll($a->module.'_pre_'.$selname, $arr);
956 Hook::callAll($a->module.'_post_'.$selname, $o);
957 Hook::callAll('jot_networks', $jotnets);
959 ### src/Core/Authentication.php
961 Hook::callAll('logged_in', $a->user);
962 Hook::callAll('authenticate', $addon_auth);
964 ### src/Core/Hook.php
966 self::callSingle(self::getApp(), 'hook_fork', $fork_hook, $hookdata);
968 ### src/Core/Worker.php
970 Hook::callAll("proc_run", $arr);
972 ### src/Util/Emailer.php
974 Hook::callAll('emailer_send_prepare', $params);
975 Hook::callAll("emailer_send", $hookdata);
979 Hook::callAll('generate_map', $arr);
980 Hook::callAll('generate_named_map', $arr);
981 Hook::callAll('Map::getCoordinates', $arr);
983 ### src/Util/Network.php
985 Hook::callAll('avatar_lookup', $avatar);
987 ### src/Util/ParseUrl.php
989 Hook::callAll("getsiteinfo", $siteinfo);
991 ### src/Protocol/DFRN.php
993 Hook::callAll('atom_feed_end', $atom);
994 Hook::callAll('atom_feed_end', $atom);
996 ### src/Protocol/Email.php
998 Hook::callAll('email_getmessage', $message);
999 Hook::callAll('email_getmessage_end', $ret);
1003 document.dispatchEvent(new Event('postprocess_liveupdate'));