Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | function theme_activate($id, &$errors) |
---|
4 | { |
---|
5 | global $conf; |
---|
6 | |
---|
7 | if (!isset($conf['PwgCarbon'])) |
---|
8 | { |
---|
9 | $config = array( |
---|
10 | 'color_bg' => '4', |
---|
11 | 'color_theme' => '4', |
---|
12 | 'th' => '1', |
---|
13 | 'bg' => '1', |
---|
14 | 'hd' => '4', |
---|
15 | 'thumbreflex' => '1', |
---|
16 | 'imgtheme' => '1', |
---|
17 | 'colormenu' => '0', |
---|
18 | 'lytebox' => '0', |
---|
19 | 'menuident' => '1', |
---|
20 | ); |
---|
21 | |
---|
22 | $query = " |
---|
23 | INSERT INTO " . CONFIG_TABLE . " (param,value,comment) |
---|
24 | VALUES ('PwgCarbon' , '".pwg_db_real_escape_string(serialize($config))."' , 'PwgCarbon theme parameters');"; |
---|
25 | |
---|
26 | pwg_query($query); |
---|
27 | } |
---|
28 | } |
---|
29 | |
---|
30 | function theme_deactivate() |
---|
31 | { |
---|
32 | |
---|
33 | $query = "DELETE FROM " . CONFIG_TABLE . " WHERE param='PwgCarbon';"; |
---|
34 | pwg_query($query); |
---|
35 | } |
---|
36 | |
---|
37 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.