source: extensions/Back2Front/admin.php @ 12523

Last change on this file since 12523 was 12361, checked in by mistic100, 13 years ago

remove a prefilter for a better integration, add an option to display a mark on thumbnails list

File size: 1.7 KB
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4global $conf, $template;
5load_language('plugin.lang', B2F_PATH);
6$conf['back2front'] = explode(',', $conf['back2front']);
7
8include_once(B2F_PATH.'functions.inc.php');
9
10// Enregistrement de la configuration
11if (isset($_POST['submit']))
12{
13  $conf['back2front'] = array(
14    $conf['back2front'][0], 
15    $_POST['switch_mode'], 
16    $_POST['transition'],
17    $_POST['position'],
18    serialize(stripslashes_deep(str_replace(array("'",'"',','), null, $_POST['link_name']))),
19    isset($_POST['show_thumbnail']),
20  );
21 
22  conf_update_param('back2front', implode (',', $conf['back2front']));
23  array_push($page['infos'], l10n('Information data registered in database'));
24}
25
26// Gestion des langues pour le bloc menu
27$conf['back2front'][4] = unserialize($conf['back2front'][4]);
28$template->append('link_name', array(
29  'LANGUAGE_NAME' => l10n('Default'),
30  'LANGUAGE_CODE' => 'default',
31  'VALUE' => @$conf['back2front'][4]['default'],
32  )
33);
34foreach (get_languages() as $language_code => $language_name)
35{
36  $template->append('link_name', array(
37    'LANGUAGE_NAME' => $language_name,
38    'LANGUAGE_CODE' => $language_code,
39    'VALUE' => isset($conf['back2front'][4][$language_code]) ? $conf['back2front'][4][$language_code] : '',
40    )
41  );
42}
43
44$template->assign(array(
45  'B2F_PATH' => B2F_PATH,
46  'SWITCH_MODE' => $conf['back2front'][1],
47  'TRANSITION' => $conf['back2front'][2],
48  'POSITION' => $conf['back2front'][3],
49  'SHOW_THUMBNAIL' => $conf['back2front'][5],
50));
51 
52$template->set_filename('back2front_conf', dirname(__FILE__).'/template/admin.tpl');
53$template->assign_var_from_handle('ADMIN_CONTENT', 'back2front_conf');
54
55?>
Note: See TracBrowser for help on using the repository browser.