Ignore:
Timestamp:
Mar 19, 2011, 10:39:36 AM (13 years ago)
Author:
mistic100
Message:

[plugins] Comments on Albums

  • compatible with BBCode Bar and/or Smilies Support
  • better css integration
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Comments_on_Albums/admin/config.php

    r9641 r9766  
    66// +-----------------------------------------------------------------------+
    77if (isset($_POST['config_submit'])) {
    8         $user_config = array(
     8        $conf['comments_on_albums'] = array(
    99                'icon_color' => $_POST['icon_color'],
    1010                'icon_color_over' => $_POST['icon_color_over'],
    1111        );
    1212       
    13         pwg_query("UPDATE " . CONFIG_TABLE . " SET `value` = '" . serialize($user_config) . "' WHERE `param` = 'comments_on_albums';");
    14         redirect(COA_ADMIN . '-config&msg=saved');
     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'));
    1515}       
     16
    1617
    1718// +-----------------------------------------------------------------------+
    1819//                              Template
    1920// +-----------------------------------------------------------------------+
    20 if (isset($_GET['msg']) AND $_GET['msg'] == 'saved') {
    21         array_push($page['infos'], l10n('Information data registered in database'));
    22 }
    2321
    2422// available icons
    2523$dh = opendir(COA_PATH . 'template/s26');
    2624while (($file = readdir($dh)) !== false ) {
    27         if ($file !== '.' && $file !== '..') {
    28                 $color = preg_replace('#^outline\_([a-f0-9]{6})\.png$#', '$1', $file);
    29                 $template->append('COLORS', $color);
     25        if ($file !== '.' AND $file !== '..'
     26        AND in_array(strtolower(end(explode('.', $file))), array('jpg', 'png', 'gif'))) {
     27                $template->append('COLORS', $file);
    3028        }
    3129}
    3230closedir($dh);
    3331       
    34 
    3532$template->assign(array(
    3633        'ICON_COLOR' => $conf['comments_on_albums']['icon_color'],
     
    3835));
    3936
    40 
    4137$template->set_filenames(array('plugin_admin_content' => dirname(__FILE__).'/template/config.tpl'));
    4238$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
     39
    4340?>
Note: See TracChangeset for help on using the changeset viewer.