Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | /* Lors de l'activation */ |
---|
4 | function theme_activate($id, $version, &$errors) |
---|
5 | { |
---|
6 | global $prefixeTable, $conf; |
---|
7 | |
---|
8 | if (!isset($conf['Sobre'])) |
---|
9 | { |
---|
10 | $config = array( |
---|
11 | 'home' => true, |
---|
12 | 'categories' => true, |
---|
13 | 'picture' => false, |
---|
14 | 'other' => true, |
---|
15 | 'nbItemsMB' => 4, |
---|
16 | 'picture_width' => 128, |
---|
17 | 'picture_height' => 96, |
---|
18 | 'LMT-licence' => false, |
---|
19 | 'troncate_picture_name' => false, |
---|
20 | 'troncate_name_longer' => 4, |
---|
21 | 'StartOrEnd' => false, |
---|
22 | 'Display_light_categories' => trfalseue, |
---|
23 | 'footer_height' => 96, |
---|
24 | ); |
---|
25 | |
---|
26 | $query = ' |
---|
27 | INSERT INTO ' . CONFIG_TABLE . ' (param,value,comment) |
---|
28 | VALUES ("Sobre" , "'.addslashes(serialize($config)).'" , "Sobre parameters");'; |
---|
29 | |
---|
30 | pwg_query($query); |
---|
31 | } |
---|
32 | } |
---|
33 | |
---|
34 | /* Lors de la désactivation */ |
---|
35 | function theme_deactivate() |
---|
36 | { |
---|
37 | global $prefixeTable; |
---|
38 | |
---|
39 | $query = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="Sobre" LIMIT 1;'; |
---|
40 | pwg_query($query); |
---|
41 | } |
---|
42 | |
---|
43 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.