[3531] | 1 | <?php |
---|
| 2 | |
---|
| 3 | // extended parameters for |
---|
| 4 | // ArtGallery module |
---|
| 5 | |
---|
| 6 | /* |
---|
| 7 | BUTTON |
---|
| 8 | fullScreenButton Show/hide Full Screen button. Possible values: true, false. |
---|
| 9 | navigationButtons Show/hide navigation buttons. Possible values: true,false. |
---|
| 10 | slideshowButton Show/hide slideshow button. Possible values: true,false. |
---|
| 11 | IMAGE |
---|
| 12 | align Image alignment. Possible values:left, right, top,bottom, center |
---|
| 13 | scaleMode Type of image scaling to the size of the visible area. Possible values: fit, crop, noScale |
---|
| 14 | cornerRadius Image corners roundness degree |
---|
| 15 | transitionEffect Type of image transition effect. Possible values: fade,zoom, pixel |
---|
| 16 | useShadow Show/hide shadow of image. Possible values: true, false |
---|
| 17 | THUMBNAIL |
---|
| 18 | width Thumbnail width |
---|
| 19 | height Thumbnail height |
---|
| 20 | cornerRadius Degree of thumbnail roundness. Possible values: [0,90] |
---|
| 21 | alpha Thumbnail transparency. Possible values: [0,100] |
---|
| 22 | outlineColor Thumbnail outline color. Possible values: [0x000000,0xFFFFFF] |
---|
| 23 | outlineColorOnRollOver Outline color of the thumbnail with the mouse pointer rolled over it. Possible values: [0x000000,0xFFFFFF] |
---|
| 24 | outlineColorOnClick Active thumbnail outline color. Possible values:[0x000000, 0xFFFFFF] |
---|
| 25 | useShadow Show/hide shadow of thumbnail. Possible values:true, false |
---|
| 26 | usePreview Show/hide image preview element. Possible values:true, false |
---|
| 27 | THUMBBAR |
---|
| 28 | position Thumbnail position. Possible values: left, right, top, bottom |
---|
| 29 | scrollSpeed Thumbnail scroll speed. Possible values: (0,infinity). Reasonable values: [5, 20] |
---|
| 30 | CAPTION |
---|
| 31 | position Position of image captions. Possible values: top, bottom |
---|
| 32 | bgAlpha Background transparency of captions. Possible values:[0,100] |
---|
| 33 | color Color of image captions. Possible values: [0x000000,0xFFFFFF] |
---|
| 34 | bgColor Background color of captions. Possible values:[0x000000, 0xFFFFFF] |
---|
| 35 | fontName Font of image captions. |
---|
| 36 | fontSize Font size of image captions. Possible values: FontSizes |
---|
| 37 | // Preloder |
---|
| 38 | alpha Preloader transparency. Possible values: [0,100] |
---|
| 39 | usePreloader Show/hide preloader. Possible values: true, false |
---|
| 40 | // Preview |
---|
| 41 | width Width of the image preview element |
---|
| 42 | height Height of the image preview element |
---|
| 43 | alpha Preview transparency. Possible values: [0,100] |
---|
| 44 | outlineColor Preview outline color. Possible values: [0x000000,0xFFFFFF] |
---|
| 45 | cornerRadius Degree of preview roundness. Possible values: [0, 90] |
---|
| 46 | useShadow Show/hide shadow of preview. Possible values: true,false |
---|
| 47 | // Slideshow |
---|
| 48 | start Enables/Disables slide show mode |
---|
| 49 | delay Image display duration in Slideshow mode (in seconds). |
---|
| 50 | Possible values: (0,infinity) |
---|
| 51 | loop Loop/unloop image display in automatic mode if all |
---|
| 52 | images are shown. Possible values: true, false |
---|
| 53 | stopAutoOnClick 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 | */ |
---|
| 69 | if (!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 |
---|
| 79 | if (!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 | |
---|
| 126 | |
---|
| 127 | ); |
---|
| 128 | |
---|
| 129 | // Enregistrement de la configuration |
---|
| 130 | if (isset($_POST['submit']) and !is_adviser()) |
---|
| 131 | { |
---|
| 132 | |
---|
| 133 | foreach ($ext_datas as $key =>$value) |
---|
| 134 | { |
---|
| 135 | |
---|
| 136 | if ($key == "fullScreenButton" or $key == "navigationButtons" or $key == "slideshowButton" |
---|
| 137 | or $key == "ImageuseShadow" or $key == "ThumbnailuseShadow" or $key == "ThumbnailusePreview" |
---|
| 138 | or $key == "PreloaderusePreloader" or $key == "PreviewuseShadow" or $key == "Slideshowstart" |
---|
| 139 | or $key == "Slideshowloop" or $key == "SlideshowstopAutoOnClick") |
---|
| 140 | $ext_datas[$key] = isset($_POST['ArtG_'.$key]); |
---|
| 141 | else |
---|
| 142 | $ext_datas[$key] = $_POST['ArtG_'.$key]; |
---|
| 143 | } |
---|
| 144 | } |
---|
| 145 | |
---|
| 146 | foreach ($ext_datas as $key => $value) |
---|
| 147 | { |
---|
| 148 | |
---|
| 149 | if ($key == "fullScreenButton" or $key == "navigationButtons" or $key == "slideshowButton" |
---|
| 150 | or $key == "ImageuseShadow" or $key == "ThumbnailuseShadow" or $key == "ThumbnailusePreview" |
---|
| 151 | or $key == "PreloaderusePreloader" or $key == "PreviewuseShadow" or $key == "Slideshowstart" |
---|
| 152 | or $key == "Slideshowloop" or $key == "SlideshowstopAutoOnClick") |
---|
| 153 | $template->assign(array( 'ArtG_'.$key => (($ext_datas[$key]) ? 'checked="checked"': ''))); |
---|
| 154 | |
---|
| 155 | elseif ($key == "Imagealign") |
---|
| 156 | { |
---|
| 157 | $i=1; |
---|
| 158 | foreach ( $Imagealign as $order ) //on parcours le tableau |
---|
| 159 | { |
---|
| 160 | $template->append('ArtG_Imagealign',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['Imagealign'] == $i ? 'selected' : ''))); |
---|
| 161 | $i++; |
---|
| 162 | } |
---|
| 163 | } |
---|
| 164 | elseif ($key == "ImagescaleMode") |
---|
| 165 | { |
---|
| 166 | $i=1; |
---|
| 167 | foreach ( $ImagescaleMode as $order ) //on parcours le tableau |
---|
| 168 | { |
---|
| 169 | $template->append('ArtG_ImagescaleMode',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['ImagescaleMode'] == $i ? 'selected' : ''))); |
---|
| 170 | $i++; |
---|
| 171 | } |
---|
| 172 | } |
---|
| 173 | elseif ($key == "ImagetransitionEffect") |
---|
| 174 | { |
---|
| 175 | $i=1; |
---|
| 176 | foreach ( $ImagetransitionEffect as $order ) //on parcours le tableau |
---|
| 177 | { |
---|
| 178 | $template->append('ArtG_ImagetransitionEffect',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['ImagetransitionEffect'] == $i ? 'selected' : ''))); |
---|
| 179 | $i++; |
---|
| 180 | } |
---|
| 181 | } |
---|
| 182 | elseif ($key == "Thumbbarposition") |
---|
| 183 | { |
---|
| 184 | $i=1; |
---|
| 185 | foreach ( $Thumbbarposition as $order ) //on parcours le tableau |
---|
| 186 | { |
---|
| 187 | $template->append('ArtG_Thumbbarposition',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['Thumbbarposition'] == $i ? 'selected' : ''))); |
---|
| 188 | $i++; |
---|
| 189 | } |
---|
| 190 | } |
---|
| 191 | elseif ($key == "Captionposition") |
---|
| 192 | { |
---|
| 193 | $i=1; |
---|
| 194 | foreach ( $Captionposition as $order ) //on parcours le tableau |
---|
| 195 | { |
---|
| 196 | $template->append('ArtG_Captionposition',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['Captionposition'] == $i ? 'selected' : ''))); |
---|
| 197 | $i++; |
---|
| 198 | } |
---|
| 199 | } |
---|
| 200 | else |
---|
| 201 | $template->assign(array( 'ArtG_'.$key => $ext_datas[$key])); |
---|
| 202 | |
---|
| 203 | } |
---|
| 204 | |
---|
| 205 | $template->assign(array('OTHERS_SCRIPT' => |
---|
| 206 | '<script type="text/javascript" src="'.FLASHGAL_PATH.'farbtastic/farbtastic.js"></script> |
---|
| 207 | <link href="'.FLASHGAL_PATH.'farbtastic/farbtastic.css" rel="stylesheet" type="text/css" />')); |
---|
| 208 | |
---|
| 209 | |
---|
| 210 | |
---|
| 211 | $template->set_filenames(array('module_options' => dirname(__FILE__) . '/config.tpl')); |
---|
| 212 | $template->assign_var_from_handle('MODULE_OPTIONS', 'module_options'); |
---|
| 213 | |
---|
| 214 | ?> |
---|