[19361] | 1 | <?php |
---|
| 2 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 3 | |
---|
| 4 | global $conf, $template, $page; |
---|
| 5 | |
---|
| 6 | load_language('plugin.lang', TUMBLR_PATH); |
---|
| 7 | $conf['TumblrShare'] = unserialize($conf['TumblrShare']); |
---|
| 8 | |
---|
| 9 | if (isset($_POST['submit'])) |
---|
| 10 | { |
---|
| 11 | $conf['TumblrShare'] = array( |
---|
| 12 | 'type' => $_POST['type'], |
---|
| 13 | 'position' => $_POST['position'], |
---|
[19394] | 14 | 'img_size' => $_POST['img_size'], |
---|
[19361] | 15 | ); |
---|
| 16 | |
---|
| 17 | conf_update_param('TumblrShare', serialize($conf['TumblrShare'])); |
---|
| 18 | array_push($page['infos'], l10n('Information data registered in database')); |
---|
| 19 | |
---|
| 20 | // the prefilter changes, we must delete compiled templatess |
---|
| 21 | $template->delete_compiled_templates(); |
---|
| 22 | } |
---|
| 23 | |
---|
| 24 | $template->assign(array( |
---|
| 25 | 'type' => $conf['TumblrShare']['type'], |
---|
| 26 | 'position' => $conf['TumblrShare']['position'], |
---|
[19394] | 27 | 'img_size' => $conf['TumblrShare']['img_size'], |
---|
| 28 | 'img_sizes' => array_merge(ImageStdParams::get_all_types(), array('Original')), |
---|
[19361] | 29 | 'TUMBLR_PATH' => TUMBLR_PATH, |
---|
| 30 | )); |
---|
| 31 | |
---|
| 32 | $template->set_filename('tumblr_content', dirname(__FILE__).'/admin.tpl'); |
---|
| 33 | $template->assign_var_from_handle('ADMIN_CONTENT', 'tumblr_content'); |
---|
| 34 | |
---|
| 35 | ?> |
---|