]> git.mxchange.org Git - friendica.git/blobdiff - doc/Addons.md
Using Locks for Updating and writing last success to config
[friendica.git] / doc / Addons.md
index d432a9bcbe87098c11e9e05a502f73947eec81ce..f7dfcc870c72ca56a877df3503969ec37e743694 100644 (file)
@@ -85,6 +85,8 @@ function <addon>_head(App $a)
 }
 ```
 
+`__DIR__` is the folder path of your addon.
+
 ## JavaScript
 
 ### Global scripts
@@ -105,6 +107,8 @@ function <addon>_footer(App $a)
 }
 ```
 
+`__DIR__` is the folder path of your addon.
+
 ### JavaScript hooks
 
 The main Friendica script provides hooks via events dispatched on the `document` property.
@@ -115,7 +119,9 @@ document.addEventListener(name, callback);
 ```
 
 - *name* is the name of the hook and corresponds to a known Friendica JavaScript hook.
-- *callback* is a JavaScript function to execute.
+- *callback* is a JavaScript anonymous function to execute.
+
+More info about Javascript event listeners: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener
 
 #### Current JavaScript hooks
 
@@ -444,10 +450,6 @@ Here is a complete list of all hook callbacks with file locations (as of 24-Sep-
     Addon::callHooks('item_photo_menu', $args);
     Addon::callHooks('jot_tool', $jotplugins);
 
-### include/security.php
-
-    Addon::callHooks('logged_in', $a->user);
-
 ### include/text.php
 
     Addon::callHooks('contact_block_end', $arr);
@@ -582,7 +584,7 @@ Here is a complete list of all hook callbacks with file locations (as of 24-Sep-
 ### src/App.php
 
     Addon::callHooks('load_config');
-       Addon::callHooks('head');
+    Addon::callHooks('head');
     Addon::callHooks('footer');
 
 ### src/Model/Item.php
@@ -687,6 +689,11 @@ Here is a complete list of all hook callbacks with file locations (as of 24-Sep-
     Addon::callHooks($a->module.'_post_'.$selname, $o);
     Addon::callHooks('jot_networks', $jotnets);
 
+### src/Core/Authentication.php
+
+    Addon::callHooks('logged_in', $a->user);
+
+
 ### src/Core/Worker.php
 
     Addon::callHooks("proc_run", $arr);