source: extensions/TumblrShare/admin.php @ 22544

Last change on this file since 22544 was 19394, checked in by mistic100, 12 years ago

allow to choose shared size, compatible with 'question_mark_in_url'=false

File size: 1.0 KB
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4global $conf, $template, $page;
5
6load_language('plugin.lang', TUMBLR_PATH);
7$conf['TumblrShare'] = unserialize($conf['TumblrShare']);
8
9if (isset($_POST['submit']))
10{
11  $conf['TumblrShare'] = array(
12    'type' => $_POST['type'],
13    'position' => $_POST['position'],
14    'img_size' => $_POST['img_size'],
15    );
16 
17  conf_update_param('TumblrShare', serialize($conf['TumblrShare']));
18  array_push($page['infos'], l10n('Information data registered in database'));
19 
20  // the prefilter changes, we must delete compiled templatess
21  $template->delete_compiled_templates();
22}
23
24$template->assign(array(
25  'type' => $conf['TumblrShare']['type'],
26  'position' => $conf['TumblrShare']['position'],
27  'img_size' => $conf['TumblrShare']['img_size'],
28  'img_sizes' => array_merge(ImageStdParams::get_all_types(), array('Original')),
29  'TUMBLR_PATH' => TUMBLR_PATH,
30));
31
32$template->set_filename('tumblr_content', dirname(__FILE__).'/admin.tpl');
33$template->assign_var_from_handle('ADMIN_CONTENT', 'tumblr_content');
34
35?>
Note: See TracBrowser for help on using the repository browser.