aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorredmatrix <mike@macgirvin.com>2016-09-27 18:11:04 -0700
committerredmatrix <mike@macgirvin.com>2016-09-27 18:11:04 -0700
commiteff2e6c7950df6a08fceb1eb0b9ab737e600763a (patch)
treec95733d9441ca83d879fd7eccb622687c584bd8d /doc
parent3bf0a27e4505881e9a8c118f5025aa7a3495e54e (diff)
downloadvolse-hubzilla-eff2e6c7950df6a08fceb1eb0b9ab737e600763a.tar.gz
volse-hubzilla-eff2e6c7950df6a08fceb1eb0b9ab737e600763a.tar.bz2
volse-hubzilla-eff2e6c7950df6a08fceb1eb0b9ab737e600763a.zip
make the fetching of the default profile photo hookable, and document the hook
Diffstat (limited to 'doc')
-rw-r--r--doc/hook/get_profile_photo.bb18
-rw-r--r--doc/hooklist.bb3
2 files changed, 21 insertions, 0 deletions
diff --git a/doc/hook/get_profile_photo.bb b/doc/hook/get_profile_photo.bb
new file mode 100644
index 000000000..ab07179ae
--- /dev/null
+++ b/doc/hook/get_profile_photo.bb
@@ -0,0 +1,18 @@
+[h2]get_profile_photo[/h2]
+
+Called when fetching the content of the default profile photo for a local channel in mod_photo.
+
+
+Hook arguments:
+
+'imgscale' => integer resolution requested (4, 5, or 6)
+'channel_id' => channel_id of requested profile photo
+'default' => filename of default profile photo of this imgscale
+'data' => empty string
+'mimetype' => empty string
+
+
+If 'data' is set, this data will be used instead of the data obtained from the database search for the profile photo.
+If 'mimetype' is set, this mimetype will be used instead of the mimetype obtained from the database or the default profile photo mimetype.
+
+
diff --git a/doc/hooklist.bb b/doc/hooklist.bb
index 858a7d021..e48fbee7c 100644
--- a/doc/hooklist.bb
+++ b/doc/hooklist.bb
@@ -236,6 +236,9 @@ Hooks allow plugins/addons to "hook into" the code at many points and alter the
[zrl=[baseurl]/help/hook/get_features]get_features[/zrl]
Called when get_features() is called
+[zrl=[baseurl]/help/hook/get_profile_photo]get_profile_photo[/zrl]
+ Called when local profile photo content is fetched in mod_photo
+
[zrl=[baseurl]/help/hook/get_role_perms]get_role_perms[/zrl]
Called when get_role_perms() is called to obtain permissions for named permission roles