source: extensions/Flash_Gallery/modules/JWImageRotator/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: 5.5 KB
Line 
1<?php
2
3// extended parameters for
4// simpleviewer module
5
6/*
7Basics
8   'height'  =>'320', Sets the overall height of the rotator.
9   'width'  =>'260', Sets the overall width of the rotator.
10Appearance
11   'backcolor'  =>'0xFFFFFF', Backgroundcolor of the controls, in HEX format.
12   'frontcolor'  =>'0x000000', Texts & buttons color of the controls, in HEX format.
13   'lightcolor'  =>'0x000000', Rollover color of the controls, in HEX format.
14   'logo'  =>'undefined', Set this to an image that can be put as a watermark logo in the top right corner of the display. Transparent PNG files give the best results'  =>'example).
15   'overstretch'  =>'false', Sets how to stretch images to make them fit the display. The default stretches to fit the display. Set this to true to stretch them proportionally to fill the display, fit to stretch them disproportionally and none to keep original dimensions.
16   'screencolor'  =>'0x000000', Color of the display area, in HEX format. With the rotator, change this to your HTML page's color make images of different sizes blend nicely.
17   'showicons'  =>'true', Set this to false to hide the activity icon and play button in the middle of the display.
18   'shownavigation'  =>'true', Set this to false to completely hide the navigation bar.
19   'transition'  =>'random', Sets the transition to use between images. The default, random, randomly pick a transition. To restrict to a certain transition, use these values: fade, bgfade, blocks, bubbles, circles, flash, fluids, lines or slowfade.
20   'usefullscreen'  =>'true', Set this to false to hide the fullscreen button and disable fullscreen.
21Behaviour
22   'audio'  =>'undefined', Assigns an additional, synchronized MP3. Use this for background music.
23   'linkfromdisplay'  =>'false', Set this to true to make a click on the display result in a jump to the webpage assigned to the link playlist metadata.
24   'linktarget'  =>'_self', Set this to the frame you want hyperlinks to open in. Set it to _blank to open links in a new window or _top to open in the top frame.
25   'repeat'  =>'false', Set this to true to automatically repeat playback of all images. Set this to list to playback an entire playlist once.
26   'rotatetime'  =>'5', Sets the duration in seconds an image is shown before transitioning again.
27   'shuffle'  =>'false),Set this to true to playback the images in random order.
28   'volume'  =>'80', sets the startup volume of the MP3 background music.
29*/
30
31if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
32
33$transition = array( l10n('JWIR_random_label'), l10n('JWIR_fade_label'), l10n('JWIR_bgfade_label'), l10n('JWIR_blocks_label'), l10n('JWIR_bubbles_label'), l10n('JWIR_circles_label'), l10n('JWIR_flash_label'), l10n('JWIR_fluids_label'), l10n('JWIR_lines_label'), l10n('JWIR_slowfade_label'));
34$overstretch = array( l10n('JWIR_false_label'), l10n('JWIR_true_label'), l10n('JWIR_fit_label'));
35$linktarget = array( '_self', '_blank');
36
37// default values
38if      (!isset($ext_datas)) 
39        $ext_datas = array(
40   'height'                     => '320', 
41   'width'                      => '260', 
42   'backcolor'                  => '#FFFFFF', 
43   'frontcolor'                 => '#000000', 
44   'lightcolor'                 => '#000000', 
45//   'logo'                             => 'undefined',
46   'overstretch'                => 1, //false,
47   'screencolor'                => '#000000', 
48   'showicons'                  => true,
49   'shownavigation'     => true,
50   'transition'                 => 1, //'random',
51   'usefullscreen'      => true,
52   'linkfromdisplay'    => false,
53   'linktarget'                 => 2, //'_blank',
54   'repeat'                     => false,
55   'rotatetime'                 => '5',
56   'shuffle'                    => false
57);
58
59
60               
61// Enregistrement de la configuration
62if (isset($_POST['submit']) and !is_adviser())
63{
64
65        foreach ($ext_datas as $key =>$value)
66        {
67                if ($key == "overstretch" or $key == "showicons" OR $key == "shownavigation" OR $key == "usefullscreen" 
68                        OR $key == "linkfromdisplay" OR $key == "repeat" OR $key == "shuffle")
69                        $ext_datas[$key] = isset($_POST['JWIR_'.$key]);
70                else
71                        $ext_datas[$key] = $_POST['JWIR_'.$key];
72        }
73}
74
75foreach ($ext_datas as $key => $value)
76{
77
78        if ($key == "showicons" OR $key == "shownavigation" OR $key == "usefullscreen" 
79                OR $key == "linkfromdisplay" OR $key == "repeat" OR $key == "shuffle")
80                $template->assign(array( 'JWIR_'.$key => ($ext_datas[$key] ? 'checked="checked"': '')));
81        elseif ($key == "transition")
82        {
83                $i=1;
84                foreach ( $transition as $order ) //on parcours le tableau
85                {
86                        $template->append('JWIR_transition',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['transition'] == $i ? 'selected' : '')));
87                        $i++;   
88                }
89        }
90        elseif ($key == "linktarget")
91        {
92                $i=1;
93                foreach ( $linktarget as $order ) //on parcours le tableau
94                {
95                        $template->append('JWIR_linktarget',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['linktarget'] == $i ? 'selected' : '')));
96                        $i++;   
97                }
98        }
99        elseif ($key == "overstretch")
100        {
101                $i=1;
102                foreach ( $overstretch as $order ) //on parcours le tableau
103                {
104                        $template->append('JWIR_overstretch',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['overstretch'] == $i ? 'selected' : '')));
105                        $i++;   
106                }
107        }
108       
109        else
110                $template->assign(array( 'JWIR_'.$key => $ext_datas[$key]));
111
112}
113
114$template->assign(array('OTHERS_SCRIPT' =>
115                        '<script type="text/javascript" src="'.FLASHGAL_PATH.'farbtastic/farbtastic.js"></script>
116                        <link href="'.FLASHGAL_PATH.'farbtastic/farbtastic.css" rel="stylesheet" type="text/css"  />'));
117
118$template->set_filenames(array('module_options' => dirname(__FILE__) . '/config.tpl'));
119$template->assign_var_from_handle('MODULE_OPTIONS', 'module_options');
120
121?>
Note: See TracBrowser for help on using the repository browser.