Standardize on ImageGenerator names, fix mini thumbnail display on owner group view.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 16 Sep 2010 16:03:56 +0000 (12:03 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 16 Sep 2010 16:03:56 +0000 (12:03 -0400)
To allow for easier theming, ImageGenerator classes for thumbnails are now named as:

  Ansel_ImageGenerator_{type}Thumb

and if there is a matching stack generator, it should be named as:

  Ansel_ImageGenerator_{type}ThumbStack

other types of generators, such as the screen, and mini generators, are named as before:

  Ansel_ImageGenerator_Screen, Ansel_ImageGenerator_Mini etc...

16 files changed:
ansel/img/mini.php
ansel/lib/Gallery.php
ansel/lib/ImageGenerator/PlainStack.php [deleted file]
ansel/lib/ImageGenerator/PolaroidStack.php [deleted file]
ansel/lib/ImageGenerator/PolaroidThumbStack.php [new file with mode: 0644]
ansel/lib/ImageGenerator/PrettyThumb.php [deleted file]
ansel/lib/ImageGenerator/RoundedStack.php [deleted file]
ansel/lib/ImageGenerator/RoundedThumb.php [new file with mode: 0644]
ansel/lib/ImageGenerator/RoundedThumbStack.php [new file with mode: 0644]
ansel/lib/ImageGenerator/ShadowSharpThumb.php [deleted file]
ansel/lib/ImageGenerator/ShadowThumb.php [new file with mode: 0644]
ansel/lib/ImageGenerator/ShadowThumbStack.php [new file with mode: 0644]
ansel/lib/Style.php
ansel/lib/View/GalleryProperties.php
ansel/templates/gallery/partial/_styles.html.php
ansel/templates/group/owner.inc

index 38dbd2e..a74a41b 100644 (file)
@@ -32,4 +32,4 @@ if ($conf['vfs']['src'] == 'sendfile') {
     header('X-Sendfile: ' . $filename);
     exit;
 }
-$image->display('mini');
+$image->display('mini', Ansel::getStyleDefinition('ansel_default'));
index 0d39221..2190adb 100644 (file)
@@ -51,6 +51,16 @@ class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical
         }
     }
 
+    public function get($property)
+    {
+        $value = parent::get($property);
+        if ($property == 'style') {
+            $value = unserialize($value);
+        }
+
+        return $value;
+    }
+
     /**
      * Check for special capabilities of this gallery.
      *
@@ -590,8 +600,8 @@ class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical
             $style = $this->getStyle();
         }
 
-        if ($style->default_galleryimage_type != 'plain') {
-            $thumbstyle = $style->default_galleryimage_type;
+        if ($style->keyimage_type != 'Thumb') {
+            $thumbstyle = $style->keyimage_type;
             $styleHash = $style->getHash($thumbstyle);
 
             /* First check for the existence of a key image in the specified style */
@@ -609,7 +619,7 @@ class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical
             //@TODO: Look at passing style both in params and the property...
             $params = array('gallery' => $this, 'style' => $style);
             try {
-                $iview = Ansel_ImageGenerator::factory($style->default_galleryimage_type, $params);
+                $iview = Ansel_ImageGenerator::factory($style->keyimage_type, $params);
                 $img = $iview->create();
 
                 // Note the gallery_id is negative for generated stacks
@@ -628,7 +638,7 @@ class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical
                 // Might not support the requested style...try ansel_default
                 // but protect against infinite recursion.
                 Horde::logMessage($e->getMessage(), 'DEBUG');
-                if ($style->default_galleryimage_type != 'plain') {
+                if ($style->keyimage_type != 'plain') {
                     return $this->getKeyImage(Ansel::getStyleDefinition('ansel_default'));
                 }
             }
@@ -895,6 +905,11 @@ class Ansel_Gallery extends Horde_Share_Object_Sql_Hierarchical
             $this->_setModeHelper($mode);
         }
 
+        /* Need to serialize the style object */
+        if ($driver_key == 'attribute_style') {
+            $value = serialize($value);
+        }
+
         $this->data[$driver_key] = $value;
 
         /* Update the backend, but only this current change */
