Line | |
---|
1 | <?php |
---|
2 | |
---|
3 | function theme_activate($id, $version, &$errors) |
---|
4 | { |
---|
5 | global $prefixeTable, $conf; |
---|
6 | |
---|
7 | if (!isset($conf['stripped_black_bloc'])) |
---|
8 | { |
---|
9 | $config = array( |
---|
10 | 'color_main' => 'E6554F', |
---|
11 | 'column_width' => 170, |
---|
12 | 'thumbnail_width' => 150, |
---|
13 | 'thumbnail' => 'piwigo' //generated - auto - piwigo |
---|
14 | ); |
---|
15 | |
---|
16 | $query = " |
---|
17 | INSERT INTO " . CONFIG_TABLE . " (param,value,comment) |
---|
18 | VALUES ('stripped_black_bloc' , '".pwg_db_real_escape_string(serialize($config))."' , 'color_main#column_width#thumbnail_width#thumbnail(generated - auto - piwigo)');"; |
---|
19 | pwg_query($query); |
---|
20 | } |
---|
21 | } |
---|
22 | |
---|
23 | function theme_deactivate() |
---|
24 | { |
---|
25 | global $prefixeTable; |
---|
26 | |
---|
27 | $query = 'DELETE FROM ' . CONFIG_TABLE . ' WHERE param="stripped_black_bloc" ;'; |
---|
28 | pwg_query($query); |
---|
29 | } |
---|
30 | |
---|
31 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.