source: extensions/Flash_Gallery/modules/ArtGallery/admin/config.inc.php @ 4311

Last change on this file since 4311 was 4311, checked in by tiico, 14 years ago

[Flash_Gallery] Update Artgallery module with sound compatibility

File size: 8.4 KB
Line 
1<?php
2
3// extended parameters for
4// ArtGallery module
5
6/*
7BUTTON
8fullScreenButton Show/hide “Full Screen” button. Possible values: true, false.
9navigationButtons Show/hide navigation buttons. Possible values: true,false.
10slideshowButton Show/hide slideshow button. Possible values: true,false.
11IMAGE
12align Image alignment. Possible values:left, right, top,bottom, center
13scaleMode Type of image scaling to the size of the visible area. Possible values: fit, crop, noScale
14cornerRadius Image corners roundness degree
15transitionEffect Type of image transition effect. Possible values: fade,zoom, pixel
16useShadow Show/hide shadow of image. Possible values: true, false
17THUMBNAIL
18width Thumbnail width
19height Thumbnail height
20cornerRadius Degree of thumbnail roundness. Possible values: [0,90]
21alpha Thumbnail transparency. Possible values: [0,100]
22outlineColor Thumbnail outline color. Possible values: [0x000000,0xFFFFFF]
23outlineColorOnRollOver Outline color of the thumbnail with the mouse pointer rolled over it. Possible values: [0x000000,0xFFFFFF]
24outlineColorOnClick Active thumbnail outline color. Possible values:[0x000000, 0xFFFFFF]
25useShadow Show/hide shadow of thumbnail. Possible values:true, false
26usePreview Show/hide image preview element. Possible values:true, false
27THUMBBAR
28position Thumbnail position. Possible values: left, right, top, bottom
29scrollSpeed Thumbnail scroll speed. Possible values: (0,infinity). Reasonable values: [5, 20]
30CAPTION
31position Position of image captions. Possible values: top, bottom
32bgAlpha Background transparency of captions. Possible values:[0,100]
33color Color of image captions. Possible values: [0x000000,0xFFFFFF]
34bgColor Background color of captions. Possible values:[0x000000, 0xFFFFFF]
35fontName Font of image captions.
36fontSize Font size of image captions. Possible values: FontSizes
37// Preloder
38alpha Preloader transparency. Possible values: [0,100]
39usePreloader Show/hide preloader. Possible values: true, false
40// Preview
41width Width of the image preview element
42height Height of the image preview element
43alpha Preview transparency. Possible values: [0,100]
44outlineColor Preview outline color. Possible values: [0x000000,0xFFFFFF]
45cornerRadius Degree of preview roundness. Possible values: [0, 90]
46useShadow Show/hide shadow of preview. Possible values: true,false
47// Slideshow
48start Enables/Disables slide show mode
49delay Image display duration in Slideshow mode (in seconds).
50Possible values: (0,infinity)
51loop Loop/unloop image display in automatic mode if all
52images are shown. Possible values: true, false
53stopAutoOnClick Possible values: true, false
54
55*/
56
57/*
58<buttons fullScreenButton="true" navigationButtons="true" slideshowButton="true" />
59<image align="center" cornerRadius="0" scaleMode="fill" transitionEffect="fade" useShadow="true"/>
60<thumbnail width="60" height="40" cornerRadius="0" alpha="70" outlineColor="0xFFFFFF" outlineColorOnRollOver="0xFFFFFF" outlineColorOnClick="0x8B0000" useShadow="true" usePreview="true"/>
61<thumbBar scrollSpeed="10" position="bottom"/>
62<preview  alpha="100" width="200" height="100" outlineColor="0xFFFFFF" useShadow="true" cornerRadius="0"/>
63<caption position="bottom" bgAlpha="30" color="0xFFFFFF" bgColor="0x000000" fontName="Verdana" fontSize="12"/>
64<slideshow start="false" delay="3" loop="true" stopAutoOnClick="true"/>
65<preloader alpha="100" usePreloader="true" />
66<sounds onRollOver="sounds/over.mp3" onClick="" />
67
68*/
69if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
70
71$Imagealign = array(  l10n('ArtG_left'), l10n('ArtG_right'), l10n('ArtG_top'), l10n('ArtG_bottom'), l10n('ArtG_center'));
72$ImagescaleMode = array( l10n('ArtG_fit'), l10n('ArtG_crop'), l10n('ArtG_noScale'));
73
74$ImagetransitionEffect = array( l10n('ArtG_fade'), l10n('ArtG_zoom'),  l10n('ArtG_pixel'));
75$Thumbbarposition = array( l10n('ArtG_left'), l10n('ArtG_right'), l10n('ArtG_top'), l10n('ArtG_bottom'));
76$Captionposition = array( l10n('ArtG_top'), l10n('ArtG_bottom'));
77
78// default values
79if (!isset($ext_datas)) $ext_datas = array(
80// Button
81'fullScreenButton'              => true,
82'navigationButtons'     => true,
83'slideshowButton'               => true,
84// Image
85'Imagealign'                                    => 5,
86'ImagescaleMode'                                => 1,
87'ImagecornerRadius'                     => '0',
88'ImagetransitionEffect'                 => 1,
89'ImageuseShadow'                        => true,
90// Thumbnail
91'Thumbnailwidth'                                => "60",
92'Thumbnailheight'                               => "40",
93'ThumbnailcornerRadius'                         => "0",
94'Thumbnailalpha'                                => "70",
95'ThumbnailoutlineColor'                         => "#FFFFFF",
96'ThumbnailoutlineColorOnRollOver' => "#FFFFFF",
97'ThumbnailoutlineColorOnClick'  => "#8B0000",
98'ThumbnailuseShadow'                    => true,
99'ThumbnailusePreview'                   => true,
100//Thumbbar
101'Thumbbarposition'                              => 4,
102'ThumbbarscrollSpeed'                   => "10",
103// Caption
104'Captionposition'                       => 2,
105'CaptionbgAlpha'                                => "30",
106'Captioncolor'                          => "#FFFFFF",
107'CaptionbgColor'                                => "#000000",
108'CaptionfontName'                               => "Verdana",
109'CaptionfontSize'                               => "12",
110// Preloader
111'Preloaderalpha'                                => "100",
112'PreloaderusePreloader'                         => true,
113// Preview
114'Previewwidth'                          => '100',
115'Previewheight'                                 => '200',
116'Previewalpha'                          => '100',
117'PreviewoutlineColor'                           => '#FFFFFF',
118'PreviewcornerRadius'                           => '0',
119'PreviewuseShadow'                              => true,
120//Slideshow
121'Slideshowstart'                                => false,
122'Slideshowdelay'                                => "3",
123'Slideshowloop'                                 => true,
124'SlideshowstopAutoOnClick'              => true,
125//Sound
126'SoundsonRollOver'              => "",
127'SoundonClick'                  => "",
128
129);
130
131// Enregistrement de la configuration
132if (isset($_POST['submit']) and !is_adviser())
133{
134
135        foreach ($ext_datas as $key =>$value)
136        {
137       
138                if ($key == "fullScreenButton" or $key == "navigationButtons" or $key == "slideshowButton" 
139                        or $key == "ImageuseShadow" or $key == "ThumbnailuseShadow" or $key == "ThumbnailusePreview"
140                        or $key == "PreloaderusePreloader" or $key == "PreviewuseShadow" or $key == "Slideshowstart" 
141                        or $key == "Slideshowloop" or $key == "SlideshowstopAutoOnClick")
142                        $ext_datas[$key] = isset($_POST['ArtG_'.$key]);
143                else
144                        $ext_datas[$key] = $_POST['ArtG_'.$key];
145        }
146}
147
148foreach ($ext_datas as $key => $value)
149{
150
151        if ($key == "fullScreenButton" or $key == "navigationButtons" or $key == "slideshowButton" 
152                or $key == "ImageuseShadow" or $key == "ThumbnailuseShadow" or $key == "ThumbnailusePreview"
153                or $key == "PreloaderusePreloader" or $key == "PreviewuseShadow" or $key == "Slideshowstart" 
154                or $key == "Slideshowloop" or $key == "SlideshowstopAutoOnClick")
155                $template->assign(array( 'ArtG_'.$key => (($ext_datas[$key]) ? 'checked="checked"': '')));
156               
157        elseif ($key == "Imagealign")
158        {
159                $i=1;
160                foreach ( $Imagealign as $order ) //on parcours le tableau
161                {
162                        $template->append('ArtG_Imagealign',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['Imagealign'] == $i ? 'selected' : '')));
163                        $i++;   
164                }
165        }
166        elseif ($key == "ImagescaleMode")
167        {
168                $i=1;
169                foreach ( $ImagescaleMode as $order ) //on parcours le tableau
170                {
171                        $template->append('ArtG_ImagescaleMode',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['ImagescaleMode'] == $i ? 'selected' : '')));
172                        $i++;   
173                }
174        }
175        elseif ($key == "ImagetransitionEffect")
176        {
177                $i=1;
178                foreach ( $ImagetransitionEffect as $order ) //on parcours le tableau
179                {
180                        $template->append('ArtG_ImagetransitionEffect',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['ImagetransitionEffect'] == $i ? 'selected' : '')));
181                        $i++;   
182                }
183        }
184        elseif ($key == "Thumbbarposition")
185        {
186                $i=1;
187                foreach ( $Thumbbarposition as $order ) //on parcours le tableau
188                {
189                        $template->append('ArtG_Thumbbarposition',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['Thumbbarposition'] == $i ? 'selected' : '')));
190                        $i++;   
191                }
192        }
193        elseif ($key == "Captionposition")
194        {
195                $i=1;
196                foreach ( $Captionposition as $order ) //on parcours le tableau
197                {
198                        $template->append('ArtG_Captionposition',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['Captionposition'] == $i ? 'selected' : '')));
199                        $i++;   
200                }
201        }
202        else
203                $template->assign(array( 'ArtG_'.$key => $ext_datas[$key]));
204
205}
206
207$template->assign(array('OTHERS_SCRIPT' =>
208                        '<script type="text/javascript" src="'.FLASHGAL_PATH.'farbtastic/farbtastic.js"></script>
209                        <link href="'.FLASHGAL_PATH.'farbtastic/farbtastic.css" rel="stylesheet" type="text/css"  />'));
210
211
212
213$template->set_filenames(array('module_options' => dirname(__FILE__) . '/config.tpl'));
214$template->assign_var_from_handle('MODULE_OPTIONS', 'module_options');
215
216?>
Note: See TracBrowser for help on using the repository browser.