1 | <?php |
---|
2 | |
---|
3 | // extended parameters for |
---|
4 | // simpleviewer module |
---|
5 | |
---|
6 | /* |
---|
7 | Option Name Default Value Description |
---|
8 | cellDimension 800 The size of the square 'cell' that contains each image (pixels). Make this at least as big as your biggest image to avoid the images overlapping. |
---|
9 | columns 4 Number of columns of images. Rows are calculated automatically from the number of images in the gallery. |
---|
10 | zoomOutPerc 15 The amout of scale when zoomed out (percentage). |
---|
11 | zoomInPerc 100 The amout of scale when zoomed in (percentage). |
---|
12 | frameWidth 20 Width of image frame (pixels). |
---|
13 | frameColor 0xFFFFFF Color of image frame (hexidecimal color value). |
---|
14 | captionColor 0xFFFFFF Color of captions (hexidecimal color value). |
---|
15 | enableRightClickOpen true Whether to display the "Open Image in New Window..." right-click menu option. |
---|
16 | |
---|
17 | HTML Options |
---|
18 | 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 PostcardViewer into a non-English language. |
---|
19 | langAbout "About" The text displayed for the right-click 'About' menu option. Can be used to translate PostcardViewer into a non-English language. |
---|
20 | */ |
---|
21 | |
---|
22 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
23 | |
---|
24 | |
---|
25 | // default values |
---|
26 | if (!isset($ext_datas)) |
---|
27 | $ext_datas = array( |
---|
28 | 'cellDimension' => "800", |
---|
29 | 'columns' => "4", |
---|
30 | 'zoomOutPerc' => "15", |
---|
31 | 'zoomInPerc' => "100", |
---|
32 | 'frameWidth' => "20", |
---|
33 | 'frameColor' => "#FFFFFF", |
---|
34 | 'captionColor' => "#FFFFFF", |
---|
35 | 'enableRightClickOpen' => true, |
---|
36 | 'langOpenImage' => "Open Image in New Window", |
---|
37 | 'langAbout' => "About" |
---|
38 | ); |
---|
39 | |
---|
40 | |
---|
41 | |
---|
42 | // Enregistrement de la configuration |
---|
43 | if (isset($_POST['submit']) and !is_adviser()) |
---|
44 | { |
---|
45 | |
---|
46 | foreach ($ext_datas as $key =>$value) |
---|
47 | { |
---|
48 | if ($key == "enableRightClickOpen") |
---|
49 | $ext_datas[$key] = isset($_POST['PV_'.$key]); |
---|
50 | else |
---|
51 | $ext_datas[$key] = $_POST['PV_'.$key]; |
---|
52 | } |
---|
53 | } |
---|
54 | |
---|
55 | foreach ($ext_datas as $key => $value) |
---|
56 | { |
---|
57 | |
---|
58 | if ($key == "enableRightClickOpen") |
---|
59 | $template->assign(array( 'PV_'.$key => (isset($ext_datas[$key]) ? 'checked="checked"': ''))); |
---|
60 | else |
---|
61 | $template->assign(array( 'PV_'.$key => $ext_datas[$key])); |
---|
62 | |
---|
63 | } |
---|
64 | |
---|
65 | $template->assign(array('OTHERS_SCRIPT' => |
---|
66 | '<script type="text/javascript" src="'.FLASHGAL_PATH.'farbtastic/farbtastic.js"></script> |
---|
67 | <link href="'.FLASHGAL_PATH.'farbtastic/farbtastic.css" rel="stylesheet" type="text/css" />')); |
---|
68 | |
---|
69 | $template->set_filenames(array('module_options' => dirname(__FILE__) . '/config.tpl')); |
---|
70 | $template->assign_var_from_handle('MODULE_OPTIONS', 'module_options'); |
---|
71 | |
---|
72 | ?> |
---|