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

Last change on this file since 18136 was 17858, checked in by flop25, 12 years ago

new value and name change of parameter : Display big thumbnails for landscape pictures (thumbnails.tpl&mainpage_categories.tpl)
all the parameters are applied to stuff thumbnails
mistake corrected in mainpage_categories.tpl

File size: 1.7 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  'orientation_option'         => 'none' //none - max_heigth -big_landscape
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  'orientation_option'         => (isset($conff['orientation_option'])) ? $conff['orientation_option'] :'none' //none - max_heigth -big_landscape
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.