]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
added watermark plugin hooks
authorCash Costello <cash.costello@gmail.com>
Sat, 3 Oct 2009 18:42:21 +0000 (18:42 +0000)
committerCash Costello <cash.costello@gmail.com>
Sat, 3 Oct 2009 18:42:21 +0000 (18:42 +0000)
docs/extending_tidypics.txt
languages/en.php
lib/watermark.php

index 0fd544119cc92e8a9594efeeb18c0a3d8bdcef81..916cfa4eec2f8077ffeb7dbc2a4eec98420184f7 100644 (file)
@@ -10,7 +10,7 @@ the custom front page tutorial plugin from Curverider.
 \r
 \r
 *** MAKING TIDYPICS MATCH YOUR THEME ***\r
-Please check the css guid found in this directory. This will list the \r
+Please check the css guide found in this directory. This will list the \r
 different css elements and where they are used.\r
 \r
 \r
@@ -23,4 +23,15 @@ different css elements and where they are used.
 6. photo deleted: 'delete', 'tp_image'  \r
 \r
 *** TIDYPICS PLUGIN HOOKS ***\r
-1. album slideshow: 'tp_slideshow', 'album' - return false to not have a slideshow, otherwise return link to slideshow 
\ No newline at end of file
+1. album slideshow: 'tp_slideshow', 'album' - return false to not have a slideshow, otherwise return link to slideshow\r
+2. watermark - return false to prevent default watermark\r
+    'tp_watermark', 'gd' \r
+    'tp_watermark', 'imagick'\r
+    'tp_watermark', 'imagemagick'\r
+    \r
+    \r
+*** IMAGE MENU EXTENSIONS ***\r
+Below an image is a div called tidypics_controls. By default it contains controls\r
+like tagging or downloading an image. You can change what is shown there by overridding\r
+or extending the tidypics/image_menu view.\r
+\r
index 4b0d3e74617a62c511a5e5754348c6b762706241..7dd7636dd7c568d205614f339d1eb7254733fd82 100644 (file)
@@ -24,7 +24,7 @@
                        'album:group' => "Group albums",\r
                        'item:object:image' => "Photos",\r
                        'item:object:album' => "Albums",\r
-                       'tidypics:uploading:images' => "Please wait. Uploading images",\r
+                       'tidypics:uploading:images' => "Please wait. Uploading images...",\r
                        'tidypics:enablephotos' => 'Enable group photo albums',\r
                        'tidypics:editprops' => 'Edit Image Properties',\r
                        'tidypics:mostcommented' => 'Most commented images',\r
index 896be72fad90e916871fa216af1ab09455d1187c..c7b8503c513acf0e15cff194776d2ac79a5aa3a1 100644 (file)
@@ -27,6 +27,10 @@ function tp_gd_watermark($image) {
        if (!$watermark_text)
                return;
        
+       // plugins can do their own watermark and return false to prevent this function from running
+       if (trigger_plugin_hook('tp_watermark', 'gd', $image, true) === false)
+               return;
+       
        global $CONFIG;
                
        $owner = get_loggedin_user();
@@ -60,6 +64,10 @@ function tp_imagick_watermark($filename) {
        if (!$watermark_text)
                return;
        
+       // plugins can do their own watermark and return false to prevent this function from running
+       if (trigger_plugin_hook('tp_watermark', 'imagick', $filename, true) === false)
+               return;
+       
        $owner = get_loggedin_user();
 
        $watermark_text = tp_process_watermark_text($watermark_text, $owner);
@@ -96,7 +104,10 @@ function tp_im_cmdline_watermark($filename) {
        if (!$watermark_text)
                return;
        
-
+       // plugins can do their own watermark and return false to prevent this function from running
+       if (trigger_plugin_hook('tp_watermark', 'imagemagick', $filename, true) === false)
+               return;
+       
        $im_path = get_plugin_setting('im_path', 'tidypics');
        if (!$im_path) {
                $im_path = "/usr/bin/";