1 | <?php |
---|
2 | |
---|
3 | // extended parameters for |
---|
4 | // Autoviewer module |
---|
5 | |
---|
6 | /* |
---|
7 | Option Name Default Value Description |
---|
8 | frameColor 0xFFFFFF Color of image frame (hexidecimal color value e.g "0xff00ff"). |
---|
9 | frameWidth 10 Width of image frame in pixels. |
---|
10 | imagePadding 20 Distance between images in pixels. |
---|
11 | displayTime 6 Number of seconds each image will display in auto-play mode. |
---|
12 | enableRightClickOpen true Whether to display the "Open Image in New Window..." right-click menu option. |
---|
13 | |
---|
14 | HTML Options |
---|
15 | langOpenImage "Open Image in New Window" The text displayed for the right-click 'Open Image in New Window' menu option. Can be used to translate AutoViewer into a non-English language. |
---|
16 | langAbout "About" The text displayed for the right-click 'About' menu option. Can be used to translate AutoViewer into a non-English language.*/ |
---|
17 | |
---|
18 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
19 | |
---|
20 | |
---|
21 | // default values |
---|
22 | if (!isset($ext_datas)) |
---|
23 | $ext_datas = array( |
---|
24 | 'frameColor' => "#FFFFFF", |
---|
25 | 'frameWidth' => "10", |
---|
26 | 'imagePadding' => "20", |
---|
27 | 'displayTime' => "6", |
---|
28 | 'enableRightClickOpen' => true, |
---|
29 | 'langOpenImage' => "Open Image in New Window", |
---|
30 | 'langAbout' => "About" |
---|
31 | ); |
---|
32 | |
---|
33 | |
---|
34 | |
---|
35 | // Enregistrement de la configuration |
---|
36 | if (isset($_POST['submit']) and !is_adviser()) |
---|
37 | { |
---|
38 | |
---|
39 | foreach ($ext_datas as $key =>$value) |
---|
40 | { |
---|
41 | if ($key == "enableRightClickOpen") |
---|
42 | $ext_datas[$key] = isset($_POST['AV_'.$key]); |
---|
43 | else |
---|
44 | $ext_datas[$key] = $_POST['AV_'.$key]; |
---|
45 | } |
---|
46 | } |
---|
47 | |
---|
48 | foreach ($ext_datas as $key => $value) |
---|
49 | { |
---|
50 | |
---|
51 | if ($key == "enableRightClickOpen") |
---|
52 | $template->assign(array( 'AV_'.$key => ($ext_datas[$key] ? 'checked="checked"': ''))); |
---|
53 | else |
---|
54 | $template->assign(array( 'AV_'.$key => $ext_datas[$key])); |
---|
55 | |
---|
56 | } |
---|
57 | |
---|
58 | $template->assign(array('OTHERS_SCRIPT' => |
---|
59 | '<script type="text/javascript" src="'.FLASHGAL_PATH.'farbtastic/farbtastic.js"></script> |
---|
60 | <link href="'.FLASHGAL_PATH.'farbtastic/farbtastic.css" rel="stylesheet" type="text/css" />')); |
---|
61 | |
---|
62 | $template->set_filenames(array('module_options' => dirname(__FILE__) . '/config.tpl')); |
---|
63 | $template->assign_var_from_handle('MODULE_OPTIONS', 'module_options'); |
---|
64 | |
---|
65 | ?> |
---|