source: extensions/SocialButtons/admin.php @ 20401

Last change on this file since 20401 was 20374, checked in by mistic100, 11 years ago

add pinterest, option to hide counter on facebook button

File size: 1.8 KB
Line 
1<?php
2if (!defined('SOCIALBUTT_PATH')) die('Hacking attempt!');
3
4global $conf, $template, $page;
5
6load_language('plugin.lang', SOCIALBUTT_PATH);
7
8
9if (isset($_POST['submit']))
10{
11  $conf['SocialButtons'] = array(
12    'position' => $_POST['position'],
13    'twitter' => array(
14      'enabled' => isset($_POST['twitter']['enabled']),
15      'size' => $_POST['twitter']['size'],
16      'count' => $_POST['twitter']['count'],
17      'via' => trim($_POST['twitter']['via']),
18      ),
19    'google' => array(
20      'enabled' => isset($_POST['google']['enabled']),
21      'size' => $_POST['google']['size'],
22      'annotation' => $_POST['google']['annotation'],
23      ),
24    'tumblr' => array(
25      'enabled' => isset($_POST['tumblr']['enabled']),
26      'type' => $_POST['tumblr']['type'],
27      'img_size' => $_POST['tumblr']['img_size'],
28      ),
29    'facebook' => array(
30      'enabled' => isset($_POST['facebook']['enabled']),
31      'color' => $_POST['facebook']['color'],
32      'layout' => $_POST['facebook']['layout'],
33      ),
34    'pinterest' => array(
35      'enabled' => isset($_POST['pinterest']['enabled']),
36      'layout' => $_POST['pinterest']['layout'],
37      'img_size' => $_POST['pinterest']['img_size'],
38      ),
39    );
40 
41  conf_update_param('SocialButtons', serialize($conf['SocialButtons']));
42  array_push($page['infos'], l10n('Information data registered in database'));
43 
44  // the prefilter changes, we must delete compiled templatess
45  $template->delete_compiled_templates();
46}
47
48
49$template->assign($conf['SocialButtons']);
50$template->assign(array(
51  'SOCIALBUTT_PATH' => SOCIALBUTT_PATH,
52  'img_sizes' => array_merge(ImageStdParams::get_all_types(), array('Original')),
53  ));
54
55$template->set_filename('socialbutt_content', realpath(SOCIALBUTT_PATH . 'template/admin.tpl'));
56$template->assign_var_from_handle('ADMIN_CONTENT', 'socialbutt_content');
57
58?>
Note: See TracBrowser for help on using the repository browser.