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

Last change on this file since 13894 was 13894, checked in by flop25, 9 years ago

updated for 2.4 :
-deleted timthumb
-deleted config for auto-generation

features added :
-representative thumbs can be big : always, as the "Every x thumb" config or never

bug corrected :
-big thumbs didn't have rounded corners

Translations uk_UA needed for new keys

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  );
17  $query = "
18INSERT INTO " . CONFIG_TABLE . " (param,value,comment)
19VALUES ('stripped_black_bloc' , '".pwg_db_real_escape_string(serialize($config))."' , 'color_main#column_width#thumbnail_width#thumbnail(generated - auto - piwigo)');";
20  pwg_query($query);
21  load_conf_from_db();
22}
23elseif (count(unserialize( $conf['stripped_black_bloc'] ))!=6)
24{
25  $config = array(
26  'color_main'            => 'E6554F',
27  'column_width'            => 170,
28  'thumbnail_width'           => 150,
29  'every_x'           => 20,
30  'starting_to'           => 1,
31  'catthumb'         => 'none' //none - same - all
32  );
33  conf_update_param('stripped_black_bloc', pwg_db_real_escape_string(serialize($config)));
34  load_conf_from_db();
35}
36elseif ($conff=unserialize($conf['stripped_black_bloc']) and ( !isset($conff['catthumb']) or empty($conff['catthumb'])) )
37{
38  $config = array(
39  'color_main'            => $conff['color_main'],
40  'column_width'            => $conff['column_width'],
41  'thumbnail_width'           => $conff['thumbnail_width'],
42  'every_x'           => $conff['every_x'],
43  'starting_to'           => $conff['starting_to'],
44  'catthumb'         => 'none' //none - same - all
45  );
46  conf_update_param('stripped_black_bloc', pwg_db_real_escape_string(serialize($config)));
47  load_conf_from_db();
48}
49?>
Note: See TracBrowser for help on using the repository browser.