From 5b3f536613d1db389a7194d4ebe4a23505af0573 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sat, 23 Apr 2016 17:47:00 -0700 Subject: updated doco to document how to use hook callbacks which are object methods --- doc/plugins.bb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'doc') diff --git a/doc/plugins.bb b/doc/plugins.bb index f96fb8dee..f2f0b04e8 100644 --- a/doc/plugins.bb +++ b/doc/plugins.bb @@ -264,6 +264,30 @@ we will create an argc/argv list for use by your module functions 3 whatever [/code] +[h3]Using class methods as hook handler functions[/h3] + +To register a hook using a class method as a callback, a couple of things need to be considered. The first is that the functions need to be declared static public so that they are available from all contexts, and they need to have a namespace attached because they can be called from within multiple namespaces. You can then register them as strings or arrays (using the PHP internal calling method). + +[code] +/.hidden -- cgit v1.2.3 From 0e348118860b63d417b4b0b4346c7e137ce787a7 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Sat, 23 Apr 2016 22:55:45 -0700 Subject: add some missing hook entries to the doco --- doc/hooklist.bb | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/hooklist.bb b/doc/hooklist.bb index bae641585..994d0dbb2 100644 --- a/doc/hooklist.bb +++ b/doc/hooklist.bb @@ -34,12 +34,18 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the [zrl=[baseurl]/help/hook/activity_received]activity_received[/zrl] Called when an activity (post, comment, like, etc.) has been received from a zot source +[zrl=[baseurl]/help/hook/admin_aside]admin_aside[/zrl] + Called when generating the admin page sidebar widget + [zrl=[baseurl]/help/hook/affinity_labels]affinity_labels[/zrl] Used to generate alternate labels for the affinity slider. [zrl=[baseurl]/help/hook/api_perm_is_allowed]api_perm_is_allowed[/zrl] Called when perm_is_allowed() is executed from an API call. +[zrl=[baseurl]/help/hook/app_menu]app_menu[/zrl] + Called when generating the app_menu dropdown (may be obsolete) + [zrl=[baseurl]/help/hook/atom_author]atom_author[/zrl] Called when generating an author or owner element for an Atom ActivityStream feed @@ -88,6 +94,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the [zrl=[baseurl]/help/hook/check_siteallowed]check_siteallowed[/zrl] Used to over-ride or bypass the site black/white block lists +[zrl=[baseurl]/help/hook/comment_buttons]comment_buttons[/zrl] + Called when rendering the edit buttons for comments + [zrl=[baseurl]/help/hook/connect_premium]connect_premium[/zrl] Called when connecting to a premium channel @@ -112,6 +121,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the [zrl=[baseurl]/help/hook/conversation_start]conversation_start[/zrl] Called in the beginning of rendering a conversation (message or message collection or stream) +[zrl=[baseurl]/help/hook/cover_photo_content_end]cover_photo_content_end[/zrl] + Called after a cover photo has been uplaoded + [zrl=[baseurl]/help/hook/create_identity]create_identity[/zrl] Called when creating a channel @@ -184,6 +196,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the [zrl=[baseurl]/help/hook/follow]follow[/zrl] called when a follow operation takes place +[zrl=[baseurl]/help/hook/follow_from_feed]follow_from_feed[/zrl] + called when a follow operation takes place on an RSS feed + [zrl=[baseurl]/help/hook/follow_allow]follow_allow[/zrl] called before storing the results of a follow operation @@ -206,6 +221,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the [zrl=[baseurl]/help/hook/get_all_perms]get_all_perms[/zrl] called when get_all_perms() is used +[zrl=[baseurl]/help/hook/get_best_language]get_best_language[/zrl] + called when choosing the preferred language for the page + [zrl=[baseurl]/help/hook/get_features]get_features[/zrl] Called when get_features() is called @@ -266,6 +284,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the [zrl=[baseurl]/help/hook/local_dir_update]local_dir_update[/zrl] Called when processing a directory update from a channel on the directory server +[zrl=[baseurl]/help/hook/location_move]location_move[/zrl] + Called when a new location has been provided to a UNO channel (indicating a move rather than a clone) + [zrl=[baseurl]/help/hook/logged_in]logged_in[/zrl] Called when authentication by any means has succeeeded @@ -281,6 +302,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the [zrl=[baseurl]/help/hook/magic_auth]magic_auth[/zrl] Called when processing a magic-auth sequence +[zrl=[baseurl]/help/hook/match_webfinger_location]match_webfinger_location[/zrl] + Called when processing webfinger requests + [zrl=[baseurl]/help/hook/magic_auth_openid_success]magic_auth_openid_success[/zrl] Called when a magic-auth was successful due to openid credentials @@ -324,7 +348,10 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the Called when a hub is delivered [zrl=[baseurl]/help/hook/notifier_normal]notifier_normal[/zrl] - Called when the notofoer is invoked for a 'normal' delivery + Called when the notifier is invoked for a 'normal' delivery + +[zrl=[baseurl]/help/hook/notifier_process]notifier_process[/zrl] + Called when the notifier is processing a message/event [zrl=[baseurl]/help/hook/obj_verbs]obj_verbs[/zrl] Called when creating the list of verbs available for profile "things". @@ -445,6 +472,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the [zrl=[baseurl]/help/hook/profile_tabs]profile_tabs[/zrl] Called when generating the tabs for channel related pages (channel,profile,files,etc.) + +[zrl=[baseurl]/help/hook/queue_deliver]queue_deliver[/zrl] + Called when delivering a queued message [zrl=[baseurl]/help/hook/register_account]register_account[/zrl] Called when an account has been created @@ -458,6 +488,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the [zrl=[baseurl]/help/hook/reverse_magic_auth]reverse_magic_auth[/zrl] Called before invoking reverse magic auth to send you to your own site to authenticate on this site +[zrl=[baseurl]/help/hook/settings_account]settings_account[/zrl] + Called when generating the account settings form + [zrl=[baseurl]/help/hook/settings_form]settings_form[/zrl] Called when generating the channel settings form -- cgit v1.2.3 From 42ee3ab21c3863dc3d6d619234fc1318563baa2a Mon Sep 17 00:00:00 2001 From: Treer Date: Mon, 25 Apr 2016 03:09:52 +1000 Subject: add default_photo_profile to docs --- doc/Webpages.md | 2 +- doc/hidden_configs.bb | 99 ++++++++++++++++++++++++++++++--------------------- doc/webpages.bb | 2 +- 3 files changed, 60 insertions(+), 43 deletions(-) (limited to 'doc') diff --git a/doc/Webpages.md b/doc/Webpages.md index dafd3661d..801a9a3a0 100644 --- a/doc/Webpages.md +++ b/doc/Webpages.md @@ -1,7 +1,7 @@ Creating Webpages ================= -Red enables users to create static webpages. To activate this feature, enable the web pages feature in your Additional Features section. +Hubzilla enables users to create static webpages. To activate this feature, enable the web pages feature in your Additional Features section. Once enabled, a new tab will appear on your channel page labelled "Webpages". Clicking this link will take you to the webpage editor. Here you can create a post using either BBCode or the rich text editor. diff --git a/doc/hidden_configs.bb b/doc/hidden_configs.bb index 520abc22b..d07e8addf 100644 --- a/doc/hidden_configs.bb +++ b/doc/hidden_configs.bb @@ -60,28 +60,32 @@ This document assumes you're an administrator. Allow the @mention tagging of anyone whether you are connected or not. [b]system.directorytags[/b] Set the number of keyword tags displayed on the directory page. Default is 50 unless set to a - positive integer. - [b]system.disable_directory_keywords[/b] - If '1', do not show directory keywords. If the hub is a directory server, prevent returning - tags to any directory clients. Please do not set this for directory servers in the RED_GLOBAL realm. - [b]system.disable_dreport[/b] - If '1', don't store or link to delivery reports + positive integer. + [b]system.disable_directory_keywords[/b] + If '1', do not show directory keywords. If the hub is a directory server, prevent returning + tags to any directory clients. Please do not set this for directory servers in the RED_GLOBAL realm. + [b]system.disable_dreport[/b] + If '1', don't store or link to delivery reports [b]system.startpage[/b] Set the default page to be taken to after a login for all channels at this website. Can be overwritten by user settings. [b]system.projecthome[/b] Set the project homepage as the homepage of your hub. (Obsolete) - [b]system.auto_channel_create[/b] - Add the necessary form elements to create the first channel on the account registration page, and create it - (possibly following email validation or administrator approval). This precludes the ability to import a channel - from another site as the first channel created on this site for a new account. - Use with system.default_permissions_role to streamline registration. - [b]system.default_permissions_role[/b] - If set to a valid permissions role name, use that role for - the first channel created by a new account and don't ask for the "Channel Type" on - the channel creation form. Examples of valid names are: 'social', 'social_restricted', 'social_private', - 'forum', 'forum_restricted' and 'forum_private'. - Read more about permissions roles [zrl=[baseurl]/help/roles]here[/zrl]. + [b]system.auto_channel_create[/b] + Add the necessary form elements to create the first channel on the account registration page, and create it + (possibly following email validation or administrator approval). This precludes the ability to import a channel + from another site as the first channel created on this site for a new account. + Use with system.default_permissions_role to streamline registration. + [b]system.default_permissions_role[/b] + If set to a valid permissions role name, use that role for + the first channel created by a new account and don't ask for the "Channel Type" on + the channel creation form. Examples of valid names are: 'social', 'social_restricted', 'social_private', + 'forum', 'forum_restricted' and 'forum_private'. + Read more about permissions roles [zrl=[baseurl]/help/roles]here[/zrl]. + [b]system.default_photo_profile[/b] + Set the profile photo that new channels start with. This should contain the name of a directory + under [font=courier]images/default_profile_photos/[/font] or be left unset. If not set then 'rainbow_man' + is assumed. [b]system.workflow_channel_next[/b] The page to direct new members to immediately after creating a channel. [b]system.workflow_register_next[/b] @@ -96,16 +100,16 @@ This document assumes you're an administrator. Similar to block_public, except only blocks public access to search features. Useful for sites that want to be public, but keep getting hammered by search engines. - [b]system.proc_run_use_exec - If 1, use the exec system call in proc_run to run background tasks. By default - we use proc_open and proc_close. On some (currently rare) systems this does not work well. + [b]system.proc_run_use_exec[/b] + If 1, use the exec system call in proc_run to run background tasks. By default + we use proc_open and proc_close. On some (currently rare) systems this does not work well. [b]system.paranoia[/b] As the pconfig, but on a site-wide basis. Can be overwritten by member settings. - [b]system.transport_security_header[/b] - if non-zero and SSL is being used, include a strict-transport-security header on webpages - [b]system.poke_basic[/b] - Reduce the number of poke verbs to exactly 1 ("poke"). Disable other verbs. + [b]system.transport_security_header[/b] + if non-zero and SSL is being used, include a strict-transport-security header on webpages + [b]system.poke_basic[/b] + Reduce the number of poke verbs to exactly 1 ("poke"). Disable other verbs. [b]system.openssl_conf_file[/b] Specify a file containing OpenSSL configuration. Read the code first. If you can't read the code, don't play with it. @@ -115,9 +119,9 @@ This document assumes you're an administrator. are running, but also keeps things a bit faster while it's not. There also exist CLI utilities for performing this operation, which you may prefer, especially if you're a large site. - [b]system.expire_limit - Don't expire any more than this number of posts per channel per - expiration run to keep from exhausting memory. Default 5000. + [b]system.expire_limit[/b] + Don't expire any more than this number of posts per channel per + expiration run to keep from exhausting memory. Default 5000. [b]system.dlogfile[/b] Logfile to use for logging development errors. Exactly the same as logger otherwise. This isn't magic, and requires your own logging @@ -138,13 +142,17 @@ This document assumes you're an administrator. [b]system.cron_hour[/b] Specify an hour in which to run cron_daily. By default with no config, this will run at midnight UTC. [b]system.minimum_feedcheck_minutes[/b] - The minimum interval between polling RSS feeds. If this is lower than the cron interval, feeds will be polled with each cronjob. Defaults to 60 if not set. The site setting can also be over-ridden on a channel by channel basis by a service class setting aptly named 'minimum_feedcheck_minutes'. + The minimum interval between polling RSS feeds. If this is lower than the cron interval, feeds + will be polled with each cronjob. Defaults to 60 if not set. The site setting can also be over-ridden + on a channel by channel basis by a service class setting aptly named 'minimum_feedcheck_minutes'. [b]system.blacklisted_sites[/b] An array of specific hubs to block from this hub completely. [b]system.ignore_imagick[/b] Ignore imagick and use GD, even if imagick is installed on the server. Prevents some issues with PNG files in older versions of imagick. [b]system.no_age_restriction[/b] - Do not restrict registration to people over the age of 13. This carries legal responsibilities in many countries to require that age be provided and to block all personal information from minors, so please check your local laws before changing. + Do not restrict registration to people over the age of 13. This carries legal responsibilities in + many countries to require that age be provided and to block all personal information from minors, + so please check your local laws before changing. [b]system.override_poll_lockfile[/b] Ignore the lock file in the poller process to allow more than one process to run at a time. [b]system.projecthome[/b] @@ -158,16 +166,23 @@ This document assumes you're an administrator. [b]system.photo_cache_time[/b] How long to cache photos, in seconds. Default is 86400 (1 day). Longer time increases performance, but it also means it takes longer for changed permissions to apply. - [b]system.poco_rating_enable[/b] - Distributed reputation reporting and data collection may be disabled. If your site does not participate in distributed reputation you will also not be able to make use of the data from your connections on other sites. By default and in the absence of any setting it is enabled. Individual members can opt out by restricting who can see their connections or by not providing any reputation information for their connections. - [b]system.register_link[/b] - path to direct to from the "register" link on the login form. On closed sites this will direct to 'pubsites'. For open sites it will normally redirect to 'register' but you may change this to a custom site page offering subscriptions or whatever. - [b]system.max_import_size[/b] - If configured, the maximum length of an imported text message. This is normally left at 200Kbytes or more to accomodate Friendica private photos, which are embedded. - [b]system.tempdir[/b] - Place to store temporary files (currently unused), default is defined in the PHP configuration - [b]system.uploaddir[/b] - Location to upload files (default is system.tempdir, currently used only by js_upload plugin) + [b]system.poco_rating_enable[/b] + Distributed reputation reporting and data collection may be disabled. If your site does not participate + in distributed reputation you will also not be able to make use of the data from your connections on + other sites. By default and in the absence of any setting it is enabled. Individual members can opt out + by restricting who can see their connections or by not providing any reputation information for their + connections. + [b]system.register_link[/b] + path to direct to from the "register" link on the login form. On closed sites this will direct to + 'pubsites'. For open sites it will normally redirect to 'register' but you may change this to a + custom site page offering subscriptions or whatever. + [b]system.max_import_size[/b] + If configured, the maximum length of an imported text message. This is normally left at 200Kbytes + or more to accomodate Friendica private photos, which are embedded. + [b]system.tempdir[/b] + Place to store temporary files (currently unused), default is defined in the PHP configuration + [b]system.uploaddir[/b] + Location to upload files (default is system.tempdir, currently used only by js_upload plugin) [b]system.disable_discover_tab[/b] This allows you to completely disable the ability to discover public content from external sites. [b]system.sys_expire_days[/b] @@ -175,7 +190,8 @@ This document assumes you're an administrator. [b]system.openssl_encrypt[/b] Use openssl encryption engine, default is false (uses mcrypt for AES encryption) [b]system.max_tagged_forums[/b] - Spam prevention. Limits the number of tagged forums which are recognised in any post. Default is 2. Only the first 'n' tags will be delivered as forums, the others will not cause any delivery. + Spam prevention. Limits the number of tagged forums which are recognised in any post. + Default is 2. Only the first 'n' tags will be delivered as forums, the others will not cause any delivery. [b]system.openssl_conf_file[/b] Needed in some Windows installations to locate the openssl configuration file on the system. [b]system.hide_help[/b] @@ -187,7 +203,8 @@ This document assumes you're an administrator. [b]system.hide_version[/b] * If true, do not report the software version on webpages and tools. (*) Must be set in .htconfig.php [b]system.hidden_version_siteinfo[/b] - If true, do not report the software version on siteinfo pages (system.hide_version also hides the version on these pages, this setting *only* hides the version on siteinfo pages). + If true, do not report the software version on siteinfo pages (system.hide_version also hides + the version on these pages, this setting *only* hides the version on siteinfo pages). [b]system.email_notify_icon_url[/b] URL of image (32x32) to display in email notifications (HTML bodies). diff --git a/doc/webpages.bb b/doc/webpages.bb index 040ad0c5c..6b3a800cb 100644 --- a/doc/webpages.bb +++ b/doc/webpages.bb @@ -1,6 +1,6 @@ [b]Creating Web Pages[/b] -Red enables users to create static webpages. To activate this feature, enable the web pages feature in your Additional Features section. +Hubzilla enables users to create static webpages. To activate this feature, enable the web pages feature in your Additional Features section. Once enabled, a new tab will appear on your channel page labelled "Webpages". Clicking this link will take you to the webpage editor. Pages will be accessible at mydomain/page/username/pagelinktitle -- cgit v1.2.3 From d91429000225015a9dd4867a40d58193d3fa0a69 Mon Sep 17 00:00:00 2001 From: Treer Date: Mon, 25 Apr 2016 03:17:48 +1000 Subject: merged duplicate entry in docs --- doc/hidden_configs.bb | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/doc/hidden_configs.bb b/doc/hidden_configs.bb index d07e8addf..5bb7454ec 100644 --- a/doc/hidden_configs.bb +++ b/doc/hidden_configs.bb @@ -4,9 +4,13 @@ $Projectname contains many configuration options hidden from the main admin pane These are generally options considered too niche, confusing, or advanced for the average member. These settings can be activated from the the top level web -directory with the syntax [code]util/config cat key value[/code] for a site -configuration, or [code]util/pconfig channel_id cat key value[/code] for a -member configuration. +directory with the syntax + +[code]util/config cat key value[/code] +for a site configuration, or + +[code]util/pconfig channel_id cat key value[/code] +for a member configuration. This document assumes you're an administrator. @@ -83,9 +87,8 @@ This document assumes you're an administrator. 'forum', 'forum_restricted' and 'forum_private'. Read more about permissions roles [zrl=[baseurl]/help/roles]here[/zrl]. [b]system.default_photo_profile[/b] - Set the profile photo that new channels start with. This should contain the name of a directory - under [font=courier]images/default_profile_photos/[/font] or be left unset. If not set then 'rainbow_man' - is assumed. + Set the profile photo that new channels start with. This should contain the name of a directory located + under [font=courier]images/default_profile_photos/[/font], or be left unset. If not set then 'rainbow_man' is assumed. [b]system.workflow_channel_next[/b] The page to direct new members to immediately after creating a channel. [b]system.workflow_register_next[/b] @@ -111,8 +114,9 @@ This document assumes you're an administrator. [b]system.poke_basic[/b] Reduce the number of poke verbs to exactly 1 ("poke"). Disable other verbs. [b]system.openssl_conf_file[/b] - Specify a file containing OpenSSL configuration. Read the code first. - If you can't read the code, don't play with it. + Specify a file containing OpenSSL configuration. Needed in some Windows installations to + locate the openssl configuration file on the system. + Read the code first. If you can't read the code, don't play with it. [b]system.optimize_items[/b] Runs optimise_table during some tasks to keep your database nice and defragmented. This comes at a performance cost while the operations @@ -192,8 +196,6 @@ This document assumes you're an administrator. [b]system.max_tagged_forums[/b] Spam prevention. Limits the number of tagged forums which are recognised in any post. Default is 2. Only the first 'n' tags will be delivered as forums, the others will not cause any delivery. - [b]system.openssl_conf_file[/b] - Needed in some Windows installations to locate the openssl configuration file on the system. [b]system.hide_help[/b] Don't display help documentation link in nav bar [b]system.expire_delivery_reports[/b] -- cgit v1.2.3