source: extensions/TweetThis/admin.php @ 17010

Last change on this file since 17010 was 15122, checked in by mistic100, 12 years ago

update for Piwigo 2.4
change previews with new Twitter appearance
remove all custom buttons, keep only official
new options: display counter and via

File size: 1.1 KB
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4global $conf, $template, $page;
5
6load_language('plugin.lang', TWEET_PATH);
7$conf['TweetThis'] = unserialize($conf['TweetThis']);
8
9if (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?>
Note: See TracBrowser for help on using the repository browser.