1 | <?php |
---|
2 | |
---|
3 | function theme_activate($id, $version, &$errors) |
---|
4 | { |
---|
5 | global $prefixeTable, $conf; |
---|
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 | } |
---|
60 | |
---|
61 | function theme_deactivate() |
---|
62 | { |
---|
63 | global $prefixeTable; |
---|
64 | |
---|
65 | $query = "DELETE FROM " . CONFIG_TABLE . " WHERE param='stripped';"; |
---|
66 | pwg_query($query); |
---|
67 | } |
---|
68 | |
---|
69 | ?> |
---|