source: extensions/stripped/admin/upgrade.inc.php @ 17961

Last change on this file since 17961 was 17961, checked in by Zaphod, 12 years ago

version 2.3.0

File size: 3.3 KB
Line 
1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4
5global $prefixeTable, $conf, $stripped;
6
7if (!isset($conf['stripped']))
8{
9    $config = array(
10        'paramVersion'                                  => '2.3',
11       
12        'themeStyle'                                    => 'black',
13        'hideMenu'                                              => true,
14        'animatedMenu'                                  => true,
15        'noLowercase'                                   => false,
16        'albumType'                                             => 'small',
17        'albumFrame'                                    => true,
18        'thumbFrame'                                    => true,
19        'showThumbLegend'                               => false,
20
21        'showTitleOnBrowsePath'                 => false,
22        'imageFrame'                                    => true,
23        'imageCaption'                                  => 'title',
24        'imageArrows'                                   => false,
25        'navArrows'                                             => true,
26        'HDlightbox'                                    => true,
27        'defaultZoomSize'                               => 'fit',
28        'animatedTabs'                                  => true,
29        'infoTabAdminOnly'                              => false,
30        'defaultTab'                                    => "none",
31
32        'albumSize'                                             => "thumb",
33        'thumbSize'                                             => "thumb",
34        'imageSize'                                             => "medium",
35        'hdSize'                                                => "xxlarge",
36       
37        'imageAutosize'                                 => true,
38        'imageAutosizeMargin'                   => 60,
39        'imageAutosizeMinHeight'                => 200,
40
41        'imagePreload'                                  => false,
42        'imagePreloadNb'                                => 5,
43        'imagePreloadThumbs'                    => false,
44        'imagePreloadHD'                                => false,
45
46        'marginContainer'                               => 30,
47        'paddingContainer'                              => 10,
48        'highResClickMode'                              => 'zoom',
49        'maxThumb'                                              => 15,
50      );
51     
52    $query = "
53INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
54VALUES ('stripped' , '".pwg_db_real_escape_string(serialize($config))."' , 'stripped theme parameters');";
55
56    pwg_query($query);
57
58} else {
59       
60        if (isset($stripped['animatedMenu']) & (!isset($stripped['themeStyle']))) {
61
62                $config = $stripped;
63                $config['themeStyle']='original';
64                $config['thumbFrame']=true;
65               
66                if ($stripped['showDescriptionInsteadOfTitle']) {
67                        $config['imageCaption']='description';
68                } else {
69                        $config['imageCaption']='title';
70                }
71
72                $config['HDlightbox']=true;
73                $config['imageArrows']=true;
74                $config['navArrows']=false;
75                $config['paramVersion']='2.3';
76                $config['albumType']='small';
77                $config['albumFrame']=$config['thumbFrame'];
78                $config['albumSize']='thumb';
79                $config['thumbSize']='thumb';
80                $config['imageSize']='medium';
81                $config['hdSize']='xxlarge';
82                 
83                conf_update_param('stripped', pwg_db_real_escape_string(serialize($config)));
84       
85        } else {
86                if (isset($stripped['themeStyle']) & (!isset($stripped['paramVersion']))) {
87
88                        $config = $stripped;
89                        $config['paramVersion']='2.3';
90                        $config['albumType']='small';
91                        $config['albumFrame']=$config['thumbFrame'];
92                        $config['albumSize']='thumb';
93                        $config['thumbSize']='thumb';
94                        $config['imageSize']='medium';
95                        $config['hdSize']='xxlarge';
96                        $config['HDlightbox']=true;
97                         
98                        conf_update_param('stripped', pwg_db_real_escape_string(serialize($config)));
99               
100                } else {
101                       
102                        if ($stripped['paramVersion'] == '2.1') {
103                                $config = $stripped;
104                                $config['paramVersion']='2.3';
105                                $config['albumSize']='thumb';
106                                $config['thumbSize']='thumb';
107                                $config['imageSize']='medium';
108                                $config['hdSize']='xxlarge';
109                                $config['HDlightbox']=true;
110                                conf_update_param('stripped', pwg_db_real_escape_string(serialize($config)));
111                        }
112
113                        if ($stripped['paramVersion'] == '2.2') {
114                                $config = $stripped;
115                                $config['paramVersion']='2.3';
116                                $config['HDlightbox']=true;
117                                conf_update_param('stripped', pwg_db_real_escape_string(serialize($config)));
118                        }
119                               
120                }
121
122        }
123
124        }
125?>
Note: See TracBrowser for help on using the repository browser.