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