source: extensions/stripped/admin/maintain.inc.php @ 14687

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

version 2.2.0.beta2 for Piwigo 2.4

File size: 1.6 KB
Line 
1<?php
2
3function theme_activate($id, $version, &$errors)
4{
5  global $prefixeTable, $conf;
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'                                             => "xlarge",
34        'hdSize'                                                => "original",
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 = "
52INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
53VALUES ('stripped' , '".pwg_db_real_escape_string(serialize($config))."' , 'stripped theme parameters');";
54
55    pwg_query($query);
56  }
57}
58
59function theme_deactivate()
60{
61  global $prefixeTable;
62
63  $query = "DELETE FROM " . CONFIG_TABLE . " WHERE param='stripped';";
64  pwg_query($query);
65}
66
67?>
Note: See TracBrowser for help on using the repository browser.