source: extensions/Comments_on_Albums/admin/config.php @ 9766

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

[plugins] Comments on Albums

  • compatible with BBCode Bar and/or Smilies Support
  • better css integration
File size: 1.4 KB
Line 
1<?php
2if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!');
3
4// +-----------------------------------------------------------------------+
5//                              Save configuration
6// +-----------------------------------------------------------------------+
7if (isset($_POST['config_submit'])) {
8        $conf['comments_on_albums'] = array(
9                'icon_color' => $_POST['icon_color'],
10                'icon_color_over' => $_POST['icon_color_over'],
11        );
12       
13        pwg_query("UPDATE " . CONFIG_TABLE . " SET `value` = '" . serialize($conf['comments_on_albums']) . "' WHERE `param` = 'comments_on_albums';");
14        array_push($page['infos'], l10n('Information data registered in database'));
15}       
16
17
18// +-----------------------------------------------------------------------+
19//                              Template
20// +-----------------------------------------------------------------------+
21
22// available icons
23$dh = opendir(COA_PATH . 'template/s26');
24while (($file = readdir($dh)) !== false ) {
25        if ($file !== '.' AND $file !== '..' 
26        AND in_array(strtolower(end(explode('.', $file))), array('jpg', 'png', 'gif'))) {
27                $template->append('COLORS', $file);
28        }
29}
30closedir($dh);
31       
32$template->assign(array(
33        'ICON_COLOR' => $conf['comments_on_albums']['icon_color'],
34        'ICON_COLOR_OVER' => $conf['comments_on_albums']['icon_color_over'],
35));
36
37$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__).'/template/config.tpl'));
38$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
39
40?>
Note: See TracBrowser for help on using the repository browser.