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

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

version 2.1.0

File size: 2.1 KB
RevLine 
[9987]1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4
[12547]5global $prefixeTable, $conf, $stripped;
[9987]6
7if (!isset($conf['stripped']))
8{
9    $config = array(
[12960]10        'paramVersion'                                  => '2.1',
11       
[12547]12        'themeStyle'                                    => 'black',
[9987]13        'hideMenu'                                              => true,
14        'animatedMenu'                                  => true,
[10688]15        'noLowercase'                                   => false,
[12960]16        'albumType'                                             => 'small',
17        'albumFrame'                                    => true,
[12547]18        'thumbFrame'                                    => true,
[11059]19        'showThumbLegend'                               => false,
[12547]20
[9987]21        'showTitleOnBrowsePath'                 => false,
[12547]22        'imageFrame'                                    => true,
23        'imageCaption'                                  => 'title',
24        'imageArrows'                                   => false,
25        'navArrows'                                             => true,
26        'defaultZoomSize'                               => 'fit',
27        'animatedTabs'                                  => true,
[9987]28        'infoTabAdminOnly'                              => false,
[11982]29        'defaultTab'                                    => "none",
[12547]30
[9987]31        'imageAutosize'                                 => true,
32        'imageAutosizeMargin'                   => 60,
33        'imageAutosizeMinHeight'                => 200,
[12547]34
[12153]35        'imagePreload'                                  => false,
36        'imagePreloadNb'                                => 5,
37        'imagePreloadThumbs'                    => false,
38        'imagePreloadHD'                                => false,
[12547]39
[9987]40        'marginContainer'                               => 30,
41        'paddingContainer'                              => 10,
42        'highResClickMode'                              => 'zoom',
[12547]43        'maxThumb'                                              => 15,
[9987]44      );
45     
[11833]46    $query = "
47INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
48VALUES ('stripped' , '".pwg_db_real_escape_string(serialize($config))."' , 'stripped theme parameters');";
[9987]49
50    pwg_query($query);
51
[12547]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       
[12960]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
[12547]83        }
84
[12960]85        }
[9987]86?>
Note: See TracBrowser for help on using the repository browser.