source: extensions/stripped_black_bloc/admin/upgrade.inc.php @ 17828

Last change on this file since 17828 was 17828, checked in by flop25, 8 years ago

adding a new option : restrict heigth by using the 'thumbnail width' parameter
auto managment of pano photos : set pano on three columns
Thx to JJF and his work on White S&C
ToDo : medium pano on 2 columns

File size: 1.6 KB
Line 
1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4
5global $prefixeTable, $conf;
6
7if (!isset($conf['stripped_black_bloc']))
8{
9  $config = array(
10  'color_main'            => 'E6554F',
11  'column_width'            => 170,
12  'thumbnail_width'           => 150,
13  'every_x'           => 20,
14  'starting_to'           => 1,
15  'catthumb'         => 'none', //none - same - all
16  'portrait_limitation'         => 'none' //none - yes
17  );
18  $query = "
19INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
20VALUES ('stripped_black_bloc' , '".pwg_db_real_escape_string(serialize($config))."' , 'color_main#column_width#thumbnail_width#catthumb(none - same - all)');";
21  pwg_query($query);
22  load_conf_from_db();
23}
24elseif (count(unserialize( $conf['stripped_black_bloc'] ))!=7)
25{
26  $conff=unserialize($conf['stripped_black_bloc']);
27  $config = array(
28  'color_main'            => (isset($conff['color_main'])) ? $conff['color_main'] :'E6554F',
29  'column_width'            => (isset($conff['column_width'])) ? $conff['column_width'] :170,
30  'thumbnail_width'           => (isset($conff['thumbnail_width'])) ? $conff['thumbnail_width'] :150,
31  'every_x'           => (isset($conff['every_x'])) ? $conff['every_x'] : 20,
32  'starting_to'           => (isset($conff['starting_to'])) ? $conff['starting_to'] :1,
33  'catthumb'         => (isset($conff['catthumb'])) ? $conff['catthumb'] :'none', //none - same - all
34  'portrait_limitation'         => (isset($conff['portrait_limitation'])) ? $conff['portrait_limitation'] :'none' //none - yes
35  );
36  conf_update_param('stripped_black_bloc', pwg_db_real_escape_string(serialize($config)));
37  load_conf_from_db();
38}
39?>
Note: See TracBrowser for help on using the repository browser.