source: extensions/SocialButtons/admin.php @ 24757

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

add light mode: no script loaded
tests in migration task
add an id to the div on picture page

File size: 1.9 KB
RevLine 
[20358]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'],
[21232]13    'on_index' => get_boolean($_POST['on_index']),
[24757]14    'light' => isset($_POST['light']),
[20358]15    'twitter' => array(
16      'enabled' => isset($_POST['twitter']['enabled']),
17      'size' => $_POST['twitter']['size'],
18      'count' => $_POST['twitter']['count'],
19      'via' => trim($_POST['twitter']['via']),
20      ),
21    'google' => array(
22      'enabled' => isset($_POST['google']['enabled']),
23      'size' => $_POST['google']['size'],
24      'annotation' => $_POST['google']['annotation'],
25      ),
26    'tumblr' => array(
27      'enabled' => isset($_POST['tumblr']['enabled']),
28      'type' => $_POST['tumblr']['type'],
29      'img_size' => $_POST['tumblr']['img_size'],
30      ),
31    'facebook' => array(
32      'enabled' => isset($_POST['facebook']['enabled']),
33      'color' => $_POST['facebook']['color'],
34      'layout' => $_POST['facebook']['layout'],
35      ),
[20374]36    'pinterest' => array(
37      'enabled' => isset($_POST['pinterest']['enabled']),
38      'layout' => $_POST['pinterest']['layout'],
39      'img_size' => $_POST['pinterest']['img_size'],
40      ),
[20358]41    );
42 
43  conf_update_param('SocialButtons', serialize($conf['SocialButtons']));
44  array_push($page['infos'], l10n('Information data registered in database'));
45 
46  // the prefilter changes, we must delete compiled templatess
47  $template->delete_compiled_templates();
48}
49
50
51$template->assign($conf['SocialButtons']);
52$template->assign(array(
53  'SOCIALBUTT_PATH' => SOCIALBUTT_PATH,
54  'img_sizes' => array_merge(ImageStdParams::get_all_types(), array('Original')),
55  ));
56
57$template->set_filename('socialbutt_content', realpath(SOCIALBUTT_PATH . 'template/admin.tpl'));
58$template->assign_var_from_handle('ADMIN_CONTENT', 'socialbutt_content');
59
60?>
Note: See TracBrowser for help on using the repository browser.