aboutsummaryrefslogtreecommitdiffstats
path: root/doc/hook
diff options
context:
space:
mode:
Diffstat (limited to 'doc/hook')
-rw-r--r--doc/hook/author_is_pmable.bb2
-rw-r--r--doc/hook/can_comment_on_post.bb13
-rw-r--r--doc/hook/connection_remove.bb9
-rw-r--r--doc/hook/legal_webbie.bb10
-rw-r--r--doc/hook/legal_webbie_text.bb7
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