1 | <?php |
---|
2 | |
---|
3 | // extended parameters for |
---|
4 | // simpleviewer module |
---|
5 | |
---|
6 | /* |
---|
7 | global basic_property |
---|
8 | html_title="Title" |
---|
9 | loadStyle="Pie" |
---|
10 | hideAdobeMenu="false" |
---|
11 | photoDynamicShow="false" |
---|
12 | enableURL="true" |
---|
13 | startAutoPlay="true" |
---|
14 | screenfullButton="true"/> |
---|
15 | global description_property |
---|
16 | backgroundColor="0xc0c0c0" |
---|
17 | backgroundAlpha="30" |
---|
18 | cssText="a:link{text-decoration: underline;} a:hover{color:#ff0000; text-decoration: none;} a:active{color:#0000ff;text-decoration: none;} .blue {color:#0000ff; font-size:15px; font-style:italic; text-decoration: underline;} .body{color:#ff5500;font-size:20px;}" |
---|
19 | align="bottom"/> |
---|
20 | global background_property |
---|
21 | backgroundColor="0x000000" |
---|
22 | mode="tile"/> |
---|
23 | photo basic_property |
---|
24 | PhotoMaxWidth="650" |
---|
25 | PhotoMaxHeight="500" |
---|
26 | photoborder="4" |
---|
27 | photoBackColor="0xfffbf0" |
---|
28 | Enableoutsideborder="false" |
---|
29 | outsidebordercolor="0xc0c0c0" |
---|
30 | photoButtonColor="0xfffbf0" |
---|
31 | photoSpacing="7" |
---|
32 | photoborder="6" |
---|
33 | rowcount="3" |
---|
34 | columncount="3" |
---|
35 | EnablephotoTitle="true" |
---|
36 | photoTitleColor="0xfffbf0" |
---|
37 | Enablephotorotation="true |
---|
38 | |
---|
39 | */ |
---|
40 | |
---|
41 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
42 | |
---|
43 | $pagedirection = array( l10n('StackG_right'), l10n('StackG_left') ); |
---|
44 | |
---|
45 | |
---|
46 | // default values |
---|
47 | if (!isset($ext_datas)) |
---|
48 | $ext_datas = array( |
---|
49 | 'html_title' => "Title" , |
---|
50 | // 'loadStyle' => "Pie", |
---|
51 | 'photoDynamicShow' => false , |
---|
52 | 'enableURL' => true, |
---|
53 | 'startAutoPlay' => true, |
---|
54 | //global description_property |
---|
55 | 'DbackgroundColor' => "#c0c0c0", |
---|
56 | 'backgroundAlpha' => "30", |
---|
57 | // 'align' => "bottom", |
---|
58 | //global background_property |
---|
59 | 'BbackgroundColor' => "#000000", |
---|
60 | // 'mode' => "tile", |
---|
61 | //photo basic_property |
---|
62 | 'PhotoMaxWidth' => "650", |
---|
63 | 'PhotoMaxHeight' => "500", |
---|
64 | 'photoborder' => "4", |
---|
65 | 'photoBackColor' => "#fffbf0", |
---|
66 | 'EnablephotoTitle' => true, |
---|
67 | 'photolineColor' => "0x808080" , |
---|
68 | 'photoButtonColor' => "0xfffbf0", |
---|
69 | 'photoTitleColor' => "#fffbf0", |
---|
70 | 'pagedirection' => 1, //"right", |
---|
71 | 'rotationangle' => "10" , |
---|
72 | 'pageSpeed' => "4", |
---|
73 | 'waitTime' => "3" |
---|
74 | ); |
---|
75 | |
---|
76 | |
---|
77 | |
---|
78 | // Enregistrement de la configuration |
---|
79 | if (isset($_POST['submit']) and !is_adviser()) |
---|
80 | { |
---|
81 | |
---|
82 | foreach ($ext_datas as $key =>$value) |
---|
83 | { |
---|
84 | if ($key == "photoDynamicShow" OR $key == "enableURL" OR $key == "startAutoPlay" |
---|
85 | OR $key == "Enableoutsideborder" OR $key == "EnablephotoTitle" |
---|
86 | OR $key == "Enablephotorotation") |
---|
87 | $ext_datas[$key] = isset($_POST['StackG_'.$key]); |
---|
88 | else |
---|
89 | $ext_datas[$key] = $_POST['StackG_'.$key]; |
---|
90 | } |
---|
91 | } |
---|
92 | |
---|
93 | foreach ($ext_datas as $key => $value) |
---|
94 | { |
---|
95 | |
---|
96 | if ($key == "photoDynamicShow" OR $key == "enableURL" OR $key == "startAutoPlay" |
---|
97 | OR $key == "screenfullButton" OR $key == "Enableoutsideborder" OR $key == "EnablephotoTitle" |
---|
98 | OR $key == "Enablephotorotation") |
---|
99 | $template->assign(array( 'StackG_'.$key => ($ext_datas[$key] ? 'checked="checked"': ''))); |
---|
100 | elseif ($key == "pagedirection") |
---|
101 | { |
---|
102 | $i=1; |
---|
103 | foreach ( $pagedirection as $order ) //on parcours le tableau |
---|
104 | { |
---|
105 | $template->append('StackG_pagedirection',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['pagedirection'] == $i ? 'selected' : ''))); |
---|
106 | $i++; |
---|
107 | } |
---|
108 | } |
---|
109 | else |
---|
110 | $template->assign(array( 'StackG_'.$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 | ?> |
---|