source: extensions/Comments_on_Albums/stuffs_module/config.inc.php @ 12381

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

add a PWG Stuffs module, add menu bar on comments page

File size: 1.1 KB
Line 
1<?php
2
3if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
4if (!isset($datas)) $datas = array(5, 'on', 'default', '', '');
5
6// Enregistrement de la configuration
7if (isset($_POST['submit']))
8{
9  if (empty($_POST['nb_comments']))
10  {
11    array_push($page['errors'], l10n('lastcoms_no_nb_comments'));
12  }
13  else
14  {
15    $datas = array(
16      $_POST['nb_comments'],
17      isset($_POST['show_admin_buttons']),
18      $_POST['nb_cadres'],
19      $_POST['width'],
20      $_POST['height']
21      );
22  }
23}
24
25// Parametrage du template
26$template->assign('nb_cadres', array(
27  'OPTIONS' => array('default' => 'default', 1 => 1, 2 => 2, 3 => 3),
28  'SELECTED' => $datas[2]));
29
30$template->assign(array(
31  'NB_COMMENTS' => $datas[0],
32  'WIDTH'       => $datas[3],
33  'HEIGHT'      => $datas[4]
34));
35if ($datas[1])
36{
37  $template->assign(array('SHOW_ADMIN_BUTTONS' => 'checked="checked"'));
38}
39
40$template->set_filenames(array('module_options' => dirname(__FILE__) . '/config.tpl'));
41$template->assign_var_from_handle('MODULE_OPTIONS', 'module_options');
42
43?>
Note: See TracBrowser for help on using the repository browser.