From 87ee48bd84bc712ebdccd8286f01b8da3e5c3cba Mon Sep 17 00:00:00 2001 From: redmatrix Date: Wed, 5 Oct 2016 17:25:49 -0700 Subject: update hook documentation --- doc/hook/bbcode.bb | 5 +++++ doc/hook/bbcode_filter.bb | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 doc/hook/bbcode_filter.bb (limited to 'doc/hook') diff --git a/doc/hook/bbcode.bb b/doc/hook/bbcode.bb index 2996a8528..f6b8711b0 100644 --- a/doc/hook/bbcode.bb +++ b/doc/hook/bbcode.bb @@ -1 +1,6 @@ [h2]bbcode[/h2] + + +Called at end of bbcode to html conversion. + +Hook argument contains the converted text string. diff --git a/doc/hook/bbcode_filter.bb b/doc/hook/bbcode_filter.bb new file mode 100644 index 000000000..efeb2e1b0 --- /dev/null +++ b/doc/hook/bbcode_filter.bb @@ -0,0 +1,7 @@ +[h2]bbcode_filter[/h2] + + +Called at beginning of bbcode to html conversion. + +Hook argument contains the text string to be converted. + -- cgit v1.2.3 From 47bfb681c0595d80e01729e477ed153d5e77337a Mon Sep 17 00:00:00 2001 From: zotlabs Date: Fri, 14 Oct 2016 14:27:21 -0700 Subject: add new hook doc --- doc/hook/markdown_to_bb.bb | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 doc/hook/markdown_to_bb.bb (limited to 'doc/hook') diff --git a/doc/hook/markdown_to_bb.bb b/doc/hook/markdown_to_bb.bb new file mode 100644 index 000000000..8af637c8c --- /dev/null +++ b/doc/hook/markdown_to_bb.bb @@ -0,0 +1,5 @@ +[h2]markdown_to_bb[/h2] + +Called when processing markdown to bbcode conversion such as when importing Diaspora protocol source or other markdown sources. The plugin is called post conversion. + +The function takes one argument which is the string being converted. It may be additionally processed by the plugin. -- cgit v1.2.3 From 17091bd38c4e4e5d8b1812dd1d9efeffe0046d02 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Mon, 17 Oct 2016 22:09:41 -0700 Subject: add get_photo hook to go along with get_profile_photo hook. This allows a plugin to over-ride the permissions for cover photos or insert a different photo in place of that requested --- doc/hook/get_photo.bb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 doc/hook/get_photo.bb (limited to 'doc/hook') diff --git a/doc/hook/get_photo.bb b/doc/hook/get_photo.bb new file mode 100644 index 000000000..eaf3beffb --- /dev/null +++ b/doc/hook/get_photo.bb @@ -0,0 +1,14 @@ +[h2]get_photo[/h2] + +Called when fetching the content of photos (except for profile photos) in mod_photo. + + +Hook arguments: + +'imgscale' => integer resolution requested +'resource_id' => resource_id of requested photo +'photo' => array of matching photo table rows after querying for the photo +'allowed' => whether or not access to this resource is allowed + + + -- cgit v1.2.3 From 5b09829959948b85fa6b156abaa091c40d88a9e1 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 30 Nov 2016 16:22:31 -0800 Subject: zot 1.2 --- doc/hook/crypto_methods.bb | 5 +++++ doc/hook/other_encapsulate.bb | 7 +++++++ doc/hook/other_unencapsulate.bb | 5 +++++ 3 files changed, 17 insertions(+) create mode 100644 doc/hook/crypto_methods.bb create mode 100644 doc/hook/other_encapsulate.bb create mode 100644 doc/hook/other_unencapsulate.bb (limited to 'doc/hook') diff --git a/doc/hook/crypto_methods.bb b/doc/hook/crypto_methods.bb new file mode 100644 index 000000000..1b16f567d --- /dev/null +++ b/doc/hook/crypto_methods.bb @@ -0,0 +1,5 @@ +[h2]crypto_mthods[/h2] + +Passed an array of crypto methods in local priority order. + +You may change the order and add new methods or disable existing methods. 'aes256cbc' is always supported as a fallback and currently removing this has no effect. \ No newline at end of file diff --git a/doc/hook/other_encapsulate.bb b/doc/hook/other_encapsulate.bb new file mode 100644 index 000000000..ea0cdf622 --- /dev/null +++ b/doc/hook/other_encapsulate.bb @@ -0,0 +1,7 @@ +[h2]other_encapsulate[/h2] + +Passed an array of 'data', 'pubkey', 'alg', 'result' when encrypting data with an algorithm (alg) which is unknown to the system. Hooks are expected to identify their algorithm, encrypt data with pubkey and place the result in 'result'. + + + + diff --git a/doc/hook/other_unencapsulate.bb b/doc/hook/other_unencapsulate.bb new file mode 100644 index 000000000..c8b0b617f --- /dev/null +++ b/doc/hook/other_unencapsulate.bb @@ -0,0 +1,5 @@ +[h2]other_unencapsulate[/h2] + +Passed an array of 'data', 'prvkey', 'alg', 'result' when decrypting data with an algorithm (alg) which is unknown to the system. Hooks are expected to identify their algorithm, decrypt data with prvkey and place the result in 'result'. + + -- cgit v1.2.3