source: extensions/Flash_Gallery/modules/PhotoFlowGallery/admin/config.inc.php @ 3531

Last change on this file since 3531 was 3531, checked in by tiico, 15 years ago

First revision (for testing)
Only in French (translation to be done)

File size: 2.9 KB
RevLine 
[3531]1<?php
2
3// extended parameters for
4// simpleviewer module
5
6/*
7imageAngle
8Angle of images. Possible values: Number(0-90). Default: 30.
9useScrollBar Show/hide scroll bar. Possible values: Boolean(true/false). Default: true.
10useHighlight highlights images on mouseover Possible values: Boolean(true/false). Default: true.
11slideShow Slideshow mode on/off. Possible values: Boolean(true/false). Default: false.
12slideShowDelay Image display duration in Slideshow mode (in seconds). Possible values: Number(0-infinity). Default: 2.
13flipDuration Flip duration (in seconds). Possible values: Number(0-infinity). Default: 1.
14flipSound Flip sound. Possible values: String. Default: “”.
15colorScheme Color scheme. Possible values: String(white/black/grey/red/green/blue/custom). Default: white.
16startPosition The initial position of the gallery. Possible values: String(left, center, right).Default: center.
17reflectionAlpha Reflection transparency. Possible values: Number(0-100). Default: 80
18*/
19
20if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
21
22$colorScheme = array( l10n('PFG_white'), l10n('PFG_black'), l10n('PFG_grey'), l10n('PFG_red'), l10n('PFG_green'), l10n('PFG_blue'), l10n('PFG_custom') );
23$startPosition = array( l10n('PFG_left'), l10n('PFG_center'), l10n('PFG_right') );
24
25// default values
26if (!isset($ext_datas)) $ext_datas = array(
27        'imageAngle'    => "30",
28        'useScrollBar'  => true,
29        'useHighlight'  => true,
30        'slideShow'     => false,
31        'slideShowDelay' => "2",
32        'flipDuration'  => "1",
33        'colorScheme'   => 1,
34        'startPosition' => 2,
35        'reflectionAlpha' => "80"
36);
37
38if (isset($_POST['submit']) and !is_adviser())
39{
40
41        foreach ($ext_datas as $key =>$value)
42        {
43       
44                if ($key == "useScrollBar" or $key == "useHighlight" or $key == "slideShow") 
45                        $ext_datas[$key] = isset($_POST['PFG_'.$key]);
46                else
47                        $ext_datas[$key] = $_POST['PFG_'.$key];
48        }
49}
50
51foreach ($ext_datas as $key => $value)
52{
53
54        if ($key == "useScrollBar" or $key == "useHighlight" or $key == "slideShow") 
55                $template->assign(array( 'PFG_'.$key => (($ext_datas[$key]) ? 'checked="checked"': '')));
56               
57        elseif ($key == "colorScheme")
58        {
59                $i=1;
60                foreach ( $colorScheme as $order ) //on parcours le tableau
61                {
62                        $template->append('PFG_colorScheme',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['colorScheme'] == $i ? 'selected' : '')));
63                        $i++;   
64                }
65        }
66        elseif ($key == "startPosition")
67        {
68                $i=1;
69                foreach ( $startPosition as $order ) //on parcours le tableau
70                {
71                        $template->append('PFG_startPosition',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['startPosition'] == $i ? 'selected' : '')));
72                        $i++;   
73                }
74        }
75        else
76                $template->assign(array( 'PFG_'.$key => $ext_datas[$key]));
77
78}
79
80
81
82$template->set_filenames(array('module_options' => dirname(__FILE__) . '/config.tpl'));
83$template->assign_var_from_handle('MODULE_OPTIONS', 'module_options');
84
85?>
Note: See TracBrowser for help on using the repository browser.