source: extensions/Flash_Gallery/modules/PostCardViewer/admin/config.inc.php @ 3531

Revision 3531, 2.6 KB checked in by tiico, 11 years ago (diff)

First revision (for testing)
Only in French (translation to be done)

Line 
1<?php
2
3// extended parameters for
4// simpleviewer module
5
6/*
7Option Name     Default Value   Description
8cellDimension   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.
9columns         4       Number of columns of images. Rows are calculated automatically from the number of images in the gallery.
10zoomOutPerc     15      The amout of scale when zoomed out (percentage).
11zoomInPerc      100     The amout of scale when zoomed in (percentage).
12frameWidth      20      Width of image frame (pixels).
13frameColor      0xFFFFFF        Color of image frame (hexidecimal color value).
14captionColor    0xFFFFFF        Color of captions (hexidecimal color value).
15enableRightClickOpen    true    Whether to display the "Open Image in New Window..." right-click menu option.
16
17HTML Options
18langOpenImage   "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.
19langAbout       "About"         The text displayed for the right-click 'About' menu option. Can be used to translate PostcardViewer into a non-English language.
20*/
21
22if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
23
24
25// default values
26if (!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
43if (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
55foreach ($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?>
Note: See TracBrowser for help on using the repository browser.