aboutsummaryrefslogtreecommitdiffstats
path: root/doc/hook
diff options
context:
space:
mode:
Diffstat (limited to 'doc/hook')
-rw-r--r--doc/hook/app_menu.bb1
-rw-r--r--doc/hook/avatar_lookup.bb1
-rw-r--r--doc/hook/cron.bb4
-rw-r--r--doc/hook/cron_daily.bb2
-rw-r--r--doc/hook/cron_weekly.bb2
-rw-r--r--doc/hook/get_widgets.bb1
-rw-r--r--doc/hook/logger.bb16
-rw-r--r--doc/hook/nav.bb27
-rw-r--r--doc/hook/probe_well_known.bb2
-rw-r--r--doc/hook/smilie.bb18
-rw-r--r--doc/hook/tagged.bb15
-rw-r--r--doc/hook/validate_channelname.bb22
12 files changed, 108 insertions, 3 deletions
diff --git a/doc/hook/app_menu.bb b/doc/hook/app_menu.bb
deleted file mode 100644
index 0458a692a..000000000
--- a/doc/hook/app_menu.bb
+++ /dev/null
@@ -1 +0,0 @@
-[h2]app_menu[/h2]
diff --git a/doc/hook/avatar_lookup.bb b/doc/hook/avatar_lookup.bb
deleted file mode 100644
index abd84de5e..000000000
--- a/doc/hook/avatar_lookup.bb
+++ /dev/null
@@ -1 +0,0 @@
-[h2]avatar_lookup[/h2]
diff --git a/doc/hook/cron.bb b/doc/hook/cron.bb
index ebbb64d50..55120b6c2 100644
--- a/doc/hook/cron.bb
+++ b/doc/hook/cron.bb
@@ -1 +1,5 @@
[h2]cron[/h2]
+
+Called when cron task (include/poller.php) is executed. The hook data is a string representing the current time (UTC).
+
+
diff --git a/doc/hook/cron_daily.bb b/doc/hook/cron_daily.bb
index c5062330a..802bea5e4 100644
--- a/doc/hook/cron_daily.bb
+++ b/doc/hook/cron_daily.bb
@@ -1 +1,3 @@
[h2]cron_daily[/h2]
+
+Called when cron task (include/poller.php) performs a cron_daily operation. The hook data is a string representing the current time (UTC).
diff --git a/doc/hook/cron_weekly.bb b/doc/hook/cron_weekly.bb
index 8dc85e494..c01bf9611 100644
--- a/doc/hook/cron_weekly.bb
+++ b/doc/hook/cron_weekly.bb
@@ -1 +1,3 @@
[h2]cron_weekly[/h2]
+
+Called when cron task (include/poller.php) performs a cron_weekly operation. The hook data is a string representing the current time (UTC).
diff --git a/doc/hook/get_widgets.bb b/doc/hook/get_widgets.bb
deleted file mode 100644
index 54b43858a..000000000
--- a/doc/hook/get_widgets.bb
+++ /dev/null
@@ -1 +0,0 @@
-[h2]get_widgets[/h2]
diff --git a/doc/hook/logger.bb b/doc/hook/logger.bb
new file mode 100644
index 000000000..8fe989abd
--- /dev/null
+++ b/doc/hook/logger.bb
@@ -0,0 +1,16 @@
+[h2]logger[/h2]
+
+Called when making an entry to the application logfile
+
+Hook data:
+
+ array(
+ 'filename' => name of logfile relative to application basedir. String.
+ 'loglevel' => the log level of this log entry, if this is higher than the configured maximum loglevel
+ this hook will not be called. Integer.
+ 'message' => The formatted log message, ready for logging. String.
+ 'logged' => boolean, default is false. Set to true to prevent the normal logfile entry to be made
+ (e.g. if the plugin is configured to handle this aspect of the function, or if it is determined
+ that this log entry should not be made)
+ )
+
diff --git a/doc/hook/nav.bb b/doc/hook/nav.bb
index 847573620..b52f90602 100644
--- a/doc/hook/nav.bb
+++ b/doc/hook/nav.bb
@@ -1 +1,28 @@
[h2]nav[/h2]
+
+Called when generating the main navigation bar and menu for a page
+
+Hook data:
+
+ array(
+ 'usermenu' => array( 'icon' => photo URL, 'name' => channel name )
+ 'nav' => array(
+ 'usermenu' => usermenu (photo menu) link array
+ (channel home, profiles, photos, cloud, chats, webapges ...)
+ 'loginmenu' => login menu link array
+ 'network' => grid link and grid-notify
+ 'home' => home link and home-notify
+ 'intros' => intros link and intros-notify
+ 'notifications' => notifications link and notifications-notify
+ 'messages' => PM link and PM-notify
+ 'all_events' => events link and events notfiy
+ 'manage' => manage channels link
+ 'settings' => settings link
+ 'register' => registration link
+ 'help' => help/doc link
+ 'apps' => apps link
+ 'search' => search link and form
+ 'directory' => directory link
+ )
+
+
diff --git a/doc/hook/probe_well_known.bb b/doc/hook/probe_well_known.bb
index eff690f31..62898c536 100644
--- a/doc/hook/probe_well_known.bb
+++ b/doc/hook/probe_well_known.bb
@@ -1 +1,3 @@
[h2]probe_well_known[/h2]
+
+This hook is under construction and not currently used - see include/probe.php \ No newline at end of file
diff --git a/doc/hook/smilie.bb b/doc/hook/smilie.bb
index cea3e0c94..575acc178 100644
--- a/doc/hook/smilie.bb
+++ b/doc/hook/smilie.bb
@@ -1 +1,19 @@
[h2]smilie[/h2]
+
+
+Called when processing translation of emoticons. It is passed an array containing two sub-arrays:
+
+ array(
+ 'texts' => array('text1','text2',...),
+ 'icons' => array('icon1','icon2',...)
+ );
+
+ texts is the emoticon text - for example ':-)' for a traditional smile face.
+ icons is the HTML used as a replacement. For example
+ '<img class="smiley" src="https://localhost/images/smiley-smile.gif" alt=":-)" />'
+
+ If adding or removing an entry from either array, the corresponding element from the matching array must also
+ be added or removed. Emoticons less than three characters in length or not recommended as they get triggered
+ incorrectly quite often. Extended emoticons are indicated by convention using a preceding colon, for example
+
+ :walrus_kissing_a_baby \ No newline at end of file
diff --git a/doc/hook/tagged.bb b/doc/hook/tagged.bb
index 5add76713..05d081d07 100644
--- a/doc/hook/tagged.bb
+++ b/doc/hook/tagged.bb
@@ -1 +1,16 @@
[h2]tagged[/h2]
+
+
+This hook is called when a delivery is made which results in the recipient being tagged.
+
+The hook data is an array containing
+
+ array(
+ 'channel_id' => int,
+ 'item' => item structure of the delivered item from database,
+ 'body' => the body of the referenced item
+
+ );
+
+ Note: This hook is called before secondary delivery chains are invoked in the case of tagging a forum. This means that permissions and some item attributes will be those of the item before being re-packaged and before ownership of this item is given to the forum.
+
diff --git a/doc/hook/validate_channelname.bb b/doc/hook/validate_channelname.bb
index c78961017..2ab12bbec 100644
--- a/doc/hook/validate_channelname.bb
+++ b/doc/hook/validate_channelname.bb
@@ -1 +1,23 @@
[h2]validate_channelname[/h2]
+
+Called when creating a new channel or changing the channel name in mod/settings.php
+
+Hook data consists of an array
+
+ array(
+ 'name' => supplied name
+ );
+
+ If the hook handler determines the name is valid, do nothing. If there is an issue with the name,
+ set $hook_data['message'] to the message text which should be displayed to the member - and the name will
+ not be accepted.
+
+
+ Example:
+ [code]
+ if(mb_strlen($hook_data['name']) < 3)
+ $hook_data['message'] = t('Name too short.');
+ [/code]
+
+
+ \ No newline at end of file