Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | include_once(PHPWG_THEMES_PATH.'gally-default/admin/Conf.class.inc.php'); |
---|
4 | |
---|
5 | function theme_activate($id, $version, &$errors) |
---|
6 | { |
---|
7 | $forcedToDefault=array( |
---|
8 | "imageCenterMode" => '', |
---|
9 | "imageCenterOffset" => '', |
---|
10 | "imageCenterTopMin" => '', |
---|
11 | "imageCenterTopBorder" => '', |
---|
12 | "interfaceAnimated" => '', |
---|
13 | "commentAnimated" => '', |
---|
14 | "animateDelay" => '', |
---|
15 | "marginContainer" => '', |
---|
16 | "paddingContainer" => '', |
---|
17 | "tabsAnimated" => '', |
---|
18 | "tabsHidden" => '', |
---|
19 | "tabsVisible" => '', |
---|
20 | "tabsPosition" => '', |
---|
21 | "commentRows" => '', |
---|
22 | "menuAnimated" => '', |
---|
23 | "menuWidth" => '', |
---|
24 | "menuMaxWidth" => '', |
---|
25 | "menuMSIEMaxWidth" => '', |
---|
26 | "expandMenu" => '', |
---|
27 | ); |
---|
28 | $configDefault = new Conf(); |
---|
29 | $configDefault->setFileName(PHPWG_ROOT_PATH."themes/gally-graphite/conf/default.conf"); |
---|
30 | $configDefault->read(false); |
---|
31 | |
---|
32 | $configLocal = new Conf(); |
---|
33 | $configLocal->setFileName(PHPWG_ROOT_PATH."local/themes/gally-graphite/conf/local.conf"); |
---|
34 | $configLocal->read(false); |
---|
35 | |
---|
36 | foreach($forcedToDefault as $key => $param) |
---|
37 | { |
---|
38 | $forcedToDefault[$key]=$configDefault->getConfValue($key); |
---|
39 | } |
---|
40 | $configLocal->setConf($forcedToDefault, false); |
---|
41 | $configLocal->write(); |
---|
42 | } |
---|
43 | |
---|
44 | function theme_deactivate() |
---|
45 | { |
---|
46 | |
---|
47 | } |
---|
48 | |
---|
49 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.