1 | <?php |
---|
2 | |
---|
3 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
4 | |
---|
5 | global $prefixeTable, $conf, $stripped; |
---|
6 | |
---|
7 | if (!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 | 'forceLightboxOn' => false, |
---|
28 | 'defaultZoomSize' => 'fit', |
---|
29 | 'animatedTabs' => true, |
---|
30 | 'infoTabAdminOnly' => false, |
---|
31 | 'defaultTab' => "none", |
---|
32 | |
---|
33 | 'albumSize' => "thumb", |
---|
34 | 'thumbSize' => "thumb", |
---|
35 | 'imageSize' => "medium", |
---|
36 | 'hdSize' => "xxlarge", |
---|
37 | |
---|
38 | 'imageAutosize' => true, |
---|
39 | 'imageAutosizeMargin' => 60, |
---|
40 | 'imageAutosizeMinHeight' => 200, |
---|
41 | |
---|
42 | 'imagePreload' => false, |
---|
43 | 'imagePreloadNb' => 5, |
---|
44 | 'imagePreloadThumbs' => false, |
---|
45 | 'imagePreloadHD' => false, |
---|
46 | |
---|
47 | 'marginContainer' => 30, |
---|
48 | 'paddingContainer' => 10, |
---|
49 | 'highResClickMode' => 'zoom', |
---|
50 | 'maxThumb' => 15, |
---|
51 | ); |
---|
52 | |
---|
53 | $query = " |
---|
54 | INSERT INTO " . CONFIG_TABLE . " (param,value,comment) |
---|
55 | VALUES ('stripped' , '".pwg_db_real_escape_string(serialize($config))."' , 'stripped theme parameters');"; |
---|
56 | |
---|
57 | pwg_query($query); |
---|
58 | |
---|
59 | } else { |
---|
60 | |
---|
61 | if (isset($stripped['animatedMenu']) & (!isset($stripped['themeStyle']))) { |
---|
62 | |
---|
63 | $config = $stripped; |
---|
64 | $config['themeStyle']='original'; |
---|
65 | $config['thumbFrame']=true; |
---|
66 | |
---|
67 | if ($stripped['showDescriptionInsteadOfTitle']) { |
---|
68 | $config['imageCaption']='description'; |
---|
69 | } else { |
---|
70 | $config['imageCaption']='title'; |
---|
71 | } |
---|
72 | |
---|
73 | $config['HDlightbox']=true; |
---|
74 | $config['forceLightboxOn']=false; |
---|
75 | $config['imageArrows']=true; |
---|
76 | $config['navArrows']=false; |
---|
77 | $config['paramVersion']='2.3'; |
---|
78 | $config['albumType']='small'; |
---|
79 | $config['albumFrame']=$config['thumbFrame']; |
---|
80 | $config['albumSize']='thumb'; |
---|
81 | $config['thumbSize']='thumb'; |
---|
82 | $config['imageSize']='medium'; |
---|
83 | $config['hdSize']='xxlarge'; |
---|
84 | |
---|
85 | conf_update_param('stripped', pwg_db_real_escape_string(serialize($config))); |
---|
86 | |
---|
87 | } else { |
---|
88 | if (isset($stripped['themeStyle']) & (!isset($stripped['paramVersion']))) { |
---|
89 | |
---|
90 | $config = $stripped; |
---|
91 | $config['paramVersion']='2.3'; |
---|
92 | $config['albumType']='small'; |
---|
93 | $config['albumFrame']=$config['thumbFrame']; |
---|
94 | $config['albumSize']='thumb'; |
---|
95 | $config['thumbSize']='thumb'; |
---|
96 | $config['imageSize']='medium'; |
---|
97 | $config['hdSize']='xxlarge'; |
---|
98 | $config['HDlightbox']=true; |
---|
99 | $config['forceLightboxOn']=false; |
---|
100 | |
---|
101 | conf_update_param('stripped', pwg_db_real_escape_string(serialize($config))); |
---|
102 | |
---|
103 | } else { |
---|
104 | |
---|
105 | if ($stripped['paramVersion'] == '2.1') { |
---|
106 | $config = $stripped; |
---|
107 | $config['paramVersion']='2.3'; |
---|
108 | $config['albumSize']='thumb'; |
---|
109 | $config['thumbSize']='thumb'; |
---|
110 | $config['imageSize']='medium'; |
---|
111 | $config['hdSize']='xxlarge'; |
---|
112 | $config['HDlightbox']=true; |
---|
113 | $config['forceLightboxOn']=false; |
---|
114 | conf_update_param('stripped', pwg_db_real_escape_string(serialize($config))); |
---|
115 | } |
---|
116 | |
---|
117 | if ($stripped['paramVersion'] == '2.2') { |
---|
118 | $config = $stripped; |
---|
119 | $config['paramVersion']='2.3'; |
---|
120 | $config['HDlightbox']=true; |
---|
121 | $config['forceLightboxOn']=false; |
---|
122 | conf_update_param('stripped', pwg_db_real_escape_string(serialize($config))); |
---|
123 | } |
---|
124 | |
---|
125 | } |
---|
126 | |
---|
127 | } |
---|
128 | |
---|
129 | } |
---|
130 | ?> |
---|