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); |
---|
7 | $conf['TweetThis'] = unserialize($conf['TweetThis']); |
---|
8 | |
---|
9 | if (isset($_POST['submit'])) |
---|
10 | { |
---|
11 | $conf['TweetThis'] = array( |
---|
12 | 'size' => $_POST['button_size'], |
---|
13 | 'position' => $_POST['position'], |
---|
14 | 'count' => isset($_POST['count']), |
---|
15 | 'via' => trim($_POST['via']), |
---|
16 | ); |
---|
17 | |
---|
18 | conf_update_param('TweetThis', serialize($conf['TweetThis'])); |
---|
19 | array_push($page['infos'], l10n('Information data registered in database')); |
---|
20 | |
---|
21 | // the prefilter changes, we must delete compiled templatess |
---|
22 | $template->delete_compiled_templates(); |
---|
23 | } |
---|
24 | |
---|
25 | $template->assign(array( |
---|
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'], |
---|
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 | ?> |
---|