source: extensions/Flash_Gallery/modules/JWImageRotator/admin/config.inc.php @ 4312

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

[Flash_Gallery] bug 1230 : Update JWImageRotator module with autostart option

File size: 5.7 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   'autostart' => false, set to tre to autostart the slideshow
30*/
31
32if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
33
34$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'));
35$overstretch = array( l10n('JWIR_false_label'), l10n('JWIR_true_label'), l10n('JWIR_fit_label'));
36$linktarget = array( '_self', '_blank');
37
38// default values
39if      (!isset($ext_datas)) 
40        $ext_datas = array(
41   'height'                     => '320', 
42   'width'                      => '260', 
43   'backcolor'                  => '#FFFFFF', 
44   'frontcolor'                 => '#000000', 
45   'lightcolor'                 => '#000000', 
46//   'logo'                             => 'undefined',
47   'overstretch'                => 1, //false,
48   'screencolor'                => '#000000', 
49   'showicons'                  => true,
50   'shownavigation'     => true,
51   'transition'                 => 1, //'random',
52   'usefullscreen'      => true,
53   'linkfromdisplay'    => false,
54   'linktarget'                 => 2, //'_blank',
55   'repeat'                     => false,
56   'rotatetime'                 => '5',
57   'shuffle'                    => false,
58   'autostart'          => false
59);
60
61
62               
63// Enregistrement de la configuration
64if (isset($_POST['submit']) and !is_adviser())
65{
66
67        foreach ($ext_datas as $key =>$value)
68        {
69                if ($key == "overstretch" or $key == "showicons" OR $key == "shownavigation" OR $key == "usefullscreen" 
70                        OR $key == "linkfromdisplay" OR $key == "repeat" OR $key == "shuffle" OR $key == "autostart")
71                        $ext_datas[$key] = isset($_POST['JWIR_'.$key]);
72                else
73                        $ext_datas[$key] = $_POST['JWIR_'.$key];
74        }
75}
76
77foreach ($ext_datas as $key => $value)
78{
79
80        if ($key == "showicons" OR $key == "shownavigation" OR $key == "usefullscreen" 
81                OR $key == "linkfromdisplay" OR $key == "repeat" OR $key == "shuffle" OR $key == "autostart")
82                $template->assign(array( 'JWIR_'.$key => ($ext_datas[$key] ? 'checked="checked"': '')));
83        elseif ($key == "transition")
84        {
85                $i=1;
86                foreach ( $transition as $order ) //on parcours le tableau
87                {
88                        $template->append('JWIR_transition',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['transition'] == $i ? 'selected' : '')));
89                        $i++;   
90                }
91        }
92        elseif ($key == "linktarget")
93        {
94                $i=1;
95                foreach ( $linktarget as $order ) //on parcours le tableau
96                {
97                        $template->append('JWIR_linktarget',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['linktarget'] == $i ? 'selected' : '')));
98                        $i++;   
99                }
100        }
101        elseif ($key == "overstretch")
102        {
103                $i=1;
104                foreach ( $overstretch as $order ) //on parcours le tableau
105                {
106                        $template->append('JWIR_overstretch',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['overstretch'] == $i ? 'selected' : '')));
107                        $i++;   
108                }
109        }
110       
111        else
112                $template->assign(array( 'JWIR_'.$key => $ext_datas[$key]));
113
114}
115
116$template->assign(array('OTHERS_SCRIPT' =>
117                        '<script type="text/javascript" src="'.FLASHGAL_PATH.'farbtastic/farbtastic.js"></script>
118                        <link href="'.FLASHGAL_PATH.'farbtastic/farbtastic.css" rel="stylesheet" type="text/css"  />'));
119
120$template->set_filenames(array('module_options' => dirname(__FILE__) . '/config.tpl'));
121$template->assign_var_from_handle('MODULE_OPTIONS', 'module_options');
122
123?>
Note: See TracBrowser for help on using the repository browser.