diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-08-16 10:32:35 +0200 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-08-16 10:32:35 +0200 |
commit | 4a7384bc0ce1893a432bf4b7d67bca23796fe9db (patch) | |
tree | 5623c66a3f66445284529d6207e4ab4a2edb2810 /doc/hook | |
parent | c664a4bdcd1bd578f5ec3c2884f7c97e9f68d2d7 (diff) | |
parent | 90bc21f2d560d879d7eaf05a85af6d6dca53ebac (diff) | |
download | volse-hubzilla-4a7384bc0ce1893a432bf4b7d67bca23796fe9db.tar.gz volse-hubzilla-4a7384bc0ce1893a432bf4b7d67bca23796fe9db.tar.bz2 volse-hubzilla-4a7384bc0ce1893a432bf4b7d67bca23796fe9db.zip |
Merge branch '2.6RC'2.6
Diffstat (limited to 'doc/hook')
-rw-r--r-- | doc/hook/author_is_pmable.bb | 2 | ||||
-rw-r--r-- | doc/hook/can_comment_on_post.bb | 13 | ||||
-rw-r--r-- | doc/hook/connection_remove.bb | 9 | ||||
-rw-r--r-- | doc/hook/legal_webbie.bb | 10 | ||||
-rw-r--r-- | doc/hook/legal_webbie_text.bb | 7 |
5 files changed, 40 insertions, 1 deletions
diff --git a/doc/hook/author_is_pmable.bb b/doc/hook/author_is_pmable.bb index 708350673..11d1185f3 100644 --- a/doc/hook/author_is_pmable.bb +++ b/doc/hook/author_is_pmable.bb @@ -6,7 +6,7 @@ By default author_is_pmable() returns true for 'zot' xchans, and false for all o The plugin is passed an array - [ 'xchan' => $author_xchan, 'result' => 'unset' ] + [ 'xchan' => $author_xchan, 'abook' => abook record, 'result' => 'unset' ] A plugin which sets the 'result' to something besides 'unset' will over-ride the default behaviour. A value of true will enable the 'send mail' link and the private mail recipient will be set to the author's xchan_hash. A value of false will disable the 'send mail' link. diff --git a/doc/hook/can_comment_on_post.bb b/doc/hook/can_comment_on_post.bb new file mode 100644 index 000000000..2cfd3b2da --- /dev/null +++ b/doc/hook/can_comment_on_post.bb @@ -0,0 +1,13 @@ +[h3]can_comment_on_post[/h3] + +Called when deciding whether or not to display a comment box for a post. + + +Hook data (array): + observer_hash => xchan_hash of current observer + item => posted item + allowed => 'unset' + + +To over-ride the default behaviour, change allowed to true or false + diff --git a/doc/hook/connection_remove.bb b/doc/hook/connection_remove.bb new file mode 100644 index 000000000..bd13ae5f2 --- /dev/null +++ b/doc/hook/connection_remove.bb @@ -0,0 +1,9 @@ +[h3]connection_remove[/h3] + +Called when deleting a connection. + + +Passed parameter array: + + 'channel_id' => channel_id of the channel removing the connection + 'abook_id' => abook_id of the connection being removed diff --git a/doc/hook/legal_webbie.bb b/doc/hook/legal_webbie.bb new file mode 100644 index 000000000..8c7d32d56 --- /dev/null +++ b/doc/hook/legal_webbie.bb @@ -0,0 +1,10 @@ +[h2]legal_webbie[/h2] + +Called when validating a channel address. By default the valid characters are +a-z,0-9,-,_, and . Uppercase ASCII characters are folded to lower and any invalid characters are stripped. + +Some federated networks require more restrictive rules. + +The hook is called with an array [ 'input' => (supplied text), 'output' => (validated text) ] + +A plugin will generally perform a regex filter or text operation on 'input' and provide the results in 'output'.
\ No newline at end of file diff --git a/doc/hook/legal_webbie_text.bb b/doc/hook/legal_webbie_text.bb new file mode 100644 index 000000000..32c74c93b --- /dev/null +++ b/doc/hook/legal_webbie_text.bb @@ -0,0 +1,7 @@ +[h2]legal_webbie_text[/h2] + +Returns a string describing the text rules applied to legal_webbie(). + +Called with an array [ 'text' => (descriptive text describing text character limitations) ] + +A plugin should return the description of the allowed characters and operation performed in the 'legal_webbie' hook to assist people when creating a new channel.
\ No newline at end of file |