diff --git a/ansel/lib/ImageGenerator/PlainStack.php b/ansel/lib/ImageGenerator/PlainStack.php
deleted file mode 100644 (file)
index 85d750e..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-/**
- * ImageGenerator to create the gallery image stacks.
- *
- * @author Michael J. Rubinsky <mrubinsk@horde.org>
- * @package Ansel
- */
-class Ansel_ImageGenerator_PlainStack extends Ansel_ImageGenerator
-{
-    public $need = array('PhotoStack');
-
-    /**
-     *
-     * @return Horde_Image
-     */
-    protected function _create()
-    {
-        $imgobjs = $this->_getStackImages();
-        $style = $this->_params['style'];
-        $params = array('width' => 100,
-                        'height' => 100,
-                        'background' => $style->background);
-
-        $baseImg = Ansel::getImageObject($params);
-        try {
-            $baseImg->addEffect(
-                'PhotoStack',
-                array('images' => $imgobjs,
-                      'resize_height' => $GLOBALS['conf']['thumbnail']['height'],
-                      'padding' => 0,
-                      'background' => $style->background,
-                      'type' => 'plain'));
-
-            $baseImg->applyEffects();
-            $baseImg->resize($GLOBALS['conf']['thumbnail']['width'],
-                             $GLOBALS['conf']['thumbnail']['height']);
-        } catch (Horde_Image_Exception $e) {
-            throw new Ansel_Exception($e);
-        }
-
-        return $baseImg;
-    }
-
-}
diff --git a/ansel/lib/ImageGenerator/PolaroidStack.php b/ansel/lib/ImageGenerator/PolaroidStack.php
deleted file mode 100644 (file)
index 62507fc..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-/**
- * ImageGenerator to create the gallery polaroid stacks.
- *
- * @author Michael J. Rubinsky <mrubinsk@horde.org>
- * @package Ansel
- */
-class Ansel_ImageGenerator_PolaroidStack extends Ansel_ImageGenerator
-{
-    public $need = array('PhotoStack');
-
-    /**
-     *
-     * @return Horde_Image
-     */
-    protected function _create()
-    {
-        $imgobjs = $this->_getStackImages();
-        $style = $this->_params['style'];
-        $params = array('width' => 100,
-                        'height' => 100,
-                        'background' => $style->background);
-
-        $baseImg = Ansel::getImageObject($params);
-        try {
-            $baseImg->addEffect(
-                'PhotoStack',
-                array('images' => $imgobjs,
-                      'resize_height' => $GLOBALS['conf']['thumbnail']['height'],
-                      'padding' => 10,
-                      'background' => $style->background,
-                      'type' => 'polaroid'));
-            $baseImg->applyEffects();
-            $baseImg->resize($GLOBALS['conf']['thumbnail']['width'],
-                             $GLOBALS['conf']['thumbnail']['height']);
-
-        } catch (Horde_Image_Exception $e) {
-            throw new Ansel_Exception($e);
-        }
-
-        return $baseImg;
-    }
-
-}
diff --git a/ansel/lib/ImageGenerator/PolaroidThumbStack.php b/ansel/lib/ImageGenerator/PolaroidThumbStack.php
new file mode 100644 (file)
index 0000000..be29947
--- /dev/null
@@ -0,0 +1,44 @@
+<?php
+/**
+ * ImageGenerator to create the gallery polaroid stacks.
+ *
+ * @author Michael J. Rubinsky <mrubinsk@horde.org>
+ * @package Ansel
+ */
+class Ansel_ImageGenerator_PolaroidThumbStack extends Ansel_ImageGenerator
+{
+    public $need = array('PhotoStack');
+
+    /**
+     *
+     * @return Horde_Image
+     */
+    protected function _create()
+    {
+        $imgobjs = $this->_getStackImages();
+        $style = $this->_params['style'];
+        $params = array('width' => 100,
+                        'height' => 100,
+                        'background' => $style->background);
+
+        $baseImg = Ansel::getImageObject($params);
+        try {
+            $baseImg->addEffect(
+                'PhotoStack',
+                array('images' => $imgobjs,
+                      'resize_height' => $GLOBALS['conf']['thumbnail']['height'],
+                      'padding' => 10,
+                      'background' => $style->background,
+                      'type' => 'polaroid'));
+            $baseImg->applyEffects();
+            $baseImg->resize($GLOBALS['conf']['thumbnail']['width'],
+                             $GLOBALS['conf']['thumbnail']['height']);
+
+        } catch (Horde_Image_Exception $e) {
+            throw new Ansel_Exception($e);
+        }
+
+        return $baseImg;
+    }
+
+}
diff --git a/ansel/lib/ImageGenerator/PrettyThumb.php b/ansel/lib/ImageGenerator/PrettyThumb.php
deleted file mode 100644 (file)
index f7de83a..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-/**
- * ImageGenerator to create the prettythumb view (rounded, shadowed thumbnails).
- *
- * @author Michael J. Rubinsky <mrubinsk@horde.org>
- * @package Ansel
- */
-class Ansel_ImageGenerator_PrettyThumb extends Ansel_ImageGenerator
-{
-    public $need = array('RoundCorners', 'DropShadow');
-
-    /**
-     *
-     * @return Horde_Image
-     */
-    protected function _create()
-    {
-        $this->_image->resize(min($GLOBALS['conf']['thumbnail']['width'], $this->_dimensions['width']),
-                              min($GLOBALS['conf']['thumbnail']['height'], $this->_dimensions['height']),
-                              true);
-
-        /* Don't bother with these effects for a stack image
-         * (which will have a negative gallery_id). */
-        if ($this->_image->gallery > 0) {
-            if (is_null($this->_style)) {
-                $gal = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getGallery($this->_image->gallery);
-                $styleDef = $gal->getStyle();
-            } else {
-                $styleDef = $this->_style;
-            }
-
-            try {
-                /* Apply the effects - continue on error, but be sure to log */
-                $this->_image->addEffect('RoundCorners', array('border' => 2,
-                                                               'bordercolor' => '#333'));
-
-                $this->_image->addEffect('DropShadow', array('background' => $styleDef->background,
-                                                             'padding' => 5,
-                                                             'distance' => 5,
-                                                             'fade' => 3));
-                if ($GLOBALS['conf']['thumbnail']['unsharp'] && Ansel::isAvailable('Unsharpmask')) {
-                    $this->_image->addEffect('Unsharpmask',
-                                             array('radius' => $GLOBALS['conf']['thumbnail']['radius'],
-                                                   'threshold' => $GLOBALS['conf']['thumbnail']['threshold'],
-                                                   'amount' => $GLOBALS['conf']['thumbnail']['amount']));
-                }
-
-                $this->_image->applyEffects();
-            } catch (Horde_Image_Exception $e) {
-                throw new Ansel_Exception($e);
-            }
-
-            return $this->_image->getHordeImage();
-        }
-    }
-
-}
diff --git a/ansel/lib/ImageGenerator/RoundedStack.php b/ansel/lib/ImageGenerator/RoundedStack.php
deleted file mode 100644 (file)
index a79bd24..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
- <?php
-/**
- * ImageGenerator to create the gallery image stacks.
- *
- * @author Michael J. Rubinsky <mrubinsk@horde.org>
- * @package Ansel
- *
- */
-class Ansel_ImageGenerator_RoundedStack extends Ansel_ImageGenerator
- {
-    public $need = array('PhotoStack');
-
-    /**
-     *
-     * @return Horde_Image
-     */
-    protected function _create()
-    {
-        $imgobjs = $this->_getStackImages();
-        $style = $this->_params['style'];
-        $params = array('width' => 100,
-                        'height' => 100,
-                        'background' => $style->background);
-
-        $baseImg = Ansel::getImageObject($params);
-
-        try {
-            $baseImg->addEffect(
-                'PhotoStack',
-                array('images' => $imgobjs,
-                      'resize_height' => $GLOBALS['conf']['thumbnail']['height'],
-                      'padding' => 0,
-                      'background' => $style->background,
-                      'type' => 'rounded'));
-
-            $baseImg->applyEffects();
-            $baseImg->resize($GLOBALS['conf']['thumbnail']['width'],
-                             $GLOBALS['conf']['thumbnail']['height']);
-        } catch (Horde_Image_Exception $e) {
-            throw new Ansel_Exception($e);
-        }
-
-        return $baseImg;
-    }
-
-}
diff --git a/ansel/lib/ImageGenerator/RoundedThumb.php b/ansel/lib/ImageGenerator/RoundedThumb.php
new file mode 100644 (file)
index 0000000..72f08ab
--- /dev/null
@@ -0,0 +1,57 @@
+<?php
+/**
+ * ImageGenerator to create the prettythumb view (rounded, shadowed thumbnails).
+ *
+ * @author Michael J. Rubinsky <mrubinsk@horde.org>
+ * @package Ansel
+ */
+class Ansel_ImageGenerator_RoundedThumb extends Ansel_ImageGenerator
+{
+    public $need = array('RoundCorners', 'DropShadow');
+
+    /**
+     *
+     * @return Horde_Image
+     */
+    protected function _create()
+    {
+        $this->_image->resize(min($GLOBALS['conf']['thumbnail']['width'], $this->_dimensions['width']),
+                              min($GLOBALS['conf']['thumbnail']['height'], $this->_dimensions['height']),
+                              true);
+
+        /* Don't bother with these effects for a stack image
+         * (which will have a negative gallery_id). */
+        if ($this->_image->gallery > 0) {
+            if (is_null($this->_style)) {
+                $gal = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getGallery($this->_image->gallery);
+                $styleDef = $gal->getStyle();
+            } else {
+                $styleDef = $this->_style;
+            }
+
+            try {
+                /* Apply the effects - continue on error, but be sure to log */
+                $this->_image->addEffect('RoundCorners', array('border' => 2,
+                                                               'bordercolor' => '#333'));
+
+                $this->_image->addEffect('DropShadow', array('background' => $styleDef->background,
+                                                             'padding' => 5,
+                                                             'distance' => 5,
+                                                             'fade' => 3));
+                if ($GLOBALS['conf']['thumbnail']['unsharp'] && Ansel::isAvailable('Unsharpmask')) {
+                    $this->_image->addEffect('Unsharpmask',
+                                             array('radius' => $GLOBALS['conf']['thumbnail']['radius'],
+                                                   'threshold' => $GLOBALS['conf']['thumbnail']['threshold'],
+                                                   'amount' => $GLOBALS['conf']['thumbnail']['amount']));
+                }
+
+                $this->_image->applyEffects();
+            } catch (Horde_Image_Exception $e) {
+                throw new Ansel_Exception($e);
+            }
+
+            return $this->_image->getHordeImage();
+        }
+    }
+
+}
diff --git a/ansel/lib/ImageGenerator/RoundedThumbStack.php b/ansel/lib/ImageGenerator/RoundedThumbStack.php
new file mode 100644 (file)
index 0000000..df5483f
--- /dev/null
@@ -0,0 +1,46 @@
+ <?php
+/**
+ * ImageGenerator to create the gallery image stacks.
+ *
+ * @author Michael J. Rubinsky <mrubinsk@horde.org>
+ * @package Ansel
+ *
+ */
+class Ansel_ImageGenerator_RoundedThumbStack extends Ansel_ImageGenerator
+ {
+    public $need = array('PhotoStack');
+
+    /**
+     *
+     * @return Horde_Image
+     */
+    protected function _create()
+    {
+        $imgobjs = $this->_getStackImages();
+        $style = $this->_params['style'];
+        $params = array('width' => 100,
+                        'height' => 100,
+                        'background' => $style->background);
+
+        $baseImg = Ansel::getImageObject($params);
+
+        try {
+            $baseImg->addEffect(
+                'PhotoStack',
+                array('images' => $imgobjs,
+                      'resize_height' => $GLOBALS['conf']['thumbnail']['height'],
+                      'padding' => 0,
+                      'background' => $style->background,
+                      'type' => 'rounded'));
+
+            $baseImg->applyEffects();
+            $baseImg->resize($GLOBALS['conf']['thumbnail']['width'],
+                             $GLOBALS['conf']['thumbnail']['height']);
+        } catch (Horde_Image_Exception $e) {
+            throw new Ansel_Exception($e);
+        }
+
+        return $baseImg;
+    }
+
+}
diff --git a/ansel/lib/ImageGenerator/ShadowSharpThumb.php b/ansel/lib/ImageGenerator/ShadowSharpThumb.php
deleted file mode 100644 (file)
index bc065d8..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-/**
- * ImageGenerator to create the shadowsharpthumb view (sharp corners, shadowed)
- *
- * @author Michael J. Rubinsky <mrubinsk@horde.org>
- * @package Ansel
- */
-class Ansel_ImageGenerator_ShadowSharpThumb extends Ansel_ImageGenerator
-{
-    public $need = array('DropShadow');
-
-    /**
-     *
-     * @return boolean
-     */
-    protected function _create()
-    {
-        $this->_image->resize(min($GLOBALS['conf']['thumbnail']['width'], $this->_dimensions['width']),
-                              min($GLOBALS['conf']['thumbnail']['height'], $this->_dimensions['height']),
-                              true);
-
-        /* Don't bother with these effects for a stack image
-         * (which will have a negative gallery_id). */
-        if ($this->_image->gallery > 0) {
-            if (is_null($this->_style)) {
-                $gal = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getGallery($this->_image->gallery);
-                $styleDef = $gal->getStyle();
-            } else {
-                $styleDef = $this->_style;
-            }
-
-            try {
-                $this->_image->addEffect('Border', array('bordercolor' => '#333', 'borderwidth' => 1));
-                $this->_image->addEffect('DropShadow',
-                                         array('background' => $styleDef->background,
-                                               'padding' => 5,
-                                               'distance' => 8,
-                                               'fade' => 2));
-
-                if ($GLOBALS['conf']['thumbnail']['unsharp'] && Ansel::isAvailable('Unsharpmask')) {
-                    $this->_image->addEffect('Unsharpmask',
-                                             array('radius' => $GLOBALS['conf']['thumbnail']['radius'],
-                                                   'threshold' => $GLOBALS['conf']['thumbnail']['threshold'],
-                                                   'amount' => $GLOBALS['conf']['thumbnail']['amount']));
-                    $this->_image->applyEffects();
-                }
-
-                $this->_image->applyEffects();
-            } catch (Horde_Image_Exception $e) {
-                throw new Ansel_Exception($e);
-            }
-
-            return $this->_image->getHordeImage();
-        }
-    }
-
-}
diff --git a/ansel/lib/ImageGenerator/ShadowThumb.php b/ansel/lib/ImageGenerator/ShadowThumb.php
new file mode 100644 (file)
index 0000000..98ce8ab
--- /dev/null
@@ -0,0 +1,57 @@
+<?php
+/**
+ * ImageGenerator to create the shadowsharpthumb view (sharp corners, shadowed)
+ *
+ * @author Michael J. Rubinsky <mrubinsk@horde.org>
+ * @package Ansel
+ */
+class Ansel_ImageGenerator_ShadowThumb extends Ansel_ImageGenerator
+{
+    public $need = array('DropShadow');
+
+    /**
+     *
+     * @return boolean
+     */
+    protected function _create()
+    {
+        $this->_image->resize(min($GLOBALS['conf']['thumbnail']['width'], $this->_dimensions['width']),
+                              min($GLOBALS['conf']['thumbnail']['height'], $this->_dimensions['height']),
+                              true);
+
+        /* Don't bother with these effects for a stack image
+         * (which will have a negative gallery_id). */
+        if ($this->_image->gallery > 0) {
+            if (is_null($this->_style)) {
+                $gal = $GLOBALS['injector']->getInstance('Ansel_Storage')->getScope()->getGallery($this->_image->gallery);
+                $styleDef = $gal->getStyle();
+            } else {
+                $styleDef = $this->_style;
+            }
+
+            try {
+                $this->_image->addEffect('Border', array('bordercolor' => '#333', 'borderwidth' => 1));
+                $this->_image->addEffect('DropShadow',
+                                         array('background' => $styleDef->background,
+                                               'padding' => 5,
+                                               'distance' => 8,
+                                               'fade' => 2));
+
+                if ($GLOBALS['conf']['thumbnail']['unsharp'] && Ansel::isAvailable('Unsharpmask')) {
+                    $this->_image->addEffect('Unsharpmask',
+                                             array('radius' => $GLOBALS['conf']['thumbnail']['radius'],
+                                                   'threshold' => $GLOBALS['conf']['thumbnail']['threshold'],
+                                                   'amount' => $GLOBALS['conf']['thumbnail']['amount']));
+                    $this->_image->applyEffects();
+                }
+
+                $this->_image->applyEffects();
+            } catch (Horde_Image_Exception $e) {
+                throw new Ansel_Exception($e);
+            }
+
+            return $this->_image->getHordeImage();
+        }
+    }
+
+}
diff --git a/ansel/lib/ImageGenerator/ShadowThumbStack.php b/ansel/lib/ImageGenerator/ShadowThumbStack.php
new file mode 100644 (file)
index 0000000..0aa148b
--- /dev/null
@@ -0,0 +1,44 @@
+<?php
+/**
+ * ImageGenerator to create the gallery image stacks.
+ *
+ * @author Michael J. Rubinsky <mrubinsk@horde.org>
+ * @package Ansel
+ */
+class Ansel_ImageGenerator_ShadowThumbStack extends Ansel_ImageGenerator
+{
+    public $need = array('PhotoStack');
+
+    /**
+     *
+     * @return Horde_Image
+     */
+    protected function _create()
+    {
+        $imgobjs = $this->_getStackImages();
+        $style = $this->_params['style'];
+        $params = array('width' => 100,
+                        'height' => 100,
+                        'background' => $style->background);
+
+        $baseImg = Ansel::getImageObject($params);
+        try {
+            $baseImg->addEffect(
+                'PhotoStack',
+                array('images' => $imgobjs,
+                      'resize_height' => $GLOBALS['conf']['thumbnail']['height'],
+                      'padding' => 0,
+                      'background' => $style->background,
+                      'type' => 'plain'));
+
+            $baseImg->applyEffects();
+            $baseImg->resize($GLOBALS['conf']['thumbnail']['width'],
+                             $GLOBALS['conf']['thumbnail']['height']);
+        } catch (Horde_Image_Exception $e) {
+            throw new Ansel_Exception($e);
+        }
+
+        return $baseImg;
+    }
+
+}
index e4e7912..162aceb 100644 (file)
@@ -22,7 +22,6 @@ class Ansel_Style
     public function __construct($properties)
     {
         $this->_properties = array_merge(array('gallery_view' => 'Gallery',
-                                               'default_galleryimage_type' => 'plain',
                                                'background' => 'none'),
                                         $properties);
     }
