Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
docs:addons [2020-09-27 14:07] Admin Istratordocs:addons [2022-06-25 10:10] (current) – [Templates] Tobias
Line 1: Line 1:
-<markdown>+====== Friendica Addon development ======
  
-Friendica Addon development +Please see the sample addon ‘randplace’ for a working example of using some of these features. Addons work by intercepting event hooks - which must be registered. Modules work by intercepting specific page requests (by URL path).
-==============+
  
-* [Home](help)+===== Naming =====
  
-Please see the sample addon 'randplace' for a working example of using some of these features. +Addon names are used in file paths and functions names, and as such: Can’t contain spaces or punctuation- Can’t start with a number.
-Addons work by intercepting event hooks which must be registered. +
-Modules work by intercepting specific page requests (by URL path).+
  
-## Naming +===== Metadata =====
- +
-Addon names are used in file paths and functions names, and as such: +
-- Can't contain spaces or punctuation. +
-- Can't start with a number. +
- +
-## Metadata+
  
 You can provide human-readable information about your addon in the first multi-line comment of your addon file. You can provide human-readable information about your addon in the first multi-line comment of your addon file.
  
-Here's the structure:+Heres the structure:
  
-```php+<code php>
 /** /**
  * Name: {Human-readable name}  * Name: {Human-readable name}
Line 33: Line 24:
  * Status: {Unsupported|Arbitrary status}  * Status: {Unsupported|Arbitrary status}
  */  */
-``` +</code> 
-  +You can also provide a longer documentation in a ''%%README%%'' or ''%%README.md%%'' file. The latter will be converted from Markdown to HTML in the addon detail page.
-You can also provide a longer documentation in a `READMEor `README.mdfile. +
-The latter will be converted from Markdown to HTML in the addon detail page.+
  
-## Install/Uninstall+===== Install/Uninstall =====
  
-If your addon uses hooks, they have to be registered in a `<addon>_install()function. +If your addon uses hooks, they have to be registered in a ''%%<addon>_install()%%'' function. This function also allows to perform arbitrary actions your addon needs to function properly.
-This function also allows to perform arbitrary actions your addon needs to function properly.+
  
-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.+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.
  
-The install and uninstall functions will be called (i.e. re-installed) if the addon changes after installation. +The install and uninstall functions will be called (i.e. re-installed) if the addon changes after installation. Therefore your uninstall should not destroy data and install should consider that data may already exist. Future extensions may provide for setup” amd remove.
-Therefore your uninstall should not destroy data and install should consider that data may already exist. +
-Future extensions may provide for "setupamd "remove".+
  
-## PHP addon hooks+===== PHP addon hooks =====
  
 Register your addon hooks during installation. Register your addon hooks during installation.
  
-    \Friendica\Core\Hook::register($hookname, $file, $function);+<code> 
 +\Friendica\Core\Hook::register($hookname, $file, $function); 
 +</code> 
 +''%%$hookname%%'' is a string and corresponds to a known Friendica PHP hook.
  
-`$hookname` is a string and corresponds to a known Friendica PHP hook.+''%%$file%%'' is a pathname relative to the top-level Friendica directory. This //should// be ‘addon///addon_name/////addon_name//.php’ in most cases and can be shortened to ''%%__FILE__%%''.
  
-`$file` is a pathname relative to the top-level Friendica directory. +''%%$function%%'' is a string and is the name of the function which will be executed when the hook is called.
-This *should* be 'addon/*addon_name*/*addon_name*.php' in most cases and can be shortened to `__FILE__`.+
  
-`$function` is a string and is the name of the function which will be executed when the hook is called.+==== Arguments ====
  
-### Arguments 
 Your hook callback functions will be called with at least one and possibly two arguments Your hook callback functions will be called with at least one and possibly two arguments
  
-    function <addon>_<hookname>(App $a, &$b) {+<code> 
 +function <addon>_<hookname>(App $a, &$b) {
  
-    }+} 
 +</code> 
 +If you wish to make changes to the calling data, you must declare them as reference variables (with ''%%&%%'') during function declaration.
  
-If you wish to make changes to the calling data, you must declare them as reference variables (with `&`) during function declaration.+=== $a ===
  
-#### $a +$a is the Friendica ''%%App%%'' class. It contains a wealth of information about the current state of Friendica:
-$a is the Friendica `Appclass. +
-It contains a wealth of information about the current state of Friendica:+
  
-* which module has been called, +  * which module has been called, 
-* configuration information, +  * configuration information, 
-* the page contents at the point the hook was invoked, +  * the page contents at the point the hook was invoked, 
-* profile and user information, etc.+  * profile and user information, etc.
  
-It is recommeded you call this `$ato match its usage elsewhere.+It is recommeded you call this ''%%$a%%'' to match its usage elsewhere.
  
-#### $b +=== $b ===
-$b can be called anything you like. +
-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. +
-Remember to declare it with `&` if you wish to alter it.+
  
-## Admin settings+$b can be called anything you like. 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. Remember to declare it with ''%%&%%'' if you wish to alter it.
  
-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.+===== Admin settings =====
  
-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.+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.
  
-## Global stylesheets+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. 
 + 
 +===== Global stylesheets =====
  
 If your addon requires adding a stylesheet on all pages of Friendica, add the following hook: If your addon requires adding a stylesheet on all pages of Friendica, add the following hook:
  
-```php+<code php>
 function <addon>_install() function <addon>_install()
 { {
- \Friendica\Core\Hook::register('head', __FILE__, '<addon>_head'); +    \Friendica\Core\Hook::register('head', __FILE__, '<addon>_head'); 
- ...+    ...
 } }
  
Line 107: Line 94:
 function <addon>_head(App $a) function <addon>_head(App $a)
 { {
- \Friendica\DI::page()->registerStylesheet(__DIR__ . '/relative/path/to/addon/stylesheet.css');+    \Friendica\DI::page()->registerStylesheet(__DIR__ . '/relative/path/to/addon/stylesheet.css');
 } }
-```+</code> 
 +''%%__DIR__%%'' is the folder path of your addon.
  
-`__DIR__` is the folder path of your addon.+===== JavaScript =====
  
-## JavaScript +==== Global scripts ====
- +
-### Global scripts+
  
 If your addon requires adding a script on all pages of Friendica, add the following hook: If your addon requires adding a script on all pages of Friendica, add the following hook:
  
- +<code php>
-```php+
 function <addon>_install() function <addon>_install()
 { {
- \Friendica\Core\Hook::register('footer', __FILE__, '<addon>_footer'); +    \Friendica\Core\Hook::register('footer', __FILE__, '<addon>_footer'); 
- ...+    ...
 } }
  
 function <addon>_footer(App $a) function <addon>_footer(App $a)
 { {
- \Friendica\DI::page()->registerFooterScript(__DIR__ . '/relative/path/to/addon/script.js');+    \Friendica\DI::page()->registerFooterScript(__DIR__ . '/relative/path/to/addon/script.js');
 } }
-```+</code> 
 +''%%__DIR__%%'' is the folder path of your addon.
  
-`__DIR__` is the folder path of your addon.+==== JavaScript hooks ====
  
-### JavaScript hooks+The main Friendica script provides hooks via events dispatched on the ''%%document%%'' property. In your Javascript file included as described above, add your event listener like this:
  
-The main Friendica script provides hooks via events dispatched on the `document` property. +<code>
-In your Javascript file included as described above, add your event listener like this: +
- +
-```js+
 document.addEventListener(name, callback); document.addEventListener(name, callback);
