-If this function exists, you will now receive all page requests for "http://my.web.site/plugin_name" - with any number of URL components as additional arguments. These are parsed into an array $a->argv, with a corresponding $a->argc indicating the number of URL components. So http://my.web.site/plugin/arg1/arg2 would look for a module named "plugin" and pass its module functions the $a App structure (which is available to many components). This will include:
- $a->argc = 3
- $a->argv = array(0 => 'plugin', 1 => 'arg1', 2 => 'arg2');
+ # apply template. first argument is the loaded template,
+ # second an array of 'name'=>'values' to pass to template
+ $output = replace_macros($tpl,array(
+ 'title' => 'My beautiful plugin',
+ ));
+
+See also the wiki page [Quick Template Guide](https://github.com/friendica/friendica/wiki/Quick-Template-Guide).
+
+Current hooks
+-------------
+
+###'authenticate'
+'authenticate' is called when a user attempts to login.
+$b is an array containing:
+
+ 'username' => the supplied username
+ 'password' => the supplied password
+ 'authenticated' => set this to non-zero to authenticate the user.
+ 'user_record' => successful authentication must also return a valid user record from the database
+
+###'logged_in'
+'logged_in' is called after a user has successfully logged in.
+$b contains the $a->user array.
+
+###'display_item'
+'display_item' is called when formatting a post for display.
+$b is an array:
+
+ 'item' => The item (array) details pulled from the database
+ 'output' => the (string) HTML representation of this item prior to adding it to the page
+
+###'post_local'
+* 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
+
+###'post_local_end'
+* 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 database
+* Please note: body contents are bbcode - not HTML
+
+###'post_remote'
+* 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 generating the HTML for the user Settings page
+* $b is the (string) HTML of the settings page before the final '</form>' tag.
+
+###'settings_post'
+* called when the Settings pages are submitted
+* $b is the $_POST array