[11419] | 1 | <?php |
---|
| 2 | if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); |
---|
| 3 | |
---|
| 4 | global $conf, $template, $page; |
---|
| 5 | |
---|
| 6 | load_language('plugin.lang', TWEET_PATH); |
---|
[15122] | 7 | $conf['TweetThis'] = unserialize($conf['TweetThis']); |
---|
[11419] | 8 | |
---|
| 9 | if (isset($_POST['submit'])) |
---|
| 10 | { |
---|
| 11 | $conf['TweetThis'] = array( |
---|
[15122] | 12 | 'size' => $_POST['button_size'], |
---|
| 13 | 'position' => $_POST['position'], |
---|
| 14 | 'count' => isset($_POST['count']), |
---|
| 15 | 'via' => trim($_POST['via']), |
---|
[11419] | 16 | ); |
---|
| 17 | |
---|
[15122] | 18 | conf_update_param('TweetThis', serialize($conf['TweetThis'])); |
---|
[11419] | 19 | array_push($page['infos'], l10n('Information data registered in database')); |
---|
[11425] | 20 | |
---|
| 21 | // the prefilter changes, we must delete compiled templatess |
---|
| 22 | $template->delete_compiled_templates(); |
---|
[11419] | 23 | } |
---|
| 24 | |
---|
| 25 | $template->assign(array( |
---|
[15122] | 26 | 'button_size' => $conf['TweetThis']['size'], |
---|
| 27 | 'position' => $conf['TweetThis']['position'], |
---|
| 28 | 'count_check' => $conf['TweetThis']['count'] ? 'checked="checked"' : null, |
---|
| 29 | 'via' => $conf['TweetThis']['via'], |
---|
[11419] | 30 | 'TWEET_PATH' => TWEET_PATH, |
---|
| 31 | )); |
---|
| 32 | |
---|
| 33 | $template->set_filename('tweet_content', dirname(__FILE__).'/admin.tpl'); |
---|
| 34 | $template->assign_var_from_handle('ADMIN_CONTENT', 'tweet_content'); |
---|
| 35 | |
---|
| 36 | ?> |
---|