[11600] | 1 | <?php |
---|
| 2 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 3 | |
---|
| 4 | global $conf, $template, $page; |
---|
| 5 | |
---|
| 6 | load_language('plugin.lang', GPLUS1_PATH); |
---|
[15121] | 7 | $conf['GooglePlusOne'] = unserialize($conf['GooglePlusOne']); |
---|
[11600] | 8 | |
---|
| 9 | if (isset($_POST['submit'])) |
---|
| 10 | { |
---|
| 11 | $conf['GooglePlusOne'] = array( |
---|
[15121] | 12 | 'size' => $_POST['button_size'], |
---|
| 13 | 'position' => $_POST['position'], |
---|
| 14 | 'annotation' => $_POST['annotation'], |
---|
[11600] | 15 | ); |
---|
| 16 | |
---|
[15121] | 17 | conf_update_param('GooglePlusOne', serialize($conf['GooglePlusOne'])); |
---|
[11600] | 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( |
---|
[15121] | 25 | 'button_size' => $conf['GooglePlusOne']['size'], |
---|
| 26 | 'position' => $conf['GooglePlusOne']['position'], |
---|
| 27 | 'annotation' => $conf['GooglePlusOne']['annotation'], |
---|
[11600] | 28 | 'GPLUS1_PATH' => GPLUS1_PATH, |
---|
| 29 | )); |
---|
| 30 | |
---|
| 31 | $template->set_filename('gplus1_content', dirname(__FILE__).'/admin.tpl'); |
---|
| 32 | $template->assign_var_from_handle('ADMIN_CONTENT', 'gplus1_content'); |
---|
| 33 | |
---|
| 34 | ?> |
---|