1 | <?php |
---|
2 | |
---|
3 | // extended parameters for |
---|
4 | // Caroussel module |
---|
5 | |
---|
6 | /* |
---|
7 | <background>#000000</background> <!-- #RRGGBB, transparent --> |
---|
8 | <friction>20</friction> <!-- [1,100] --> |
---|
9 | <fullscreen>true</fullscreen> <!-- true, false --> |
---|
10 | <fieldOfView>55</fieldOfView> <!-- [1,179] --> |
---|
11 | |
---|
12 | <margins> |
---|
13 | <top>0</top> <!-- [-1000,1000] pixels --> |
---|
14 | <left>0</left> <!-- [-1000,1000] pixels --> |
---|
15 | <bottom>0</bottom> <!-- [-1000,1000] pixels --> |
---|
16 | <right>0</right> <!-- [-1000,1000] pixels --> |
---|
17 | </margins> |
---|
18 | |
---|
19 | <interaction> |
---|
20 | <flip>keyboard</fmip> <!-- auto, mouse, keyboard --> |
---|
21 | <vertical>true</vertical> <!-- true, false --> |
---|
22 | <speed>15</speed> <!-- [-360,360] degrees per second --> |
---|
23 | |
---|
24 | <default_speed>15</default_speed> <!-- [-360,360] degrees per second --> |
---|
25 | <reset_delay>30</reset_delay> <!-- [0,600] seconds, 0 means never reset --> |
---|
26 | </interaction> |
---|
27 | |
---|
28 | |
---|
29 | <reflection> |
---|
30 | <amount>100</amount> <!-- [0,1000] pixels --> |
---|
31 | <blur>2</blur> <!-- [0,100] blur amount --> |
---|
32 | <distance>0</distance> <!-- [-1000,1000] pixels --> |
---|
33 | <alpha>50%</alpha> <!-- [0,100] percentage --> |
---|
34 | </reflection> |
---|
35 | |
---|
36 | <titles> |
---|
37 | <style>font_size: 12px; font-family: Verdana, _serif; color: #FFCC66;</style> |
---|
38 | <position>above right</position> <!-- [above, below] [left,center,right]--> |
---|
39 | |
---|
40 | <scale9>14 14 14 14</scale9> <!-- [0,1000] pixels --> |
---|
41 | <padding>8 12 8 12</padding> <!-- [-1000,1000] pixels --> |
---|
42 | </titles> |
---|
43 | </options> |
---|
44 | |
---|
45 | */ |
---|
46 | |
---|
47 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
48 | |
---|
49 | $flip = array( l10n('3DFlip_auto'), l10n('3DFlip_mouse'), l10n('3DFlip_keyboard')); |
---|
50 | |
---|
51 | // default values |
---|
52 | if (!isset($ext_datas)) $ext_datas = array( |
---|
53 | 'background' => "#000000", |
---|
54 | 'friction' => "20", |
---|
55 | 'fullscreen' => true, |
---|
56 | 'fieldOfView' => "55", |
---|
57 | |
---|
58 | //<margins> |
---|
59 | 'top' => "0", |
---|
60 | 'left' => "0", |
---|
61 | 'bottom' => "0", |
---|
62 | 'right' => "0", |
---|
63 | //</margins> |
---|
64 | |
---|
65 | //<interaction> |
---|
66 | 'flip' => 2, //mouse |
---|
67 | 'vertical' => false, |
---|
68 | 'speed' => "15", |
---|
69 | 'default_speed' => "15", |
---|
70 | 'reset_delay' => "30", |
---|
71 | //</interaction> |
---|
72 | |
---|
73 | //<reflection> |
---|
74 | 'amountRef' => "100", |
---|
75 | 'blurRef' => "2", |
---|
76 | 'distance' => "0", |
---|
77 | 'alpha' => "50", |
---|
78 | //</reflection> |
---|
79 | |
---|
80 | ); |
---|
81 | |
---|
82 | // Enregistrement de la configuration |
---|
83 | if (isset($_POST['submit']) and !is_adviser()) |
---|
84 | { |
---|
85 | |
---|
86 | foreach ($ext_datas as $key =>$value) |
---|
87 | { |
---|
88 | |
---|
89 | if ($key == "fullscreen" or $key == "vertical") |
---|
90 | $ext_datas[$key] = isset($_POST['3DFlip_'.$key]); |
---|
91 | else |
---|
92 | $ext_datas[$key] = $_POST['3DFlip_'.$key]; |
---|
93 | } |
---|
94 | } |
---|
95 | |
---|
96 | foreach ($ext_datas as $key => $value) |
---|
97 | { |
---|
98 | |
---|
99 | if ($key == "fullscreen") |
---|
100 | $template->assign(array( '3DFlip_'.$key => (($ext_datas[$key]) ? 'checked="checked"': ''))); |
---|
101 | |
---|
102 | elseif ($key == "flip") |
---|
103 | { |
---|
104 | $i=1; |
---|
105 | foreach ( $flip as $order ) //on parcours le tableau |
---|
106 | { |
---|
107 | $template->append('3DFlip_flip',array('ID' => $i,'NAME' => $order,'SELECTED' => ($ext_datas['flip'] == $i ? 'selected' : ''))); |
---|
108 | $i++; |
---|
109 | } |
---|
110 | } |
---|
111 | else |
---|
112 | $template->assign(array( '3DFlip_'.$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 | |
---|
121 | |
---|
122 | $template->set_filenames(array('module_options' => dirname(__FILE__) . '/config.tpl')); |
---|
123 | $template->assign_var_from_handle('MODULE_OPTIONS', 'module_options'); |
---|
124 | |
---|
125 | ?> |
---|