-``` +</code> 
- +  //name// is the name of the hook and corresponds to a known Friendica JavaScript hook. 
-*nameis the name of the hook and corresponds to a known Friendica JavaScript hook. +  //callback// is a JavaScript anonymous function to execute.
-*callbackis a JavaScript anonymous function to execute.+
  
-More info about Javascript event listeners: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener+More info about Javascript event listeners: https:%%//%%developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
  
-#### Current JavaScript hooks+=== Current JavaScript hooks ===
  
-##### postprocess_liveupdate +== postprocess_liveupdate ==
-Called at the end of the live update process (XmlHttpRequest) and on a post preview. +
-No additional data is provided.+
  
-## Modules+Called at the end of the live update process (XmlHttpRequest) and on a post preview. No additional data is provided.
  
-Addons may also act as "modules" and intercept all page requests for a given URL path. +===== Modules =====
-In order for a addon to act as a module it needs to declare an empty function `<addon>_module()`.+
  
-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. +Addons may also act as “modules” and intercept all page requests for a given URL pathIn order for a addon to act as a module it needs to declare an empty function ''%%<addon>_module()%%''.
-These are parsed into an array $a->argv, with a corresponding $a->argc indicating the number of URL components. +
-So `https://my.web.site/addon/arg1/arg2` would look for a module named "addon" and pass its module functions the $a App structure (which is available to many components). +
-This will include:+
  
-```php +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. These are parsed into the ''%%App\Arguments%%'' object. So ''%%https://my.web.site/addon/arg1/arg2%%'would give this:
-$a->argc = 3 +
-$a->argv = array(0 => 'addon', 1 => 'arg1', 2 => 'arg2'); +
-```+
  
-To display a module page, you need to declare the function `<addon>_content(App $a)`, which defines and returns the page body content. +<code php> 
-They may also contain `<addon>_post(App $a)which is called before the `<addon>_contentfunction and typically handles the results of POST forms. +DI::args()->getArgc(); // = 3 
-You may also have `<addon>_init(App $a)which is called before `<addon>_contentand should include common logic to your module.+DI::args()->get(0); // = 'addon' 
 +DI::args()->get(1); // = 'arg1' 
 +DI::args()->get(2); // = 'arg2' 
 +</code> 
 +To display a module page, you need to declare the function ''%%<addon>_content(App $a)%%'', which defines and returns the page body content. They may also contain ''%%<addon>_post(App $a)%%'' which is called before the ''%%<addon>_content%%'' function and typically handles the results of POST forms. You may also have ''%%<addon>_init(App $a)%%'' which is called before ''%%<addon>_content%%'' and should include common logic to your module.
  
-## Templates+===== Templates =====
  
