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

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

version 2.1.0

File size: 2.1 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.1',
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        'defaultZoomSize'                               => 'fit',
27        'animatedTabs'                                  => true,
28        'infoTabAdminOnly'                              => false,
29        'defaultTab'                                    => "none",
30
31        'imageAutosize'                                 => true,
32        'imageAutosizeMargin'                   => 60,
33        'imageAutosizeMinHeight'                => 200,
34
35        'imagePreload'                                  => false,
36        'imagePreloadNb'                                => 5,
37        'imagePreloadThumbs'                    => false,
38        'imagePreloadHD'                                => false,
39
40        'marginContainer'                               => 30,
41        'paddingContainer'                              => 10,
42        'highResClickMode'                              => 'zoom',
43        'maxThumb'                                              => 15,
44      );
45     
46    $query = "
47INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
48VALUES ('stripped' , '".pwg_db_real_escape_string(serialize($config))."' , 'stripped theme parameters');";
49
50    pwg_query($query);
51
52} else {
53       
54        if (isset($stripped['animatedMenu']) & (!isset($stripped['themeStyle']))) {
55
56                $config = $stripped;
57                $config['themeStyle']='original';
58                $config['thumbFrame']=true;
59               
60                if ($stripped['showDescriptionInsteadOfTitle']) {
61                        $config['imageCaption']='description';
62                } else {
63                        $config['imageCaption']='title';
64                }
65
66                $config['imageArrows']=true;
67                $config['navArrows']=false;
68                 
69                conf_update_param('stripped', pwg_db_real_escape_string(serialize($config)));
70       
71        } else {
72                if (isset($stripped['themeStyle']) & (!isset($stripped['paramVersion']))) {
73
74                        $config = $stripped;
75                        $config['paramVersion']='2.1';
76                        $config['albumType']='small';
77                        $config['albumFrame']=$config['thumbFrame'];
78                         
79                        conf_update_param('stripped', pwg_db_real_escape_string(serialize($config)));
80               
81                }
82
83        }
84
85        }
86?>
Note: See TracBrowser for help on using the repository browser.