File: styles.php

package info (click to toggle)
php-horde-ansel 3.0.10%2Bdebian1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,020 kB
  • sloc: php: 15,720; xml: 1,994; javascript: 1,784; makefile: 37; sh: 3
file content (113 lines) | stat: -rw-r--r-- 3,903 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
/**
 * Predefined gallery styles.  These are used to select a predefined set of
 * styles on the gallery's property page. Style may then be tweaked by the
 * gallery owner. The 'name' attribute is the name of they style that should be
 * used if requesting an explicit style to overide the gallery's existing style
 * when rendering via the API.
 *
 * IMPORTANT: DO NOT EDIT THIS FILE!
 * Local overrides MUST be placed in styles.local.php or styles.d/.
 * If the 'vhosts' setting has been enabled in Horde's configuration, you can
 * use styles-servername.php.
 *
 * Each entry *must* have:
 * <pre>
 * 'name'        =  The internal name of the style (this should match the
 *                  hash key).
 *
 * 'title'       =  This is the title to be displayed to the users.
 *
 * 'thumbstyle'  =  This is the type of thumbnail to use. This must match
 *                  an available Ansel_ImageGenerator object.
 *
 * 'background'  =  The desired background color of the style. This will
 *                  set the background of both the photo display area inside
 *                  of Ansel as well as the background color of any generated
 *                  photos. This is useful for installations not using PNG.
 *
 * The following are optional:
 *
 * gallery_view               =  The Ansel_View_GalleryRenderer to use for
 *                               gallery rendering. [Gallery]
 *
 * widgets                    =  An array describing any Ansel_Widgets to
 *                               display on this gallery along with any
 *                               parameters the widget may need.
 * </pre>
 */

// Just a time saver...
$widgets = array('Actions' => array(),
                 'Tags' => array('view' => 'gallery'),
                 'OtherGalleries' => array(),
                 'Geotag' => array(),
                 'Links' => array(),
                 'GalleryFaces' => array(),
                 'OwnerFaces' => array());


$styles['ansel_default'] = array(
    'name' => 'ansel_default',
    'title' => _("Default"),
    'thumbstyle' => 'Thumb',
    'background' => 'none',
    'widgets' => $widgets,
);

$styles['ansel_prettythumbs'] = array(
    'name' => 'ansel_prettythumbs',
    'title' => _("Rounded Thumbnails (No Background)"),
    'thumbstyle' => 'RoundedThumb',
    'background' => 'none',
    'widgets' => $widgets,
);

$styles['ansel_blackonwhite'] = array(
    'name' => 'ansel_blackonwhite',
    'title' => _("Rounded Thumbnails (White Background)"),
    'thumbstyle' => 'RoundedThumb',
    'background' => 'white',
    'widgets' => $widgets,
);

$styles['ansel_sharpshadowed'] = array(
    'name' => 'ansel_sharpshadowed',
    'title' => _("Shadowed Thumbnails (White Background)"),
    'thumbstyle' => 'ShadowThumb',
    'background' => 'white',
    'widgets' => $widgets
);

/* Polaroid style thumbnails and stacks */
$styles['ansel_polaroid'] = array(
    'name' => 'ansel_polaroid',
    'title' => _("Polaroid Style Thumbnails (White Background)"),
    'thumbstyle' => 'PolaroidThumb',
    'background' => 'white',
    'widgets' => $widgets,
);

/* Simple styles with no Ansel_Widgets useful for rendering  on external sites
 * via the API. Note that some require PNG support, but fallback to ansel_simple
 * if no PNG support is found. You could also create your own simple style with
 * no PNG support required and an appropriate background color for your site
 * indicated */
$styles['ansel_simple'] = array(
    'name' => 'ansel_simple',
    'title' => _("Simple"),
    'thumbstyle' => 'Thumb',
    'background' => 'none'
);

/* Style for specifying mobile specific views. Ansel looks for this
 * style when rendering on a mobile device.
 */
$styles['ansel_mobile'] = array(
    'name' => 'ansel_mobile',
    'title' => _("Mobile View"),
    'thumbstyle' => 'SquareThumb',
    'background' => 'none',
    'width' => 75,
    'height' => 75,
);