@@ -50,6 +49,16 @@ class Ansel_Style
 
     public function &__get($property)
     {
+        if ($property == 'keyimage_type') {
+            // Force the same type of effect for key image/stacks if available
+            $class = $this->_properties['thumbstyle'] . 'Stack';
+            if (!class_exists('Ansel_ImageGenerator_' . $class)) {
+                $class = 'Thumb';
+            }
+
+            return $class;
+        }
+
         return $this->_properties[$property];
     }
 
index 2d8504b..d75bbec 100644 (file)
@@ -236,7 +236,6 @@ class Ansel_View_GalleryProperties
         // Style
         $style = new Ansel_Style(array(
             'thumbstyle' => Horde_Util::getFormData('thumbnail_style'),
-            'default_galleryimage_type' => 'PlainStack',//Horde_Util::getFormData('keyimage_type'),
             'background' => Horde_Util::getFormData('background_color'),
             // temporary hack
             'widgets' => array('Actions' => array(),
index c622240..17161eb 100644 (file)
@@ -3,12 +3,23 @@
    <td>
     <select name="thumbnail_style">
       <option value="Thumb" selected="selected">Basic Thumbnails</option>
-      <option value="ShadowSharpThumb">Drop Shadows</option>
-      <option value="PrettyThumb">Rounded Corners</option>
+      <option value="ShadowThumb">Drop Shadows</option>
+      <option value="RoundedThumb">Rounded Corners</option>
       <option value="PolaroidThumb">Polaroids</option>
     </select>
    </td>
   </tr>
+<!--  <tr>
+   <td align="right" valign="top"><strong><?php echo _("Key Image Style"); ?></string></td>
+   <td>
+    <select name="keyimage_type">
+     <option value="Thumb">Basic Thumbnail</option>
+     <option value="PlainStack">Photo Stack</option>
+     <option value-="RoundedStack">Rounded Stack</option>
+     <option value="PolaroidStack">Polaroid Stack</option>
+    </select>
+   </td>
+  </tr>-->
   <tr>
    <td align="right" valign="top"><strong><?php echo _("Backgrond Color"); ?></string></td>
    <td>
index 27ae8e4..6dc8b88 100644 (file)
@@ -50,7 +50,7 @@ $mini_galleries = array_values($mini_galleries);
 <?php for ($i = 0; $i < count($mini_galleries); ++$i): ?>
    <td align="center">
     <?php if ($mini_galleries[$i]->isOldEnough() && !$mini_galleries[$i]->hasPasswd()): ?>
-     <?php echo $link ?><img src="<?php echo Ansel::getImageUrl($mini_galleries[$i]->getKeyImage(), 'mini', false) ?>" alt="<?php echo $owner_title?>" /></a>
+     <?php echo $link ?><img src="<?php echo Ansel::getImageUrl($mini_galleries[$i]->getKeyImage(Ansel::getStyleDefinition('ansel_default')), 'mini', false) ?>" alt="<?php echo $owner_title?>" /></a>
     <?php else: ?>
       <?php echo $link . Horde::img('gallery-locked-mini.png') ?></a>
     <?php endif; ?>