-If your addon needs some template, you can use the Friendica template system. +If your addon needs some template, you can use the Friendica template system. Friendica uses [[http://www.smarty.net/|smarty3]] as a template engine.
-Friendica uses [smarty3](http://www.smarty.net/as a template engine.+
  
-Put your tpl files in the *templates/subfolder of your addon.+Put your tpl files in the //templates/// subfolder of your addon.
  
 In your code, like in the function addon_name_content(), load the template file and execute it passing needed values: In your code, like in the function addon_name_content(), load the template file and execute it passing needed values:
  
-```php+<code php>
 use Friendica\Core\Renderer; use Friendica\Core\Renderer;
  
Line 193: Line 169:
 # second an array of 'name' => 'values' to pass to template # second an array of 'name' => 'values' to pass to template
 $output = Renderer::replaceMacros($tpl, array( $output = Renderer::replaceMacros($tpl, array(
- 'title' => 'My beautiful addon',+    'title' => 'My beautiful addon',
 )); ));
-```+</code> 
 +See also the wiki page [[docs:smarty3-templates]].
  
-See also the wiki page [Quick Template Guide](https://github.com/friendica/friendica/wiki/Quick-Template-Guide).+===== Current PHP hooks =====
  
-## Current PHP hooks+==== authenticate ====
  
-### authenticate +Called when a user attempts to login. ''%%$b%%'' is an array containing:
-Called when a user attempts to login. +
-`$bis an array containing:+
  
-**username**: the supplied username +  * **username**: the supplied username 
-**password**: the supplied password +  **password**: the supplied password 
-**authenticated**: set this to non-zero to authenticate the user. +  **authenticated**: set this to non-zero to authenticate the user. 
-**user_record**: successful authentication must also return a valid user record from the database+  **user_record**: successful authentication must also return a valid user record from the database
  
-### logged_in +==== logged_in ====
-Called after a user has successfully logged in. +
-`$b` contains the `$a->user` array.+
  
-### display_item +Called after user has successfully logged in''%%$b%%'' contains the ''%%$a->user%%'' array.
-Called when formatting post for display. +
-$b is an array:+
  
-- **item**: The item (array) details pulled from the database +==== display_item ====
-- **output**: the (string) HTML representation of this item prior to adding it to the page+
  
-### post_local +Called when formatting a post for display. $b is an array:
-Called when a status post or comment is entered on the local system. +
-`$bis the item array of the information to be stored in the database. +
-Please notebody contents are bbcode - not HTML.+
  
-### post_local_end +  * **item**: The item (array) details pulled from the database 
-Called when a local status post or comment has been stored on the local system. +  * **output**the (string) HTML representation of this item prior to adding it to the page
-`$b` is the item array of the information which has just been stored in the database. +
-Please notebody contents are bbcode - not HTML+
  
-### post_remote +==== post_local ====
-Called when receiving a post from another source. This may also be used to post local activity or system generated messages. +
-`$b` is the item array of information to be stored in the database and the item body is bbcode.+
  
-### settings_form +Called when a status post or comment is entered on the local system''%%$b%%'' is the item array of the information to be stored in the database. Please note: body contents are bbcode - not HTML.
-Called when generating the HTML for the user Settings page. +
-`$bis the HTML string of the settings page before the final `</form>` tag.+
  
-### settings_post +==== post_local_end ====
-Called when the Settings pages are submitted. +
-`$b` is the $_POST array.+
  
-### addon_settings +Called when a local status post or comment has been stored on the local system''%%$b%%'' is the item array of the information which has just been stored in the databasePlease note: body contents are bbcode - not HTML
-Called when generating the HTML for the addon settings page. +
-`$bis the (string) HTML of the addon settings page before the final `</form>` tag.+
  
-### addon_settings_post +==== post_remote ====
-Called when the Addon Settings pages are submitted. +
-`$b` is the $_POST array.+
  
-### profile_post +Called when receiving post from another sourceThis may also be used to post local activity or system generated messages. ''%%$b%%'' is the item array of information to be stored in the database and the item body is bbcode.
-Called when posting profile page. +
-`$bis the $_POST array.+
  
-### profile_edit +==== addon_settings ====
-Called prior to output of profile edit page. +
-`$b` is an array containing:+
  
-- **profile**: profile (array) record from the database +Called when generating the HTML for the addon settings page. ''%%$data%%'' is an array containing:
-- **entry**: the (string) HTML of the generated entry+
  
-### profile_advanced +  * **addon** (output): Required. The addon folder name. 
-Called when the HTML is generated for the Advanced profile, corresponding to the Profile tab within person's profile page+  * **title** (output): Required. The addon settings panel title. 
-`$b` is the HTML string representation of the generated profile. +  * **href** (output): Optional. If set, will reduce the panel to a link pointing to this URL, can be relative. Incompatible with the following keys. 
-The profile array details are in `$a->profile`.+  * **html** (output): Optional. Raw HTML of the addon form elements. Both the ''%%<form>%%'' tags and the submit buttons are taken care of elsewhere. 
 +  * **submit** (output): Optional. If unset, default submit button with ''%%name="<addon name>-submit"%%'' will be generatedCan take different value types: 
 +    * **string**: The label to replace the default one. 
 +    * **associative array**: A list of submit button, the key is the value of the ''%%name%%'' attribute, the value is the displayed label. The first submit button in this list is considered the main one and themes might emphasize its display.
  
-### directory_item +=== Examples ===
-Called from the Directory page when formatting an item for display. +
-`$b` is an array:+
  
-- **contact**: contact record array for the person from the database +== With link ==
-- **entry**: the HTML string of the generated entry+
  
-### profile_sidebar_enter +<code php> 
-Called prior to generating the sidebar "short" profile for a page. +$data = [ 
-`$b` is the person's profile array+    'addon' => 'advancedcontentfilter', 
 +    'title' => DI::l10n()->t('Advanced Content Filter'), 
 +    'href'  => 'advancedcontentfilter', 
 +]; 
 +</code> 
 +== With default submit button ==
  
-### profile_sidebar +<code php> 
-Called when generating the sidebar "short" profile for a page. +$data = [ 
-`$b` is an array:+    'addon' => 'fromapp', 
 +    'title' => DI::l10n()->t('FromApp Settings'), 
 +    'html'  => $html, 
 +]; 
 +</code> 
 +== With no HTML, just a submit button ==
  
-- **profile**: profile record array for the person from the database +<code php> 
-**entry**the HTML string of the generated entry+$data = [ 
 +    'addon'  => 'opmlexport', 
 +    'title'  => DI::l10n()->t('OPML Export'), 
 +    'submit' => DI::l10n()->t('Export RSS/Atom contacts'), 
 +]; 
 +</code> 
 +== With multiple submit buttons ==
  
-### contact_block_end +<code php> 
-Called when formatting the block of contacts/friends on a profile sidebar has completed. +$data = [ 
-`$b` is an array:+    'addon'  => 'catavar', 
 +    'title'  => DI::l10n()->t('Cat Avatar Settings'), 
 +    'html'   => $html, 
 +    'submit' => [ 
 +        'catavatar-usecat'   => DI::l10n()->t('Use Cat as Avatar'), 
 +        'catavatar-morecat'  => DI::l10n()->t('Another random Cat!'), 
 +        'catavatar-emailcat' => DI::pConfig()->get(local_user(), 'catavatar', 'seed', false) ? DI::l10n()->t('Reset to email Cat') : null, 
 +    ], 
 +]; 
 +</code> 
 +==== addon_settings_post ====
  
-- **contacts**: array of contacts +Called when the Addon Settings pages are submitted. ''%%$b%%'' is the $_POST array.
-- **output**: the generated HTML string of the contact block+
  
-### bbcode +==== connector_settings ====
-Called after conversion of bbcode to HTML. +
-`$b` is an HTML string converted text.+
  
-### html2bbcode +Called when generating the HTML for a connector addon settings page''%%$data%%'' is an array containing:
-Called after tag conversion of HTML to bbcode (e.g. remote message posting) +
-`$b` is a string converted text+
  
-### head +  * **connector** (output): Required. The addon folder name. 
-Called when building the `<head>` sections+  * **title** (output): Required. The addon settings panel title. 
-Stylesheets should be registered using this hook+  * **image** (output): Required. The relative path of the logo image of the platform/protocol this addon is connecting to, max size 48x48px
-`$b` is an HTML string of the `<head>` tag.+  * **enabled** (output): Optional. If set to a falsy value, the connector image will be dimmed
 +  * **html** (output): Optional. Raw HTML of the addon form elements. Both the ''%%<form>%%'' tags and the submit buttons are taken care of elsewhere. 
 +  * **submit** (output): Optional. If unset, a default submit button with ''%%name="<addon name>-submit"%%'' will be generated. Can take different value types: 
 +    * **string**: The label to replace the default one. 
 +      * **associative array**: A list of submit button, the key is the value of the ''%%name%%'' attribute, the value is the displayed label. The first submit button in this list is considered the main one and themes might emphasize its display.
  
-### page_header +=== Examples ===
-Called after building the page navigation section. +
-`$b` is a string HTML of nav region.+
  
-### personal_xrd +== With default submit button ==
-Called prior to output of personal XRD file. +
-`$b` is an array:+
  
-- **user**the user record array for the person +<code php> 
-**xml**: the complete XML string to be output+$data = [ 
 +    'connector' => 'diaspora', 
 +    'title'     => DI::l10n()->t('Diaspora Export'), 
 +    'image'     => 'images/diaspora-logo.png', 
 +    'enabled'   => $enabled, 
 +    'html'      => $html, 
 +]; 
 +</code> 
 +== With custom submit button label and no logo dim ==
  
-### home_content +<code php> 
-Called prior to output home page contentshown to unlogged users+$data = [ 
-`$b` is the HTML sring of section region.+    'connector' => 'ifttt', 
 +    'title'     => DI::l10n()->t('IFTTT Mirror'), 
 +    'image'     => 'addon/ifttt/ifttt.png', 
 +    'html'      => $html, 
 +    'submit'    => DI::l10n()->t('Generate new key'), 
 +]; 
 +</code> 
 +== With conditional submit buttons ==
  
-### contact_edit +<code php> 
-Called when editing contact details on an individual from the Contacts page. +$submit = ['pumpio-submit' => DI::l10n()->t('Save Settings')]; 
-$b is an array:+if ($oauth_token && $oauth_token_secret) { 
 +    $submit['pumpio-delete'] = DI::l10n()->t('Delete this preset'); 
 +}
  
-- **contact**contact record (arrayof target contact +$data = [ 
-**output**: the (stringgenerated HTML of the contact edit page+    'connector' => 'pumpio', 
 +    'title'     => DI::l10n()->t('Pump.io Import/Export/Mirror')
 +    'image'     => 'images/pumpio.png', 
 +    'enabled'   => $enabled, 
 +    'html'      => $html, 
 +    'submit'    => $submit, 
 +]; 
 +</code> 
 +==== profile_post ====
  
-### contact_edit_post +Called when posting a profile page. ''%%$b%%'' is the $_POST array.
-Called when posting the contact edit page. +
-`$bis the `$_POSTarray+
  
-### init_1 +==== profile_edit ====
-Called just after DB has been opened and before session start. +
-No hook data.+
  
-### page_end +Called prior to output of profile edit page''%%$b%%'' is an array containing:
-Called after HTML content functions have completed. +
-`$bis (string) HTML of content div.+
  
-### footer +  * **profile**: profile (array) record from the database 
-Called after HTML content functions have completed. +  * **entry**: the (string) HTML of the generated entry
-Deferred Javascript files should be registered using this hook. +
-`$b` is (string) HTML of footer div/element.+
  
-### avatar_lookup +==== profile_advanced ====
-Called when looking up the avatar. `$b` is an array:+
  
-- **size**: the size of the avatar that will be looked up +Called when the HTML is generated for the Advanced profile, corresponding to the Profile tab within a person’s profile page. ''%%$b%%'' is the HTML string representation of the generated profile. The profile array details are in ''%%$a->profile%%''.
-- **email**: email to look up the avatar for +
-- **url**: the (string) generated URL of the avatar+
  
-### emailer_send_prepare +==== directory_item ====
-Called from `Emailer::send()` before building the mime message. +
-`$b` is an array of params to `Emailer::send()`.+
  
-- **fromName**: name of the sender +Called from the Directory page when formatting an item for display. ''%%$b%%'' is an array:
-- **fromEmail**email fo the sender +
-- **replyTo**: replyTo address to direct responses +
-- **toEmail**: destination email address +
-- **messageSubject**: subject of the message +
-- **htmlVersion**: html version of the message +
-- **textVersion**: text only version of the message +
-- **additionalMailHeader**: additions to the smtp mail header +
-- **sent**: default false, if set to true in the hook, the default mailer will be skipped.+
  
-### emailer_send +  * **contact**: contact record array for the person from the database 
-Called before calling PHP's `mail()`. +  * **entry**: the HTML string of the generated entry
-`$b` is an array of params to `mail()`.+
  
-- **to** +==== profile_sidebar_enter ====
-- **subject** +
-- **body** +
-- **headers** +
-- **sent**: default false, if set to true in the hook, the default mailer will be skipped.+
  
-### load_config +Called prior to generating the sidebar “short” profile for a page. ''%%$b%%'' is the person’profile array
-Called during `App` initialization to allow addons to load their own configuration file(s) with `App::loadConfigFile()`.+
  
-### nav_info +==== profile_sidebar ====
-Called after the navigational menu is build in `include/nav.php`. +
-`$b` is an array containing `$nav` from `include/nav.php`.+
  
-### template_vars +Called when generating the sidebar “short” profile for a page. ''%%$b%%'' is an array:
-Called before vars are passed to the template engine to render the page. +
-The registered function can add,change or remove variables passed to template. +
-`$bis an array with:+
  
-**template**: filename of template +  * **profile**: profile record array for the person from the database 
-**vars**: array of vars passed to the template+  * **entry**: the HTML string of the generated entry
  
-### acl_lookup_end +==== contact_block_end ====
-Called after the other queries have passed. +
-The registered function can add, change or remove the `acl_lookup()` variables.+
  
-- **results**: array of the acl_lookup() vars+Called when formatting the block of contacts/friends on a profile sidebar has completed. ''%%$b%%'' is an array:
  
-### prepare_body_init +  * **contacts**: array of contacts 
-Called at the start of prepare_body +  * **output**the generated HTML string of the contact block
-Hook data:+
  
-- **item** (input/output): item array+==== bbcode ====
  
-### prepare_body_content_filter +Called after conversion of bbcode to HTML''%%$b%%'' is an HTML string converted text.
-Called before the HTML conversion in prepare_bodyIf the item matches a content filter rule set by an addon, it should +
-just add the reason to the filter_reasons element of the hook data. +
-Hook data:+
  
-- **item**: item array (input) +==== html2bbcode ====
-- **filter_reasons** (input/output): reasons array+
  
-### prepare_body +Called after tag conversion of HTML to bbcode (e.g. remote message posting) ''%%$b%%'' is a string converted text
-Called after the HTML conversion in `prepare_body()`. +
-Hook data:+
  
-- **item** (input): item array +==== head ====
-- **html** (input/output): converted item body +
-- **is_preview** (input): post preview flag +
-- **filter_reasons** (input): reasons array+
  
-### prepare_body_final +Called when building the ''%%<head>%%'' sections. Stylesheets should be registered using this hook. ''%%$b%%'' is an HTML string of the ''%%<head>%%'' tag.
-Called at the end of `prepare_body()`. +
-Hook data:+
  
-- **item**: item array (input) +==== page_header ====
-- **html**: converted item body (input/output)+
  
-### put_item_in_cache +Called after building the page navigation section. ''%%$b%%'' is a string HTML of nav region.
-Called after `prepare_text()` in `put_item_in_cache()`. +
-Hook data:+
  
-- **item** (input): item array +==== personal_xrd ====
-- **rendered-html** (input/output): final item body HTML +
-- **rendered-hash** (input/output): original item body hash+
  
-### magic_auth_success +Called prior to output of personal XRD file''%%$b%%'' is an array:
-Called when a magic-auth was successful. +
-Hook data:+
  
-    visitor => array with the contact record of the visitor +  * **user**: the user record array for the person 
-    url => the query string+  * **xml**: the complete XML string to be output
  
-### jot_networks +==== home_content ====
-Called when displaying the post permission screen. +
-Hook data is a list of form fields that need to be displayed along the ACL. +
-Form field array structure is:+
  
-- **type**: `checkbox` or `select`. +Called prior to output home page content, shown to unlogged users''%%$b%%'' is the HTML sring of section region.
-- **field**: Standard field data structure to be used by `field_checkbox.tpl` and `field_select.tpl`.+
  
-For `checkbox`, **field** is: +==== contact_edit ====
-  - [0] (String): Form field name; Mandatory.  +
-  - [1]: (String): Form field label; Optional, default is none. +
-  - [2]: (Boolean): Whether the checkbox should be checked by default; Optional, default is false. +
-  - [3]: (String): Additional help text; Optional, default is none. +
-  - [4]: (String): Additional HTML attributes; Optional, default is none.+
  
-For `select`, **field** is: +Called when editing contact details on an individual from the Contacts page$b is an array:
-  - [0] (String): Form field name; Mandatory. +
-  - [1] (String): Form field label; Optional, default is none. +
-  - [2] (Boolean)Default value to be selected by default; Optional, default is none. +
-  - [3] (String): Additional help text; Optional, default is none. +
-  - [4] (Array): Associative array of options. Item key is option value, item value is option label; Mandatory. +
  
-### route_collection +  * **contact**: contact record (array) of target contact 
-Called just before dispatching the router. +  * **output**: the (string) generated HTML of the contact edit page
-Hook data is a `\FastRoute\RouterCollector` object that should be used to add addon routes pointing to classes.+
  
-**Notice**: The class whose name is provided in the route handler must be reachable via auto-loader.+==== contact_edit_post ====
  
-### probe_detect+Called when posting the contact edit page. ''%%$b%%'' is the ''%%$_POST%%'' array
  
-Called before trying to detect the target network of a URL. +==== init_1 ====
-If any registered hook function sets the `result` key of the hook data array, it will be returned immediately. +
-Hook functions should also return immediately if the hook data contains an existing result. +
  
-Hook data:+Called just after DB has been opened and before session start. No hook data.
  
-- **uri** (input): the profile URI. +==== page_end ====
-- **network** (input): the target network (can be empty for auto-detection). +
-- **uid** (input): the user to return the contact data for (can be empty for public contacts). +
-- **result** (output): Set by the hook function to indicate a successful detection.+
  
-## Complete list of hook callbacks+Called after HTML content functions have completed. ''%%$b%%'' is (string) HTML of content div.
  
-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.+==== footer ====
  
-### index.php+Called after HTML content functions have completed. Deferred Javascript files should be registered using this hook. ''%%$b%%'' is (string) HTML of footer div/element.
  
-    Hook::callAll('init_1'); +==== avatar_lookup ====
-    Hook::callAll('app_menu', $arr); +
-    Hook::callAll('page_content_top', DI::page()['content']); +
-    Hook::callAll($a->module.'_mod_init', $placeholder); +
-    Hook::callAll($a->module.'_mod_init', $placeholder); +
-    Hook::callAll($a->module.'_mod_post', $_POST); +
-    Hook::callAll($a->module.'_mod_afterpost', $placeholder); +
-    Hook::callAll($a->module.'_mod_content', $arr); +
-    Hook::callAll($a->module.'_mod_aftercontent', $arr); +
-    Hook::callAll('page_end', DI::page()['content']);+
  
-### include/api.php+Called when looking up the avatar''%%$b%%'' is an array:
  
-    Hook::callAll('logged_in', $a->user); +  * **size**the size of the avatar that will be looked up 
-    Hook::callAll('authenticate', $addon_auth); +  * **email**email to look up the avatar for 
-    Hook::callAll('logged_in', $a->user);+  * **url**the (stringgenerated URL of the avatar
  
-### include/enotify.php+==== emailer_send_prepare ====
  
-    Hook::callAll('enotify', $h); +Called from ''%%Emailer::send()%%'' before building the mime message. ''%%$b%%'is an array of params to ''%%Emailer::send()%%''.
-    Hook::callAll('enotify_store'$datarray); +
-    Hook::callAll('enotify_mail', $datarray); +
-    Hook::callAll('check_item_notification', $notification_data);+
  
-### include/conversation.php+  * **fromName**: name of the sender 
 +  * **fromEmail**: email fo the sender 
 +  * **replyTo**: replyTo address to direct responses 
 +  * **toEmail**: destination email address 
 +  * **messageSubject**: subject of the message 
 +  * **htmlVersion**: html version of the message 
 +  * **textVersion**: text only version of the message 
 +  * **additionalMailHeader**: additions to the smtp mail header 
 +  * **sent**: default false, if set to true in the hook, the default mailer will be skipped.
  
-    Hook::callAll('conversation_start', $cb); +==== emailer_send ====
-    Hook::callAll('render_location', $locate); +
-    Hook::callAll('display_item', $arr); +
-    Hook::callAll('display_item', $arr); +
-    Hook::callAll('item_photo_menu', $args); +
-    Hook::callAll('jot_tool', $jotplugins);+
  
-### mod/directory.php+Called before calling PHP’s ''%%mail()%%''. ''%%$b%%'' is an array of params to ''%%mail()%%''.
  
-    Hook::callAll('directory_item'$arr);+  * **to** 
 +  * **subject** 
 +  * **body** 
 +  * **headers** 
 +  * **sent**default false, if set to true in the hookthe default mailer will be skipped.
  
-### mod/xrd.php+==== load_config ====
  
-    Hook::callAll('personal_xrd', $arr);+Called during ''%%App%%'' initialization to allow addons to load their own configuration file(s) with ''%%App::loadConfigFile()%%''.
  
-### mod/ping.php+==== nav_info ====
  
-    Hook::callAll('network_ping'$arr);+Called after the navigational menu is build in ''%%include/nav.php%%''. ''%%$b%%'' is an array containing ''%%$nav%%'' from ''%%include/nav.php%%''.
  
-### mod/parse_url.php+==== template_vars ====
  
-    Hook::callAll("parse_link", $arr);+Called before vars are passed to the template engine to render the page. The registered function can add,change or remove variables passed to template. ''%%$b%%'' is an array with:
  
-### src/Module/Delegation.php+  * **template**: filename of template 
 +  * **vars**: array of vars passed to the template
  
-    Hook::callAll('home_init', $ret);+==== acl_lookup_end ====
  
-### mod/acl.php+Called after the other queries have passed. The registered function can add, change or remove the ''%%acl_lookup()%%'' variables.
  
-    Hook::callAll('acl_lookup_end', $results);+  * **results**array of the acl_lookup() vars
  
-### mod/network.php+==== prepare_body_init ====
  
-    Hook::callAll('network_content_init', $arr); +Called at the start of prepare_body Hook data:
-    Hook::callAll('network_tabs', $arr);+
  
-### mod/friendica.php+  * **item** (input/output): item array
  
-    Hook::callAll('about_hook', $o);+==== prepare_body_content_filter ====
  
-### mod/subthread.php+Called before the HTML conversion in prepare_bodyIf the item matches a content filter rule set by an addon, it should just add the reason to the filter_reasons element of the hook data. Hook data:
  
-    Hook::callAll('post_local_end', $arr);+  * **item**item array (input) 
 +  * **filter_reasons** (input/output): reasons array
  
-### mod/profiles.php+==== prepare_body ====
  
-    Hook::callAll('profile_post', $_POST); +Called after the HTML conversion in ''%%prepare_body()%%''Hook data:
-    Hook::callAll('profile_edit', $arr);+
  
-### mod/settings.php+  * **item** (input): item array 
 +  * **html** (input/output): converted item body 
 +  * **is_preview** (input): post preview flag 
 +  * **filter_reasons** (input): reasons array
  
-    Hook::callAll('addon_settings_post', $_POST); +==== prepare_body_final ====
-    Hook::callAll('connector_settings_post', $_POST); +
-    Hook::callAll('display_settings_post', $_POST); +
-    Hook::callAll('settings_post', $_POST); +
-    Hook::callAll('addon_settings', $settings_addons); +
-    Hook::callAll('connector_settings', $settings_connectors); +
-    Hook::callAll('display_settings', $o); +
-    Hook::callAll('settings_form', $o);+
  
-### mod/photos.php+Called at the end of ''%%prepare_body()%%''Hook data:
  
-    Hook::callAll('photo_post_init', $_POST); +  * **item**item array (input
-    Hook::callAll('photo_post_file', $ret); +  * **html**converted item body (input/output)
-    Hook::callAll('photo_post_end', $foo); +
-    Hook::callAll('photo_post_end', $foo); +
-    Hook::callAll('photo_post_end', $foo); +
-    Hook::callAll('photo_post_end', $foo); +
-    Hook::callAll('photo_post_end', intval($item_id)); +
-    Hook::callAll('photo_upload_form', $ret);+
  
-### mod/profile.php+==== put_item_in_cache ====
  
-    Hook::callAll('profile_advanced', $o);+Called after ''%%prepare_text()%%'' in ''%%put_item_in_cache()%%''. Hook data:
  
-### mod/home.php+  * **item** (input): item array 
 +  * **rendered-html** (input/output): final item body HTML 
 +  * **rendered-hash** (input/output): original item body hash
  
-    Hook::callAll('home_init', $ret); +==== magic_auth_success ====
-    Hook::callAll("home_content", $content);+
  
-### mod/poke.php+Called when a magic-auth was successfulHook data:
  
-    Hook::callAll('post_local_end', $arr);+<code> 
 +visitor => array with the contact record of the visitor 
 +url => the query string 
 +</code> 
 +==== jot_networks ====
  
-### mod/contacts.php+Called when displaying the post permission screenHook data is a list of form fields that need to be displayed along the ACL. Form field array structure is:
  
-    Hook::callAll('contact_edit_post', $_POST); +  * **type**: ''%%checkbox%%'' or ''%%select%%''. 
-    Hook::callAll('contact_edit', $arr);+  * **field**Standard field data structure to be used by ''%%field_checkbox.tpl%%'' and ''%%field_select.tpl%%''.
  
-### mod/tagger.php+For ''%%checkbox%%'', **field** is: - [0] (String): Form field name; Mandatory. - [1]: (String): Form field label; Optional, default is none. - [2]: (Boolean): Whether the checkbox should be checked by default; Optional, default is false. - [3]: (String): Additional help text; Optional, default is none. - [4]: (String): Additional HTML attributes; Optional, default is none.
  
-    Hook::callAll('post_local_end'$arr);+For ''%%select%%'', **field** is- [0] (String)Form field name; Mandatory. - [1] (String): Form field label; Optionaldefault is none. - [2] (Boolean): Default value to be selected by default; Optional, default is none. - [3] (String): Additional help text; Optional, default is none. - [4] (Array): Associative array of options. Item key is option value, item value is option labelMandatory.
  
-### mod/uexport.php+==== route_collection ====
  
-    Hook::callAll('uexport_options', $options);+Called just before dispatching the router. Hook data is a ''%%\FastRoute\RouterCollector%%'' object that should be used to add addon routes pointing to classes.
  
-### mod/register.php+**Notice**: The class whose name is provided in the route handler must be reachable via auto-loader.
  
-    Hook::callAll('register_post', $arr); +==== probe_detect ====
-    Hook::callAll('register_form', $arr);+
  
-### mod/item.php+Called before trying to detect the target network of a URL. If any registered hook function sets the ''%%result%%'' key of the hook data array, it will be returned immediately. Hook functions should also return immediately if the hook data contains an existing result.
  
-    Hook::callAll('post_local_start', $_REQUEST); +Hook data:
-    Hook::callAll('post_local', $datarray); +
-    Hook::callAll('post_local_end', $datarray);+
  
-### mod/editpost.php+  * **uri** (input): the profile URI. 
 +  * **network** (input): the target network (can be empty for auto-detection). 
 +  * **uid** (input): the user to return the contact data for (can be empty for public contacts). 
 +  * **result** (output): Leave null if address isn’t relevant to the connector, set to contact array if probe is successful, false otherwise.
  
-    Hook::callAll('jot_tool', $jotplugins);+==== item_by_link ====
  
-### src/Network/FKOAuth1.php+Called when trying to probe an item from a given URI. If any registered hook function sets the ''%%item_id%%'' key of the hook data array, it will be returned immediately. Hook functions should also return immediately if the hook data contains an existing ''%%item_id%%''.
  
-    Hook::callAll('logged_in', $a->user);+Hook data- **uri** (input): the item URI. **uid** (input): the user to return the item data for (can be empty for public contacts). - **item_id** (output): Leave null if URI isn’t relevant to the connector, set to created item array if probe is successful, false otherwise.
  
-### src/Render/FriendicaSmartyEngine.php+==== support_follow ====
  
-    Hook::callAll("template_vars", $arr);+Called to assert whether a connector addon provides follow capabilities.
  
-### src/App.php+Hook data: - **protocol** (input): shorthand for the protocol. List of values is available in ''%%src/Core/Protocol.php%%''. - **result** (output): should be true if the connector provides follow capabilities, left alone otherwise. 
 + 
 +==== support_revoke_follow ==== 
 + 
 +Called to assert whether a connector addon provides follow revocation capabilities. 
 + 
 +Hook data: - **protocol** (input): shorthand for the protocol. List of values is available in ''%%src/Core/Protocol.php%%''. - **result** (output): should be true if the connector provides follow revocation capabilities, left alone otherwise. 
 + 
 +==== follow ==== 
 + 
 +Called before adding a new contact for a user to handle non-native network remote contact (like Twitter). 
 + 
 +Hook data: 
 + 
 +  * **url** (input): URL of the remote contact. 
 +  * **contact** (output): should be filled with the contact (with uid = user creating the contact) array if follow was successful. 
 + 
 +==== unfollow ==== 
 + 
 +Called when unfollowing a remote contact on a non-native network (like Twitter) 
 + 
 +Hook data: - **contact** (input): the target public contact (uid = 0) array. - **uid** (input): the id of the source local user. - **result** (output): wether the unfollowing is successful or not. 
 + 
 +==== revoke_follow ==== 
 + 
 +Called when making a remote contact on a non-native network (like Twitter) unfollow you. 
 + 
 +Hook data: - **contact** (input): the target public contact (uid = 0) array. - **uid** (input): the id of the source local user. - **result** (output): a boolean value indicating wether the operation was successful or not. 
 + 
 +==== block ==== 
 + 
 +Called when blocking a remote contact on a non-native network (like Twitter). 
 + 
 +Hook data: - **contact** (input): the remote contact (uid = 0) array. - **uid** (input): the user id to issue the block for. - **result** (output): a boolean value indicating wether the operation was successful or not. 
 + 
 +==== unblock ==== 
 + 
 +Called when unblocking a remote contact on a non-native network (like Twitter). 
 + 
 +Hook data: - **contact** (input): the remote contact (uid = 0) array. - **uid** (input): the user id to revoke the block for. - **result** (output): a boolean value indicating wether the operation was successful or not. 
 + 
 +==== storage_instance ==== 
 + 
 +Called when a custom storage is used (e.g. webdav_storage) 
 + 
 +Hook data: - **name** (input): the name of the used storage backend - **data[‘storage’]** (output): the storage instance to use (**must** implement ''%%\Friendica\Core\Storage\IWritableStorage%%''
 + 
 +==== storage_config ==== 
 + 
 +Called when the admin of the node wants to configure a custom storage (e.g. webdav_storage) 
 + 
 +Hook data: - **name** (input): the name of the used storage backend - **data[‘storage_config’]** (output): the storage configuration instance to use (**must** implement ''%%\Friendica\Core\Storage\Capability\IConfigureStorage%%''
 + 
 +===== Complete list of hook callbacks ===== 
 + 
 +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.
  
-    Hook::callAll('load_config'); +==== index.php ====
-    Hook::callAll('head'); +
-    Hook::callAll('footer'); +
-    Hook::callAll('route_collection');+
  
-### src/Model/Item.php+<code> 
 +Hook::callAll('init_1'); 
 +Hook::callAll('app_menu', $arr); 
 +Hook::callAll('page_content_top', DI::page()['content']); 
 +Hook::callAll($a->module.'_mod_init', $placeholder); 
 +Hook::callAll($a->module.'_mod_init', $placeholder); 
 +Hook::callAll($a->module.'_mod_post', $_POST); 
 +Hook::callAll($a->module.'_mod_content', $arr); 
 +Hook::callAll($a->module.'_mod_aftercontent', $arr); 
 +Hook::callAll('page_end', DI::page()['content']); 
 +</code> 
 +==== include/api.php ====
  
-    Hook::callAll('post_local', $item); +<code> 
-    Hook::callAll('post_remote', $item); +Hook::callAll('logged_in', $a->user); 
-    Hook::callAll('post_local_end', $posted_item); +Hook::callAll('authenticate', $addon_auth); 
-    Hook::callAll('post_remote_end', $posted_item); +Hook::callAll('logged_in', $a->user); 
-    Hook::callAll('tagged', $arr); +</code> 
-    Hook::callAll('post_local_end', $new_item); +==== include/enotify.php ====
-    Hook::callAll('put_item_in_cache', $hook_data); +
-    Hook::callAll('prepare_body_init', $item); +
-    Hook::callAll('prepare_body_content_filter', $hook_data); +
-    Hook::callAll('prepare_body', $hook_data); +
-    Hook::callAll('prepare_body_final', $hook_data);+
  
-### src/Model/Contact.php+<code> 
 +Hook::callAll('enotify', $h); 
 +Hook::callAll('enotify_store', $datarray); 
 +Hook::callAll('enotify_mail', $datarray); 
 +Hook::callAll('check_item_notification', $notification_data); 
 +</code> 
 +==== src/Content/Conversation.php ====
  
-    Hook::callAll('contact_photo_menu', $args); +<code> 
-    Hook::callAll('follow', $arr);+Hook::callAll('conversation_start', $cb); 
 +Hook::callAll('render_location', $locate); 
 +Hook::callAll('display_item', $arr); 
 +Hook::callAll('display_item', $arr); 
 +Hook::callAll('item_photo_menu', $args); 
 +Hook::callAll('jot_tool', $jotplugins); 
 +</code> 
 +==== mod/directory.php ====
  
-### src/Model/Profile.php+<code> 
 +Hook::callAll('directory_item', $arr); 
 +</code> 
 +==== mod/xrd.php ====
  
-    Hook::callAll('profile_sidebar_enter', $profile); +<code> 
-    Hook::callAll('profile_sidebar', $arr); +Hook::callAll('personal_xrd', $arr); 
-    Hook::callAll('profile_tabs', $arr); +</code> 
-    Hook::callAll('zrl_init', $arr); +==== mod/parse_url.php ====
-    Hook::callAll('magic_auth_success', $arr);+
  
-### src/Model/Event.php+<code> 
 +Hook::callAll("parse_link", $arr); 
 +</code> 
 +==== src/Module/Delegation.php ====
  
-    Hook::callAll('event_updated', $event['id']); +<code> 
-    Hook::callAll("event_created", $event['id']);+Hook::callAll('home_init', $ret); 
 +</code> 
 +==== mod/acl.php ====
  
-### src/Model/User.php+<code> 
 +Hook::callAll('acl_lookup_end', $results); 
 +</code> 
 +==== mod/network.php ====
  
-    Hook::callAll('register_account', $uid); +<code> 
-    Hook::callAll('remove_user', $user);+Hook::callAll('network_content_init', $arr); 
 +Hook::callAll('network_tabs', $arr); 
 +</code> 
 +==== mod/friendica.php ====
  
-### src/Module/PermissionTooltip.php+<code> 
 +Hook::callAll('about_hook', $o); 
 +</code> 
 +==== mod/profiles.php ====
  
-    Hook::callAll('lockview_content', $item);+<code> 
 +Hook::callAll('profile_post', $_POST); 
 +Hook::callAll('profile_edit', $arr); 
 +</code> 
 +==== mod/settings.php ====
  
-### src/Content/ContactBlock.php+<code> 
 +Hook::callAll('addon_settings_post', $_POST); 
 +Hook::callAll('connector_settings_post', $_POST); 
 +Hook::callAll('display_settings_post', $_POST); 
 +Hook::callAll('addon_settings', $settings_addons); 
 +Hook::callAll('connector_settings', $settings_connectors); 
 +Hook::callAll('display_settings', $o); 
 +</code> 
 +==== mod/photos.php ====
  
-    Hook::callAll('contact_block_end', $arr);+<code> 
 +Hook::callAll('photo_post_init', $_POST); 
 +Hook::callAll('photo_post_file', $ret); 
 +Hook::callAll('photo_post_end', $foo); 
 +Hook::callAll('photo_post_end', $foo); 
 +Hook::callAll('photo_post_end', $foo); 
 +Hook::callAll('photo_post_end', $foo); 
 +Hook::callAll('photo_post_end', intval($item_id)); 
 +Hook::callAll('photo_upload_form', $ret); 
 +</code> 
 +==== mod/profile.php ====
  
-### src/Content/Text/BBCode.php+<code> 
 +Hook::callAll('profile_advanced', $o); 
 +</code> 
 +==== mod/home.php ====
  
-    Hook::callAll('bbcode', $text); +<code> 
-    Hook::callAll('bb2diaspora', $text);+Hook::callAll('home_init', $ret); 
 +Hook::callAll("home_content", $content); 
 +</code> 
 +==== mod/poke.php ====
  
-### src/Content/Text/HTML.php+<code> 
 +Hook::callAll('post_local_end', $arr); 
 +</code> 
 +==== mod/contacts.php ====
  
-    Hook::callAll('html2bbcode', $message);+<code> 
 +Hook::callAll('contact_edit_post', $_POST); 
 +Hook::callAll('contact_edit', $arr); 
 +</code> 
 +==== mod/tagger.php ====
  
-### src/Content/Smilies.php+<code> 
 +Hook::callAll('post_local_end', $arr); 
 +</code> 
 +==== mod/uexport.php ====
  
-    Hook::callAll('smilie', $params);+<code> 
 +Hook::callAll('uexport_options', $options); 
 +</code> 
 +==== mod/register.php ====
  
-### src/Content/Feature.php+<code> 
 +Hook::callAll('register_post', $arr); 
 +Hook::callAll('register_form', $arr); 
 +</code> 
 +==== mod/item.php ====
  
-    Hook::callAll('isEnabled', $arr); +<code> 
-    Hook::callAll('get', $arr);+Hook::callAll('post_local_start', $_REQUEST); 
 +Hook::callAll('post_local', $datarray); 
 +Hook::callAll('post_local_end', $datarray); 
 +</code> 
 +==== mod/editpost.php ====
  
-### src/Content/ContactSelector.php+<code> 
 +Hook::callAll('jot_tool', $jotplugins); 
 +</code> 
 +==== src/Render/FriendicaSmartyEngine.php ====
  
-    Hook::callAll('network_to_name', $nets);+<code> 
 +Hook::callAll("template_vars", $arr); 
 +</code> 
 +==== src/App.php ====
  
-### src/Content/OEmbed.php+<code> 
 +Hook::callAll('load_config'); 
 +Hook::callAll('head'); 
 +Hook::callAll('footer'); 
 +Hook::callAll('route_collection'); 
 +</code> 
 +==== src/Model/Item.php ====
  
-    Hook::callAll('oembed_fetch_url', $embedurl, $j);+<code> 
 +Hook::callAll('post_local', $item); 
 +Hook::callAll('post_remote', $item); 
 +Hook::callAll('post_local_end', $posted_item); 
 +Hook::callAll('post_remote_end', $posted_item); 
 +Hook::callAll('tagged', $arr); 
 +Hook::callAll('post_local_end', $new_item); 
 +Hook::callAll('put_item_in_cache', $hook_data); 
 +Hook::callAll('prepare_body_init', $item); 
 +Hook::callAll('prepare_body_content_filter', $hook_data); 
 +Hook::callAll('prepare_body', $hook_data); 
 +Hook::callAll('prepare_body_final', $hook_data); 
 +</code> 
 +==== src/Model/Contact.php ====
  
-### src/Content/Nav.php+<code> 
 +Hook::callAll('contact_photo_menu', $args); 
 +Hook::callAll('follow', $arr); 
 +</code> 
 +==== src/Model/Profile.php ====
  
-    Hook::callAll('page_header', DI::page()['nav']); +<code> 
-    Hook::callAll('nav_info', $nav);+Hook::callAll('profile_sidebar_enter', $profile); 
 +Hook::callAll('profile_sidebar', $arr)
 +Hook::callAll('profile_tabs', $arr); 
 +Hook::callAll('zrl_init', $arr); 
 +Hook::callAll('magic_auth_success', $arr); 
 +</code> 
 +==== src/Model/Event.php ====
  
-### src/Core/Authentication.php+<code> 
 +Hook::callAll('event_updated', $event['id']); 
 +Hook::callAll("event_created", $event['id']); 
 +</code> 
 +==== src/Model/Register.php ====
  
-    Hook::callAll('logged_in', $a->user); +<code> 
-     +Hook::callAll('authenticate', $addon_auth); 
-### src/Core/StorageManager+</code> 
 +==== src/Model/User.php ====
  
-    Hook::callAll('storage_instance', $data);+<code> 
 +Hook::callAll('authenticate', $addon_auth); 
 +Hook::callAll('register_account', $uid); 
 +Hook::callAll('remove_user', $user); 
 +</code> 
 +==== src/Module/Notifications/Ping.php ====
  
-### src/Worker/Directory.php+<code> 
 +Hook::callAll('network_ping', $arr); 
 +</code> 
 +==== src/Module/PermissionTooltip.php ====
  
-    Hook::callAll('globaldir_update', $arr);+<code> 
 +Hook::callAll('lockview_content', $item); 
 +</code> 
 +==== src/Module/Settings/Delegation.php ====
  
-### src/Worker/Notifier.php+<code> 
 +Hook::callAll('authenticate', $addon_auth); 
 +</code> 
 +==== src/Module/Settings/TwoFactor/Index.php ====
  
-    Hook::callAll('notifier_end', $target_item);+<code> 
 +Hook::callAll('authenticate', $addon_auth); 
 +</code> 
 +==== src/Security/Authenticate.php ====
  
-### src/Module/Login.php+<code> 
 +Hook::callAll('authenticate', $addon_auth); 
 +</code> 
 +==== src/Security/ExAuth.php ====
  
-    Hook::callAll('login_hook', $o);+<code> 
 +Hook::callAll('authenticate', $addon_auth); 
 +</code> 
 +==== src/Content/ContactBlock.php ====
  
-### src/Module/Logout.php+<code> 
 +Hook::callAll('contact_block_end', $arr); 
 +</code> 
 +==== src/Content/Text/BBCode.php ====
  
-    Hook::callAll("logging_out");+<code> 
 +Hook::callAll('bbcode', $text); 
 +Hook::callAll('bb2diaspora', $text); 
 +</code> 
 +==== src/Content/Text/HTML.php ====
  
-### src/Object/Post.php+<code> 
 +Hook::callAll('html2bbcode', $message); 
 +</code> 
 +==== src/Content/Smilies.php ====
  
-    Hook::callAll('render_location', $locate); +<code> 
-    Hook::callAll('display_item', $arr);+Hook::callAll('smilie', $params); 
 +</code> 
 +==== src/Content/Feature.php ====
  
-### src/Core/ACL.php+<code> 
 +Hook::callAll('isEnabled', $arr); 
 +Hook::callAll('get', $arr); 
 +</code> 
 +==== src/Content/ContactSelector.php ====
  
-    Hook::callAll('contact_select_options', $x); +<code
-    Hook::callAll($a->module.'_pre_'.$selname, $arr); +Hook::callAll('network_to_name', $nets); 
-    Hook::callAll($a->module.'_post_'.$selname, $o); +</code
-    Hook::callAll($a->module.'_pre_'.$selname, $arr); +==== src/Content/OEmbed.php ====
-    Hook::callAll($a->module.'_post_'.$selname, $o); +
-    Hook::callAll('jot_networks', $jotnets);+
  
-### src/Core/Authentication.php+<code> 
 +Hook::callAll('oembed_fetch_url', $embedurl, $j); 
 +</code> 
 +==== src/Content/Nav.php ====
  
-    Hook::callAll('logged_in', $a->user); +<code> 
-    Hook::callAll('authenticate', $addon_auth);+Hook::callAll('page_header', DI::page()['nav']); 
 +Hook::callAll('nav_info', $nav); 
 +</code> 
 +==== src/Core/Authentication.php ====
  
-### src/Core/Hook.php+<code> 
 +Hook::callAll('logged_in', $a->user); 
 +</code> 
 +==== src/Core/Protocol.php ====
  
-    self::callSingle(self::getApp(), 'hook_fork', $fork_hook, $hookdata);+<code> 
 +Hook::callAll('support_follow', $hook_data); 
 +Hook::callAll('support_revoke_follow', $hook_data)
 +Hook::callAll('unfollow'$hook_data); 
 +Hook::callAll('revoke_follow', $hook_data); 
 +Hook::callAll('block', $hook_data); 
 +Hook::callAll('unblock', $hook_data); 
 +</code> 
 +==== src/Core/StorageManager ====
  
-### src/Core/L10n/L10n.php+<code> 
 +Hook::callAll('storage_instance', $data); 
 +Hook::callAll('storage_config', $data); 
 +</code> 
 +==== src/Worker/Directory.php ====
  
-    Hook::callAll('poke_verbs', $arr);+<code> 
 +Hook::callAll('globaldir_update', $arr); 
 +</code> 
 +==== src/Worker/Notifier.php ====
  
-### src/Core/Worker.php+<code> 
 +Hook::callAll('notifier_end', $target_item); 
 +</code> 
 +==== src/Module/Login.php ====
  
-    Hook::callAll("proc_run", $arr);+<code> 
 +Hook::callAll('login_hook', $o); 
 +</code> 
 +==== src/Module/Logout.php ====
  
-### src/Util/Emailer.php+<code> 
 +Hook::callAll("logging_out"); 
 +</code> 
 +==== src/Object/Post.php ====
  
-    Hook::callAll('emailer_send_prepare', $params); +<code> 
-    Hook::callAll("emailer_send", $hookdata);+Hook::callAll('render_location', $locate); 
 +Hook::callAll('display_item', $arr); 
 +</code> 
 +==== src/Core/ACL.php ====
  
-### src/Util/Map.php+<code> 
 +Hook::callAll('contact_select_options', $x); 
 +Hook::callAll($a->module.'_pre_'.$selname, $arr); 
 +Hook::callAll($a->module.'_post_'.$selname, $o); 
 +Hook::callAll($a->module.'_pre_'.$selname, $arr); 
 +Hook::callAll($a->module.'_post_'.$selname, $o); 
 +Hook::callAll('jot_networks', $jotnets); 
 +</code> 
 +==== src/Core/Authentication.php ====
  
-    Hook::callAll('generate_map', $arr); +<code> 
-    Hook::callAll('generate_named_map', $arr); +Hook::callAll('logged_in', $a->user); 
-    Hook::callAll('Map::getCoordinates', $arr);+Hook::callAll('authenticate', $addon_auth); 
 +</code> 
 +==== src/Core/Hook.php ====
  
-### src/Util/Network.php+<code> 
 +self::callSingle(self::getApp(), 'hook_fork', $fork_hook, $hookdata); 
 +</code> 
 +==== src/Core/L10n/L10n.php ====
  
-    Hook::callAll('avatar_lookup', $avatar);+<code> 
 +Hook::callAll('poke_verbs', $arr); 
 +</code> 
 +==== src/Core/Worker.php ====
  
-### src/Util/ParseUrl.php+<code> 
 +Hook::callAll("proc_run", $arr); 
 +</code> 
 +==== src/Util/Emailer.php ====
  
-    Hook::callAll("getsiteinfo", $siteinfo);+<code> 
 +Hook::callAll('emailer_send_prepare', $params); 
 +Hook::callAll("emailer_send", $hookdata); 
 +</code> 
 +==== src/Util/Map.php ====
  
-### src/Protocol/DFRN.php+<code> 
 +Hook::callAll('generate_map', $arr); 
 +Hook::callAll('generate_named_map', $arr); 
 +Hook::callAll('Map::getCoordinates', $arr); 
 +</code> 
 +==== src/Util/Network.php ====
  
-    Hook::callAll('atom_feed_end', $atom); +<code> 
-    Hook::callAll('atom_feed_end', $atom);+Hook::callAll('avatar_lookup', $avatar); 
 +</code> 
 +==== src/Util/ParseUrl.php ====
  
-### src/Protocol/Email.php+<code> 
 +Hook::callAll("getsiteinfo", $siteinfo); 
 +</code> 
 +==== src/Protocol/DFRN.php ====
  
-    Hook::callAll('email_getmessage', $message); +<code> 
-    Hook::callAll('email_getmessage_end', $ret);+Hook::callAll('atom_feed_end', $atom); 
 +Hook::callAll('atom_feed_end', $atom); 
 +</code> 
 +==== src/Protocol/Email.php ====
  
-### view/js/main.js+<code> 
 +Hook::callAll('email_getmessage', $message); 
 +Hook::callAll('email_getmessage_end', $ret); 
 +</code> 
 +==== view/js/main.js ====
  
-    document.dispatchEvent(new Event('postprocess_liveupdate')); +<code> 
-</markdown>+document.dispatchEvent(new Event('postprocess_liveupdate')); 
 +</code> 
 +>
  
  • Last modified: 2022-06-25 10:10