aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Daemon
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-11-21 17:56:23 -0800
committerzotlabs <mike@macgirvin.com>2017-11-21 17:56:23 -0800
commiteb69f6c346af5775471f0bd57a5ed8709f6ff2a4 (patch)
tree08d21bb8c5971d10039d18d1f0ca0288f5368a64 /Zotlabs/Daemon
parent2cb3ccbf1462e89f63e9b804f438c95d9d22d72a (diff)
downloadvolse-hubzilla-eb69f6c346af5775471f0bd57a5ed8709f6ff2a4.tar.gz
volse-hubzilla-eb69f6c346af5775471f0bd57a5ed8709f6ff2a4.tar.bz2
volse-hubzilla-eb69f6c346af5775471f0bd57a5ed8709f6ff2a4.zip
add thumbnail hook
Diffstat (limited to 'Zotlabs/Daemon')
-rw-r--r--Zotlabs/Daemon/Thumbnail.php26
1 files changed, 25 insertions, 1 deletions
diff --git a/Zotlabs/Daemon/Thumbnail.php b/Zotlabs/Daemon/Thumbnail.php
index b3e539086..e1f17c304 100644
--- a/Zotlabs/Daemon/Thumbnail.php
+++ b/Zotlabs/Daemon/Thumbnail.php
@@ -17,11 +17,35 @@ class Thumbnail {
if(! $c)
return;
+ $attach = $c[0];
+
$preview_style = intval(get_config('system','thumbnail_security',0));
$preview_width = intval(get_config('system','thumbnail_width',300));
$preview_height = intval(get_config('system','thumbnail_height',300));
- $attach = $c[0];
+ $p = [
+ 'attach' => $attach,
+ 'preview_style' => $preview_style,
+ 'preview_width' => $preview_width,
+ 'preview_height' => $preview_height,
+ 'thumbnail' => null
+ ];
+
+ /**
+ * @hooks thumbnail
+ * * \e array \b attach
+ * * \e int \b preview_style
+ * * \e int \b preview_width
+ * * \e int \b preview_height
+ * * \e string \b thumbnail
+ */
+
+ call_hooks('thumbnail',$p);
+ if($p['thumbnail']) {
+ return;
+ }
+
+
$default_controller = null;
$files = glob('Zotlabs/Thumbs/*.php');