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

Revision 3531, 2.1 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// Autoviewer module
5
6/*
7Option Name     Default Value   Description
8frameColor      0xFFFFFF        Color of image frame (hexidecimal color value e.g "0xff00ff").
9frameWidth      10      Width of image frame in pixels.
10imagePadding    20      Distance between images in pixels.
11displayTime     6       Number of seconds each image will display in auto-play mode.
12enableRightClickOpen    true    Whether to display the "Open Image in New Window..." right-click menu option.
13
14HTML Options
15langOpenImage   "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.
16langAbout       "About"         The text displayed for the right-click 'About' menu option. Can be used to translate AutoViewer into a non-English language.*/
17
18if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
19
20
21// default values
22if (!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
36if (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
48foreach ($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?>
Note: See TracBrowser for help on using the repository browser.