1 | <?php |
---|
2 | # -- BEGIN LICENSE BLOCK ---------------------------------- |
---|
3 | # |
---|
4 | # This file is part of ColorBox, a plugin for Dotclear 2. |
---|
5 | # |
---|
6 | # Copyright (c) 2010 Philippe aka amalgame and Tomtom |
---|
7 | # Licensed under the GPL version 2.0 license. |
---|
8 | # See LICENSE file or |
---|
9 | # http://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
---|
10 | # |
---|
11 | # -- END LICENSE BLOCK ------------------------------------ |
---|
12 | |
---|
13 | if (!defined('DC_CONTEXT_ADMIN')) { exit; } |
---|
14 | |
---|
15 | $m_version = $core->plugins->moduleInfo('colorbox','version'); |
---|
16 | |
---|
17 | $i_version = $core->getVersion('colorbox'); |
---|
18 | |
---|
19 | if (version_compare($i_version,$m_version,'>=')) { |
---|
20 | return; |
---|
21 | } |
---|
22 | |
---|
23 | # Settings |
---|
24 | $core->blog->settings->addNamespace('colorbox'); |
---|
25 | $s =& $core->blog->settings->colorbox; |
---|
26 | |
---|
27 | $opts = array( |
---|
28 | 'transition' => 'elastic', |
---|
29 | 'speed' => '350', |
---|
30 | 'title' => '', |
---|
31 | 'width' => '', |
---|
32 | 'height' => '', |
---|
33 | 'innerWidth' => '', |
---|
34 | 'innerHeight' => '', |
---|
35 | 'initialWidth' => '300', |
---|
36 | 'initialHeight' => '100', |
---|
37 | 'maxWidth' => '', |
---|
38 | 'maxHeight' => '', |
---|
39 | 'scalePhotos' => true, |
---|
40 | 'scrolling' => true, |
---|
41 | 'iframe' => false, |
---|
42 | 'opacity' => '0.85', |
---|
43 | 'open' => false, |
---|
44 | 'preloading' => true, |
---|
45 | 'overlayClose' => true, |
---|
46 | 'loop' => true, |
---|
47 | 'slideshow' => false, |
---|
48 | 'slideshowSpeed' => '2500', |
---|
49 | 'slideshowAuto' => false, |
---|
50 | 'slideshowStart' => __('Start slideshow'), |
---|
51 | 'slideshowStop' => __('Stop slideshow'), |
---|
52 | 'current' => __('{current} of {total}'), |
---|
53 | 'previous' => __('previous'), |
---|
54 | 'next' => __('next'), |
---|
55 | 'close' => __('close'), |
---|
56 | 'onOpen' => '', |
---|
57 | 'onLoad' => '', |
---|
58 | 'onComplete' => '', |
---|
59 | 'onCleanup' => '', |
---|
60 | 'onClosed' => '' |
---|
61 | ); |
---|
62 | |
---|
63 | $s->put('colorbox_enabled',false,'boolean','Enable ColorBox plugin',false,true); |
---|
64 | $s->put('colorbox_theme','3','integer','ColorBox theme',false,true); |
---|
65 | $s->put('colorbox_zoom_icon',false,'boolean','Enable ColorBox zoom icon',false,true); |
---|
66 | $s->put('colorbox_zoom_icon_permanent',false,'boolean','Enable permanent ColorBox zoom icon',false,true); |
---|
67 | $s->put('colorbox_position',false,'boolean','ColorBox zoom icon position',false,true); |
---|
68 | $s->put('colorbox_user_files','public','boolean','ColorBox user files',false,true); |
---|
69 | $s->put('colorbox_selectors','','string','ColorBox selectors',false,true); |
---|
70 | $s->put('colorbox_advanced',serialize($opts),'string','ColorBox advanced options',false,true); |
---|
71 | |
---|
72 | $core->setVersion('colorbox',$m_version); |
---|
73 | |
---|
74 | return true; |
---|
75 | |
---|
76 | ?> |
---|