[ansel] Patch for user preference to show EXIF data

Heath S. Hendrickson heath at outerspaceconsultants.com
Tue Jan 20 10:55:01 PST 2004


Sorry about that.  I'm still new to this whole thing.

Attached is a file containing unified diffs agains view.php and 
config/prefs.php.dist.  I read the coding standards and applied it to 
the patch in view.php.  I'm not sure it'll come through as text/plain, 
I'm using Thunderbird for email and can't find the option to force 
attachment behaviour.

Let me know if I'm still not doing something right.

heath

Chuck Hagenbuch wrote:

>Quoting "Heath S. Hendrickson" <heath at outerspaceconsultants.com>:
>
>  
>
>>I added another user preference to allow a user to select whether they
>>want to view the EXIF data automatically or not.
>>    
>>
>
>1. Please read docs/CODING_STANDARDS.
>2. Please submit changes as unified diffs.
>3. Please put diffs into text/plain attachments so that they are not butchered
>by linewrapping.
>
>Thanks,
>-chuck
>
>--
>Charles Hagenbuch, <chuck at horde.org>
>"Here, I brought some cole slaw. It's made from peeeooople! Just kidding."
>
>  
>

-------------- next part --------------
Index: view.php
===================================================================
RCS file: /usr/local/horde/cvs/ansel/view.php,v
retrieving revision 1.37
diff -u -r1.37 view.php
--- view.php	19 Jan 2004 22:37:54 -0000	1.37
+++ view.php	20 Jan 2004 18:44:45 -0000
@@ -92,7 +92,8 @@
             require ANSEL_TEMPLATES . '/view/navbar-image.inc';
         }
         require ANSEL_TEMPLATES . '/view/description-image.inc';
-        require ANSEL_TEMPLATES . '/view/exif-image.inc';
+        global $prefs;
+        if($prefs->getValue('showexif')) { require ANSEL_TEMPLATES . '/view/exif-image.inc'; }
     }
     break;
 
Index: config/prefs.php.dist
===================================================================
RCS file: /usr/local/horde/cvs/ansel/config/prefs.php.dist,v
retrieving revision 1.17
diff -u -r1.17 prefs.php.dist
--- config/prefs.php.dist	18 Jan 2004 16:58:02 -0000	1.17
+++ config/prefs.php.dist	20 Jan 2004 18:48:36 -0000
@@ -20,7 +20,8 @@
     'column' => _("Other Options"),
     'label' => _("Display Options"),
     'desc' => _("Change your display options."),
-    'members' => array('listtype', 'showdefaultimages', 'imagesperrow', 'imagesperpage')
+    'members' => array('listtype', 'showdefaultimages', 'imagesperrow', 'imagesperpage', 'im_type',
+                       'watermark', 'showexif')
 );
 
 $prefGroups['gallery'] = array(
@@ -111,4 +112,30 @@
     'shared' => false,
     'type' => 'checkbox',
     'desc' => _("Automatically generate unique name for new galleries?")
+);
+
+$_prefs['im_type'] = array(
+    'value' => 'png',
+    'locked' => false,
+    'shared' => false,
+    'type' => 'enum',
+    'enum' => array('png' => _("PNG"),
+                    'jpeg' => _("JPEG")),
+    'desc' => _("Image format for converted images (thumbnail and screen resolutions)")
+);
+
+$_prefs['watermark'] = array(
+    'value' => '',
+    'locked' => false,
+    'shared' => false,
+    'type' => 'text',
+    'desc' => _("Watermark to use for images")
+);
+
+$_prefs['showexif'] = array(
+    'value' => 'true',
+    'locked' => false,
+    'shared' => false,
+    'type' => 'checkbox',
+    'desc' => _("Show EXIF data")
 );


More information about the ansel mailing list