Last change
on this file since 12048 was
12048,
checked in by flop25, 13 years ago
|
adding an option to create big thumbnails periodically : new class css, admin option
changing timthumb to phpThumb.php : it's safer and works according document_root
=> new keys to translate
|
File size:
1.6 KB
|
Rev | Line | |
---|
[11699] | 1 | <?php |
---|
| 2 | |
---|
| 3 | // Need upgrade? |
---|
| 4 | |
---|
| 5 | global $conf; |
---|
| 6 | |
---|
| 7 | if (!isset($conf['stripped_black_bloc'])) |
---|
| 8 | include(PHPWG_THEMES_PATH.'stripped_black_bloc/admin/upgrade.inc.php'); |
---|
| 9 | |
---|
| 10 | load_language('theme.lang', PHPWG_THEMES_PATH.'stripped_black_bloc/'); |
---|
| 11 | |
---|
| 12 | $config_send= array(); |
---|
| 13 | |
---|
| 14 | if(isset($_POST['submit_stripped_black_bloc'])) |
---|
| 15 | { |
---|
[11823] | 16 | $config_send['color_main']=(isset($_POST['f_color_main']) and !empty($_POST['f_color_main'])) ? $_POST['f_color_main'] : 'E6554F'; |
---|
[11699] | 17 | $config_send['column_width']=(isset($_POST['f_column_width'])) ? $_POST['f_column_width'] : 170; |
---|
| 18 | if ( isset($_POST['f_column_width']) and isset($_POST['f_thumbnail_width'])) |
---|
| 19 | { |
---|
| 20 | if ( $_POST['f_column_width']>$_POST['f_thumbnail_width'] ) |
---|
| 21 | { |
---|
| 22 | $config_send['thumbnail_width']=$_POST['f_thumbnail_width']; |
---|
| 23 | } |
---|
| 24 | else |
---|
| 25 | { |
---|
| 26 | $config_send['thumbnail_width']=$_POST['f_column_width']-20; |
---|
| 27 | } |
---|
| 28 | } |
---|
| 29 | else |
---|
| 30 | { |
---|
| 31 | $config_send['thumbnail_width']=150; |
---|
| 32 | } |
---|
[12048] | 33 | $config_send['every_x']=(isset($_POST['f_every_x'])) ? $_POST['f_every_x'] : 20; |
---|
| 34 | $config_send['starting_to']=(isset($_POST['f_starting_to'])) ? $_POST['f_starting_to'] : 1; |
---|
| 35 | $config_send['thumbnail']=(isset($_POST['f_thumbnail'])) ? $_POST['f_thumbnail'] : 'piwigo'; |
---|
[11699] | 36 | conf_update_param('stripped_black_bloc', pwg_db_real_escape_string(serialize($config_send))); |
---|
| 37 | |
---|
| 38 | array_push($page['infos'], l10n('Information data registered in database')); |
---|
| 39 | |
---|
| 40 | load_conf_from_db(); |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | $template->set_filenames(array( |
---|
| 44 | 'theme_admin_content' => dirname(__FILE__) . '/admin.tpl')); |
---|
| 45 | |
---|
| 46 | $template->assign('options', unserialize($conf['stripped_black_bloc'])); |
---|
| 47 | |
---|
| 48 | $template->assign_var_from_handle('ADMIN_CONTENT', 'theme_admin_content'); |
---|
| 49 | |
---|
| 50 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.