Last change
on this file since 27342 was
27342,
checked in by JanisV, 10 years ago
|
Disable history update only in native full-screen mode
Hide thumbnails in full-screen mode, hide thumbnails in non full-screen mode
|
File size:
1.2 KB
|
Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); |
---|
4 | |
---|
5 | class Fotorama_maintain extends PluginMaintain |
---|
6 | { |
---|
7 | private $installed = false; |
---|
8 | |
---|
9 | private $default_conf = array( |
---|
10 | 'allowfullscreen' => 'native', |
---|
11 | 'fit' => 'scaledown', |
---|
12 | 'transition' => 'slide', |
---|
13 | 'shadows' => false, |
---|
14 | 'autoplay' => true, |
---|
15 | 'stopautoplayontouch' => false, |
---|
16 | 'loop' => true, |
---|
17 | 'nav' => 'false', |
---|
18 | 'fullscreen_nav' => 'false', |
---|
19 | ); |
---|
20 | |
---|
21 | function __construct($plugin_id) |
---|
22 | { |
---|
23 | parent::__construct($plugin_id); |
---|
24 | } |
---|
25 | |
---|
26 | function install($plugin_version, &$errors=array()) |
---|
27 | { |
---|
28 | global $conf; |
---|
29 | |
---|
30 | if (empty($conf['Fotorama'])) |
---|
31 | { |
---|
32 | $conf['Fotorama'] = serialize($this->default_conf); |
---|
33 | conf_update_param('Fotorama', $conf['Fotorama']); |
---|
34 | } |
---|
35 | else |
---|
36 | { |
---|
37 | $new_conf = is_string($conf['Fotorama']) ? unserialize($conf['Fotorama']) : $conf['Fotorama']; |
---|
38 | |
---|
39 | $conf['Fotorama'] = serialize($new_conf); |
---|
40 | conf_update_param('Fotorama', $conf['Fotorama']); |
---|
41 | } |
---|
42 | |
---|
43 | $this->installed = true; |
---|
44 | } |
---|
45 | |
---|
46 | function activate($plugin_version, &$errors=array()) |
---|
47 | { |
---|
48 | if (!$this->installed) |
---|
49 | { |
---|
50 | $this->install($plugin_version, $errors); |
---|
51 | } |
---|
52 | } |
---|
53 | |
---|
54 | function deactivate() |
---|
55 | { |
---|
56 | } |
---|
57 | |
---|
58 | function uninstall() |
---|
59 | { |
---|
60 | conf_delete_param('Fotorama'); |
---|
61 | } |
---|
62 | } |
---|
63 | |
---|
64 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.