Dotclear


Ignore:
Timestamp:
02/18/18 18:16:29 (7 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

use strict and no more linter warnings/errors as far as possible, switch from inline js to separate loaded file

Location:
plugins/blowupConfig
Files:
1 added
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • plugins/blowupConfig/index.php

    r3421 r3709  
    1010# 
    1111# -- END LICENSE BLOCK ----------------------------------------- 
    12 if (!defined('DC_CONTEXT_ADMIN')) { return; } 
    13  
    14 require dirname(__FILE__).'/lib/class.blowup.config.php'; 
     12if (!defined('DC_CONTEXT_ADMIN')) {return;} 
     13 
     14require dirname(__FILE__) . '/lib/class.blowup.config.php'; 
    1515 
    1616$can_write_images = blowupConfig::canWriteImages(); 
    17 $can_write_css = blowupConfig::canWriteCss(); 
     17$can_write_css    = blowupConfig::canWriteCss(); 
    1818 
    1919if ($core->error->flag()) { 
    20           $notices = $core->error->toHTML(); 
    21           $core->error->reset(); 
     20    $notices = $core->error->toHTML(); 
     21    $core->error->reset(); 
    2222} 
    2323 
    2424$blowup_base = array( 
    25      'body_bg_c' => null, 
    26      'body_bg_g' => 'light', 
    27  
    28      'body_txt_f' => null, 
    29      'body_txt_s' => null, 
    30      'body_txt_c' => null, 
    31      'body_line_height' => null, 
    32  
    33      'top_image' => 'default', 
    34      'top_height' => null, 
    35      'uploaded' => null, 
    36  
    37      'blog_title_hide' => null, 
    38      'blog_title_f' => null, 
    39      'blog_title_s' => null, 
    40      'blog_title_c' => null, 
    41      'blog_title_a' => null, 
    42      'blog_title_p' => null, 
    43  
    44      'body_link_c' => null, 
    45      'body_link_f_c' => null, 
    46      'body_link_v_c' => null, 
    47  
    48      'sidebar_position' => null, 
    49      'sidebar_text_f' => null, 
    50      'sidebar_text_s' => null, 
    51      'sidebar_text_c' => null, 
    52      'sidebar_title_f' => null, 
    53      'sidebar_title_s' => null, 
    54      'sidebar_title_c' => null, 
    55      'sidebar_title2_f' => null, 
    56      'sidebar_title2_s' => null, 
    57      'sidebar_title2_c' => null, 
    58      'sidebar_line_c' => null, 
    59      'sidebar_link_c' => null, 
    60      'sidebar_link_f_c' => null, 
    61      'sidebar_link_v_c' => null, 
    62  
    63      'date_title_f' => null, 
    64      'date_title_s' => null, 
    65      'date_title_c' => null, 
    66  
    67      'post_title_f' => null, 
    68      'post_title_s' => null, 
    69      'post_title_c' => null, 
    70      'post_comment_bg_c' => null, 
    71      'post_comment_c' => null, 
    72      'post_commentmy_bg_c' => null, 
    73      'post_commentmy_c' => null, 
    74  
    75      'prelude_c' => null, 
    76      'footer_f' => null, 
    77      'footer_s' => null, 
    78      'footer_c' => null, 
    79      'footer_l_c' => null, 
    80      'footer_bg_c' => null, 
    81  
    82      'extra_css' => null 
     25    'body_bg_c'          => null, 
     26    'body_bg_g'          => 'light', 
     27 
     28    'body_txt_f'          => null, 
     29    'body_txt_s'          => null, 
     30    'body_txt_c'          => null, 
     31    'body_line_height'    => null, 
     32 
     33    'top_image'          => 'default', 
     34    'top_height'          => null, 
     35    'uploaded'            => null, 
     36 
     37    'blog_title_hide'    => null, 
     38    'blog_title_f'        => null, 
     39    'blog_title_s'        => null, 
     40    'blog_title_c'        => null, 
     41    'blog_title_a'        => null, 
     42    'blog_title_p'        => null, 
     43 
     44    'body_link_c'        => null, 
     45    'body_link_f_c'      => null, 
     46    'body_link_v_c'      => null, 
     47 
     48    'sidebar_position'    => null, 
     49    'sidebar_text_f'      => null, 
     50    'sidebar_text_s'      => null, 
     51    'sidebar_text_c'      => null, 
     52    'sidebar_title_f'    => null, 
     53    'sidebar_title_s'    => null, 
     54    'sidebar_title_c'    => null, 
     55    'sidebar_title2_f'    => null, 
     56    'sidebar_title2_s'    => null, 
     57    'sidebar_title2_c'    => null, 
     58    'sidebar_line_c'      => null, 
     59    'sidebar_link_c'      => null, 
     60    'sidebar_link_f_c'    => null, 
     61    'sidebar_link_v_c'    => null, 
     62 
     63    'date_title_f'        => null, 
     64    'date_title_s'        => null, 
     65    'date_title_c'        => null, 
     66 
     67    'post_title_f'        => null, 
     68    'post_title_s'        => null, 
     69    'post_title_c'        => null, 
     70    'post_comment_bg_c'  => null, 
     71    'post_comment_c'      => null, 
     72    'post_commentmy_bg_c' => null, 
     73    'post_commentmy_c'    => null, 
     74 
     75    'prelude_c'          => null, 
     76    'footer_f'            => null, 
     77    'footer_s'            => null, 
     78    'footer_c'            => null, 
     79    'footer_l_c'          => null, 
     80    'footer_bg_c'        => null, 
     81 
     82    'extra_css'          => null 
    8383); 
    8484 
     
    8787$blowup_user = @unserialize($blowup_user); 
    8888if (!is_array($blowup_user)) { 
    89      $blowup_user = array(); 
    90 } 
    91  
    92 $blowup_user = array_merge($blowup_base,$blowup_user); 
     89    $blowup_user = array(); 
     90} 
     91 
     92$blowup_user = array_merge($blowup_base, $blowup_user); 
    9393 
    9494$gradient_types = array( 
    95      __('Light linear gradient') => 'light', 
    96      __('Medium linear gradient') => 'medium', 
    97      __('Dark linear gradient') => 'dark', 
    98      __('Solid color') => 'solid' 
     95    __('Light linear gradient') => 'light', 
     96    __('Medium linear gradient') => 'medium', 
     97    __('Dark linear gradient')  => 'dark', 
     98    __('Solid color')            => 'solid' 
    9999); 
    100100 
    101101$top_images = array(__('Custom...') => 'custom'); 
    102 $top_images = array_merge($top_images,array_flip(blowupConfig::$top_images)); 
    103  
    104  
    105 if (!empty($_POST)) 
    106 { 
    107      try 
    108      { 
    109           $blowup_user['body_txt_f'] = $_POST['body_txt_f']; 
    110           $blowup_user['body_txt_s'] = dcThemeConfig::adjustFontSize($_POST['body_txt_s']); 
    111           $blowup_user['body_txt_c'] = dcThemeConfig::adjustColor($_POST['body_txt_c']); 
    112           $blowup_user['body_line_height'] = dcThemeConfig::adjustFontSize($_POST['body_line_height']); 
    113  
    114           $blowup_user['blog_title_hide'] = (integer) !empty($_POST['blog_title_hide']); 
    115           $update_blog_title = !$blowup_user['blog_title_hide'] && ( 
    116                !empty($_POST['blog_title_f']) || !empty($_POST['blog_title_s']) || 
    117                !empty($_POST['blog_title_c']) || !empty($_POST['blog_title_a']) || 
    118                !empty($_POST['blog_title_p']) 
    119           ); 
    120  
    121           if ($update_blog_title) 
    122           { 
    123                $blowup_user['blog_title_f'] = $_POST['blog_title_f']; 
    124                $blowup_user['blog_title_s'] = dcThemeConfig::adjustFontSize($_POST['blog_title_s']); 
    125                $blowup_user['blog_title_c'] = dcThemeConfig::adjustColor($_POST['blog_title_c']); 
    126                $blowup_user['blog_title_a'] = preg_match('/^(left|center|right)$/',$_POST['blog_title_a']) ? $_POST['blog_title_a'] : null; 
    127                $blowup_user['blog_title_p'] = dcThemeConfig::adjustPosition($_POST['blog_title_p']); 
    128           } 
    129  
    130           $blowup_user['body_link_c'] = dcThemeConfig::adjustColor($_POST['body_link_c']); 
    131           $blowup_user['body_link_f_c'] = dcThemeConfig::adjustColor($_POST['body_link_f_c']); 
    132           $blowup_user['body_link_v_c'] = dcThemeConfig::adjustColor($_POST['body_link_v_c']); 
    133  
    134           $blowup_user['sidebar_text_f'] = $_POST['sidebar_text_f']; 
    135           $blowup_user['sidebar_text_s'] = dcThemeConfig::adjustFontSize($_POST['sidebar_text_s']); 
    136           $blowup_user['sidebar_text_c'] = dcThemeConfig::adjustColor($_POST['sidebar_text_c']); 
    137           $blowup_user['sidebar_title_f'] = $_POST['sidebar_title_f']; 
    138           $blowup_user['sidebar_title_s'] = dcThemeConfig::adjustFontSize($_POST['sidebar_title_s']); 
    139           $blowup_user['sidebar_title_c'] = dcThemeConfig::adjustColor($_POST['sidebar_title_c']); 
    140           $blowup_user['sidebar_title2_f'] = $_POST['sidebar_title2_f']; 
    141           $blowup_user['sidebar_title2_s'] = dcThemeConfig::adjustFontSize($_POST['sidebar_title2_s']); 
    142           $blowup_user['sidebar_title2_c'] = dcThemeConfig::adjustColor($_POST['sidebar_title2_c']); 
    143           $blowup_user['sidebar_line_c'] = dcThemeConfig::adjustColor($_POST['sidebar_line_c']); 
    144           $blowup_user['sidebar_link_c'] = dcThemeConfig::adjustColor($_POST['sidebar_link_c']); 
    145           $blowup_user['sidebar_link_f_c'] = dcThemeConfig::adjustColor($_POST['sidebar_link_f_c']); 
    146           $blowup_user['sidebar_link_v_c'] = dcThemeConfig::adjustColor($_POST['sidebar_link_v_c']); 
    147  
    148           $blowup_user['sidebar_position'] = ($_POST['sidebar_position'] == 'left') ? 'left' : null; 
    149  
    150           $blowup_user['date_title_f'] = $_POST['date_title_f']; 
    151           $blowup_user['date_title_s'] = dcThemeConfig::adjustFontSize($_POST['date_title_s']); 
    152           $blowup_user['date_title_c'] = dcThemeConfig::adjustColor($_POST['date_title_c']); 
    153  
    154           $blowup_user['post_title_f'] = $_POST['post_title_f']; 
    155           $blowup_user['post_title_s'] = dcThemeConfig::adjustFontSize($_POST['post_title_s']); 
    156           $blowup_user['post_title_c'] = dcThemeConfig::adjustColor($_POST['post_title_c']); 
    157           $blowup_user['post_comment_c'] = dcThemeConfig::adjustColor($_POST['post_comment_c']); 
    158           $blowup_user['post_commentmy_c'] = dcThemeConfig::adjustColor($_POST['post_commentmy_c']); 
    159  
    160  
    161           $blowup_user['footer_f'] = $_POST['footer_f']; 
    162           $blowup_user['footer_s'] = dcThemeConfig::adjustFontSize($_POST['footer_s']); 
    163           $blowup_user['footer_c'] = dcThemeConfig::adjustColor($_POST['footer_c']); 
    164           $blowup_user['footer_l_c'] = dcThemeConfig::adjustColor($_POST['footer_l_c']); 
    165           $blowup_user['footer_bg_c'] = dcThemeConfig::adjustColor($_POST['footer_bg_c']); 
    166  
    167  
    168           $blowup_user['extra_css'] = dcThemeConfig::cleanCSS($_POST['extra_css']); 
    169  
    170           if ($can_write_images) 
    171           { 
    172                $uploaded = null; 
    173                if ($blowup_user['uploaded'] && is_file(blowupConfig::imagesPath().'/'.$blowup_user['uploaded'])) { 
    174                     $uploaded = blowupConfig::imagesPath().'/'.$blowup_user['uploaded']; 
    175                } 
    176  
    177                if (!empty($_FILES['upfile']) && !empty($_FILES['upfile']['name'])) { 
    178                     files::uploadStatus($_FILES['upfile']); 
    179                     $uploaded = blowupConfig::uploadImage($_FILES['upfile']); 
    180                     $blowup_user['uploaded'] = basename($uploaded); 
    181                } 
    182  
    183                $blowup_user['top_image'] = in_array($_POST['top_image'],$top_images) ? $_POST['top_image'] : 'default'; 
    184  
    185                $blowup_user['body_bg_c'] = dcThemeConfig::adjustColor($_POST['body_bg_c']); 
    186                $blowup_user['body_bg_g'] = in_array($_POST['body_bg_g'],$gradient_types) ? $_POST['body_bg_g'] : ''; 
    187                $blowup_user['post_comment_bg_c'] = dcThemeConfig::adjustColor($_POST['post_comment_bg_c']); 
    188                $blowup_user['post_commentmy_bg_c'] = dcThemeConfig::adjustColor($_POST['post_commentmy_bg_c']); 
    189                $blowup_user['prelude_c'] = dcThemeConfig::adjustColor($_POST['prelude_c']); 
    190                blowupConfig::createImages($blowup_user,$uploaded); 
    191           } 
    192  
    193           if ($can_write_css) 
    194           { 
    195                blowupConfig::createCss($blowup_user); 
    196           } 
    197  
    198           $core->blog->settings->addNamespace('themes'); 
    199           $core->blog->settings->themes->put('blowup_style',serialize($blowup_user)); 
    200           $core->blog->triggerBlog(); 
    201  
    202           dcPage::addSuccessNotice(__('Theme configuration has been successfully updated.')); 
    203           http::redirect($p_url); 
    204      } 
    205      catch (Exception $e) 
    206      { 
    207           $core->error->add($e->getMessage()); 
    208      } 
     102$top_images = array_merge($top_images, array_flip(blowupConfig::$top_images)); 
     103 
     104if (!empty($_POST)) { 
     105    try 
     106    { 
     107        $blowup_user['body_txt_f']       = $_POST['body_txt_f']; 
     108        $blowup_user['body_txt_s']       = dcThemeConfig::adjustFontSize($_POST['body_txt_s']); 
     109        $blowup_user['body_txt_c']       = dcThemeConfig::adjustColor($_POST['body_txt_c']); 
     110        $blowup_user['body_line_height'] = dcThemeConfig::adjustFontSize($_POST['body_line_height']); 
     111 
     112        $blowup_user['blog_title_hide'] = (integer) !empty($_POST['blog_title_hide']); 
     113        $update_blog_title              = !$blowup_user['blog_title_hide'] && ( 
     114            !empty($_POST['blog_title_f']) || !empty($_POST['blog_title_s']) || 
     115            !empty($_POST['blog_title_c']) || !empty($_POST['blog_title_a']) || 
     116            !empty($_POST['blog_title_p']) 
     117        ); 
     118 
     119        if ($update_blog_title) { 
     120            $blowup_user['blog_title_f'] = $_POST['blog_title_f']; 
     121            $blowup_user['blog_title_s'] = dcThemeConfig::adjustFontSize($_POST['blog_title_s']); 
     122            $blowup_user['blog_title_c'] = dcThemeConfig::adjustColor($_POST['blog_title_c']); 
     123            $blowup_user['blog_title_a'] = preg_match('/^(left|center|right)$/', $_POST['blog_title_a']) ? $_POST['blog_title_a'] : null; 
     124            $blowup_user['blog_title_p'] = dcThemeConfig::adjustPosition($_POST['blog_title_p']); 
     125        } 
     126 
     127        $blowup_user['body_link_c']   = dcThemeConfig::adjustColor($_POST['body_link_c']); 
     128        $blowup_user['body_link_f_c'] = dcThemeConfig::adjustColor($_POST['body_link_f_c']); 
     129        $blowup_user['body_link_v_c'] = dcThemeConfig::adjustColor($_POST['body_link_v_c']); 
     130 
     131        $blowup_user['sidebar_text_f']   = $_POST['sidebar_text_f']; 
     132        $blowup_user['sidebar_text_s']   = dcThemeConfig::adjustFontSize($_POST['sidebar_text_s']); 
     133        $blowup_user['sidebar_text_c']   = dcThemeConfig::adjustColor($_POST['sidebar_text_c']); 
     134        $blowup_user['sidebar_title_f']  = $_POST['sidebar_title_f']; 
     135        $blowup_user['sidebar_title_s']  = dcThemeConfig::adjustFontSize($_POST['sidebar_title_s']); 
     136        $blowup_user['sidebar_title_c']  = dcThemeConfig::adjustColor($_POST['sidebar_title_c']); 
     137        $blowup_user['sidebar_title2_f'] = $_POST['sidebar_title2_f']; 
     138        $blowup_user['sidebar_title2_s'] = dcThemeConfig::adjustFontSize($_POST['sidebar_title2_s']); 
     139        $blowup_user['sidebar_title2_c'] = dcThemeConfig::adjustColor($_POST['sidebar_title2_c']); 
     140        $blowup_user['sidebar_line_c']   = dcThemeConfig::adjustColor($_POST['sidebar_line_c']); 
     141        $blowup_user['sidebar_link_c']   = dcThemeConfig::adjustColor($_POST['sidebar_link_c']); 
     142        $blowup_user['sidebar_link_f_c'] = dcThemeConfig::adjustColor($_POST['sidebar_link_f_c']); 
     143        $blowup_user['sidebar_link_v_c'] = dcThemeConfig::adjustColor($_POST['sidebar_link_v_c']); 
     144 
     145        $blowup_user['sidebar_position'] = ($_POST['sidebar_position'] == 'left') ? 'left' : null; 
     146 
     147        $blowup_user['date_title_f'] = $_POST['date_title_f']; 
     148        $blowup_user['date_title_s'] = dcThemeConfig::adjustFontSize($_POST['date_title_s']); 
     149        $blowup_user['date_title_c'] = dcThemeConfig::adjustColor($_POST['date_title_c']); 
     150 
     151        $blowup_user['post_title_f']     = $_POST['post_title_f']; 
     152        $blowup_user['post_title_s']     = dcThemeConfig::adjustFontSize($_POST['post_title_s']); 
     153        $blowup_user['post_title_c']     = dcThemeConfig::adjustColor($_POST['post_title_c']); 
     154        $blowup_user['post_comment_c']   = dcThemeConfig::adjustColor($_POST['post_comment_c']); 
     155        $blowup_user['post_commentmy_c'] = dcThemeConfig::adjustColor($_POST['post_commentmy_c']); 
     156 
     157        $blowup_user['footer_f']    = $_POST['footer_f']; 
     158        $blowup_user['footer_s']    = dcThemeConfig::adjustFontSize($_POST['footer_s']); 
     159        $blowup_user['footer_c']    = dcThemeConfig::adjustColor($_POST['footer_c']); 
     160        $blowup_user['footer_l_c']  = dcThemeConfig::adjustColor($_POST['footer_l_c']); 
     161        $blowup_user['footer_bg_c'] = dcThemeConfig::adjustColor($_POST['footer_bg_c']); 
     162 
     163        $blowup_user['extra_css'] = dcThemeConfig::cleanCSS($_POST['extra_css']); 
     164 
     165        if ($can_write_images) { 
     166            $uploaded = null; 
     167            if ($blowup_user['uploaded'] && is_file(blowupConfig::imagesPath() . '/' . $blowup_user['uploaded'])) { 
     168                $uploaded = blowupConfig::imagesPath() . '/' . $blowup_user['uploaded']; 
     169            } 
     170 
     171            if (!empty($_FILES['upfile']) && !empty($_FILES['upfile']['name'])) { 
     172                files::uploadStatus($_FILES['upfile']); 
     173                $uploaded                = blowupConfig::uploadImage($_FILES['upfile']); 
     174                $blowup_user['uploaded'] = basename($uploaded); 
     175            } 
     176 
     177            $blowup_user['top_image'] = in_array($_POST['top_image'], $top_images) ? $_POST['top_image'] : 'default'; 
     178 
     179            $blowup_user['body_bg_c']           = dcThemeConfig::adjustColor($_POST['body_bg_c']); 
     180            $blowup_user['body_bg_g']           = in_array($_POST['body_bg_g'], $gradient_types) ? $_POST['body_bg_g'] : ''; 
     181            $blowup_user['post_comment_bg_c']   = dcThemeConfig::adjustColor($_POST['post_comment_bg_c']); 
     182            $blowup_user['post_commentmy_bg_c'] = dcThemeConfig::adjustColor($_POST['post_commentmy_bg_c']); 
     183            $blowup_user['prelude_c']           = dcThemeConfig::adjustColor($_POST['prelude_c']); 
     184            blowupConfig::createImages($blowup_user, $uploaded); 
     185        } 
     186 
     187        if ($can_write_css) { 
     188            blowupConfig::createCss($blowup_user); 
     189        } 
     190 
     191        $core->blog->settings->addNamespace('themes'); 
     192        $core->blog->settings->themes->put('blowup_style', serialize($blowup_user)); 
     193        $core->blog->triggerBlog(); 
     194 
     195        dcPage::addSuccessNotice(__('Theme configuration has been successfully updated.')); 
     196        http::redirect($p_url); 
     197    } catch (Exception $e) { 
     198        $core->error->add($e->getMessage()); 
     199    } 
    209200} 
    210201?> 
     
    212203<head> 
    213204  <title><?php echo __('Blowup configuration'); ?></title> 
    214   <?php echo dcPage::jsLoad(dcPage::getPF('blowupConfig/config.js')); ?> 
    215   <?php echo dcPage::jsColorPicker(); ?> 
    216   <script type="text/javascript"> 
    217205  <?php 
    218   echo dcPage::jsVar('dotclear.blowup_public_url',blowupConfig::imagesURL()); 
    219   echo dcPage::jsVar('dotclear.msg.predefined_styles',__('Predefined styles')); 
    220   echo dcPage::jsVar('dotclear.msg.apply_code',__('Apply code')); 
    221   echo dcPage::jsVar('dotclear.msg.predefined_style_title',__('Choose a predefined style')); 
    222   ?> 
    223   </script> 
     206echo dcPage::jsLoad(dcPage::getPF('blowupConfig/js/config.js')); 
     207echo dcPage::jsColorPicker(); 
     208echo dcPage::jsVars(array( 
     209    'dotclear.blowup_public_url'          => blowupConfig::imagesURL(), 
     210    'dotclear.msg.predefined_styles'      => __('Predefined styles'), 
     211    'dotclear.msg.apply_code'             => __('Apply code'), 
     212    'dotclear.msg.predefined_style_title' => __('Choose a predefined style') 
     213)); 
     214?> 
    224215</head> 
    225216 
     
    227218<?php 
    228219echo dcPage::breadcrumb( 
    229      array( 
    230           html::escapeHTML($core->blog->name) => '', 
    231           __('Blog appearance') => $core->adminurl->get('admin.blog.theme'), 
    232           __('Blowup configuration') => '' 
    233      )).dcPage::notices(); 
    234  
    235 echo 
    236 '<p><a class="back" href="'.$core->adminurl->get('admin.blog.theme').'">'.__('Back to Blog appearance').'</a></p>'; 
    237  
     220    array( 
     221        html::escapeHTML($core->blog->name) => '', 
     222        __('Blog appearance')               => $core->adminurl->get('admin.blog.theme'), 
     223        __('Blowup configuration')          => '' 
     224    )) . dcPage::notices(); 
     225 
     226echo 
     227'<p><a class="back" href="' . $core->adminurl->get('admin.blog.theme') . '">' . __('Back to Blog appearance') . '</a></p>'; 
    238228 
    239229if (!$can_write_images) { 
    240      dcPage::message(__('For the following reasons, images cannot be created. You won\'t be able to change some background properties.'). 
    241           $notices,false,true); 
    242 } 
    243  
    244 echo '<form id="theme_config" action="'.$p_url.'" method="post" enctype="multipart/form-data">'; 
    245  
    246 echo '<div class="fieldset"><h3>'.__('Customization').'</h3>'. 
    247 '<h4>'.__('General').'</h4>'; 
     230    dcPage::message(__('For the following reasons, images cannot be created. You won\'t be able to change some background properties.') . 
     231        $notices, false, true); 
     232} 
     233 
     234echo '<form id="theme_config" action="' . $p_url . '" method="post" enctype="multipart/form-data">'; 
     235 
     236echo '<div class="fieldset"><h3>' . __('Customization') . '</h3>' . 
     237'<h4>' . __('General') . '</h4>'; 
    248238 
    249239if ($can_write_images) { 
    250      echo 
    251      '<p class="field"><label for="body_bg_c">'.__('Background color:').'</label> '. 
    252      form::field('body_bg_c',7,7,$blowup_user['body_bg_c'],'colorpicker').'</p>'. 
    253  
    254      '<p class="field"><label for="body_bg_g">'.__('Background color fill:').'</label> '. 
    255      form::combo('body_bg_g',$gradient_types,$blowup_user['body_bg_g']).'</p>'; 
    256 } 
    257  
    258 echo 
    259 '<p class="field"><label for="body_txt_f">'.__('Main text font:').'</label> '. 
    260 form::combo('body_txt_f',blowupConfig::fontsList(),$blowup_user['body_txt_f']).'</p>'. 
    261  
    262 '<p class="field"><label for="body_txt_s">'.__('Main text font size:').'</label> '. 
    263 form::field('body_txt_s',7,7,$blowup_user['body_txt_s']).'</p>'. 
    264  
    265 '<p class="field"><label for="body_txt_c">'.__('Main text color:').'</label> '. 
    266 form::field('body_txt_c',7,7,$blowup_user['body_txt_c'],'colorpicker').'</p>'. 
    267  
    268 '<p class="field"><label for="body_line_height">'.__('Text line height:').'</label> '. 
    269 form::field('body_line_height',7,7,$blowup_user['body_line_height']).'</p>'. 
    270  
    271 '<h4 class="border-top">'.__('Links').'</h4>'. 
    272 '<p class="field"><label for="body_link_c">'.__('Links color:').'</label> '. 
    273 form::field('body_link_c',7,7,$blowup_user['body_link_c'],'colorpicker').'</p>'. 
    274  
    275 '<p class="field"><label for="body_link_v_c">'.__('Visited links color:').'</label> '. 
    276 form::field('body_link_v_c',7,7,$blowup_user['body_link_v_c'],'colorpicker').'</p>'. 
    277  
    278 '<p class="field"><label for="body_link_f_c">'.__('Focus links color:').'</label> '. 
    279 form::field('body_link_f_c',7,7,$blowup_user['body_link_f_c'],'colorpicker').'</p>'. 
    280  
    281 '<h4 class="border-top">'.__('Page top').'</h4>'; 
     240    echo 
     241    '<p class="field"><label for="body_bg_c">' . __('Background color:') . '</label> ' . 
     242    form::field('body_bg_c', 7, 7, $blowup_user['body_bg_c'], 'colorpicker') . '</p>' . 
     243 
     244    '<p class="field"><label for="body_bg_g">' . __('Background color fill:') . '</label> ' . 
     245    form::combo('body_bg_g', $gradient_types, $blowup_user['body_bg_g']) . '</p>'; 
     246} 
     247 
     248echo 
     249'<p class="field"><label for="body_txt_f">' . __('Main text font:') . '</label> ' . 
     250form::combo('body_txt_f', blowupConfig::fontsList(), $blowup_user['body_txt_f']) . '</p>' . 
     251 
     252'<p class="field"><label for="body_txt_s">' . __('Main text font size:') . '</label> ' . 
     253form::field('body_txt_s', 7, 7, $blowup_user['body_txt_s']) . '</p>' . 
     254 
     255'<p class="field"><label for="body_txt_c">' . __('Main text color:') . '</label> ' . 
     256form::field('body_txt_c', 7, 7, $blowup_user['body_txt_c'], 'colorpicker') . '</p>' . 
     257 
     258'<p class="field"><label for="body_line_height">' . __('Text line height:') . '</label> ' . 
     259form::field('body_line_height', 7, 7, $blowup_user['body_line_height']) . '</p>' . 
     260 
     261'<h4 class="border-top">' . __('Links') . '</h4>' . 
     262'<p class="field"><label for="body_link_c">' . __('Links color:') . '</label> ' . 
     263form::field('body_link_c', 7, 7, $blowup_user['body_link_c'], 'colorpicker') . '</p>' . 
     264 
     265'<p class="field"><label for="body_link_v_c">' . __('Visited links color:') . '</label> ' . 
     266form::field('body_link_v_c', 7, 7, $blowup_user['body_link_v_c'], 'colorpicker') . '</p>' . 
     267 
     268'<p class="field"><label for="body_link_f_c">' . __('Focus links color:') . '</label> ' . 
     269form::field('body_link_f_c', 7, 7, $blowup_user['body_link_f_c'], 'colorpicker') . '</p>' . 
     270 
     271'<h4 class="border-top">' . __('Page top') . '</h4>'; 
    282272 
    283273if ($can_write_images) { 
    284      echo 
    285      '<p class="field"><label for="prelude_c">'.__('Prelude color:').'</label> '. 
    286      form::field('prelude_c',7,7,$blowup_user['prelude_c'],'colorpicker').'</p>'; 
    287 } 
    288  
    289 echo 
    290 '<p class="field"><label for="blog_title_hide">'.__('Hide main title').'</label> '. 
    291 form::checkbox('blog_title_hide',1,$blowup_user['blog_title_hide']).'</p>'. 
    292  
    293 '<p class="field"><label for="blog_title_f">'.__('Main title font:').'</label> '. 
    294 form::combo('blog_title_f',blowupConfig::fontsList(),$blowup_user['blog_title_f']).'</p>'. 
    295  
    296 '<p class="field"><label for="blog_title_s">'.__('Main title font size:').'</label> '. 
    297 form::field('blog_title_s',7,7,$blowup_user['blog_title_s']).'</p>'. 
    298  
    299 '<p class="field"><label for="blog_title_c">'.__('Main title color:').'</label> '. 
    300 form::field('blog_title_c',7,7,$blowup_user['blog_title_c'],'colorpicker').'</p>'. 
    301  
    302 '<p class="field"><label for="blog_title_a">'.__('Main title alignment:').'</label> '. 
    303 form::combo('blog_title_a',array(__('center')=>'center',__('left')=>'left',__('right')=>'right'),$blowup_user['blog_title_a']).'</p>'. 
    304  
    305 '<p class="field"><label for="blog_title_p">'.__('Main title position (x:y)').'</label> '. 
    306 form::field('blog_title_p',7,7,$blowup_user['blog_title_p']).'</p>'; 
     274    echo 
     275    '<p class="field"><label for="prelude_c">' . __('Prelude color:') . '</label> ' . 
     276    form::field('prelude_c', 7, 7, $blowup_user['prelude_c'], 'colorpicker') . '</p>'; 
     277} 
     278 
     279echo 
     280'<p class="field"><label for="blog_title_hide">' . __('Hide main title') . '</label> ' . 
     281form::checkbox('blog_title_hide', 1, $blowup_user['blog_title_hide']) . '</p>' . 
     282 
     283'<p class="field"><label for="blog_title_f">' . __('Main title font:') . '</label> ' . 
     284form::combo('blog_title_f', blowupConfig::fontsList(), $blowup_user['blog_title_f']) . '</p>' . 
     285 
     286'<p class="field"><label for="blog_title_s">' . __('Main title font size:') . '</label> ' . 
     287form::field('blog_title_s', 7, 7, $blowup_user['blog_title_s']) . '</p>' . 
     288 
     289'<p class="field"><label for="blog_title_c">' . __('Main title color:') . '</label> ' . 
     290form::field('blog_title_c', 7, 7, $blowup_user['blog_title_c'], 'colorpicker') . '</p>' . 
     291 
     292'<p class="field"><label for="blog_title_a">' . __('Main title alignment:') . '</label> ' . 
     293form::combo('blog_title_a', array(__('center') => 'center', __('left') => 'left', __('right') => 'right'), $blowup_user['blog_title_a']) . '</p>' . 
     294 
     295'<p class="field"><label for="blog_title_p">' . __('Main title position (x:y)') . '</label> ' . 
     296form::field('blog_title_p', 7, 7, $blowup_user['blog_title_p']) . '</p>'; 
    307297 
    308298if ($can_write_images) { 
    309      if ($blowup_user['top_image'] == 'custom' && $blowup_user['uploaded']) { 
    310           $preview_image = http::concatURL($core->blog->url,blowupConfig::imagesURL().'/page-t.png'); 
    311      } else { 
    312           $preview_image = dcPage::getPF('blowupConfig/alpha-img/page-t/'.$blowup_user['top_image'].'.png'); 
    313      } 
    314  
    315      echo 
    316      '<h5 class="pretty-title">'.__('Top image').'</h5>'. 
    317      '<p class="field"><label for="top_image">'.__('Top image').'</label> '. 
    318      form::combo('top_image',$top_images,($blowup_user['top_image'] ?: 'default')).'</p>'. 
    319      '<p>'.__('Choose "Custom..." to upload your own image.').'</p>'. 
    320  
    321      '<p id="uploader"><label for="upfile">'.__('Add your image:').'</label> '. 
    322      ' ('.sprintf(__('JPEG or PNG file, 800 pixels wide, maximum size %s'),files::size(DC_MAX_UPLOAD_SIZE)).')'. 
    323      '<input type="file" name="upfile" id="upfile" size="35" />'. 
    324      '</p>'. 
    325  
    326      '<h5>'.__('Preview').'</h5>'. 
    327      '<div class="grid" style="width:800px;border:1px solid #ccc;">'. 
    328      '<img style="display:block;" src="'.$preview_image.'" alt="" id="image-preview" />'. 
    329      '</div>'; 
    330 } 
    331  
    332 echo 
    333 '<h4 class="border-top">'.__('Sidebar').'</h4>'. 
    334 '<p class="field"><label for="sidebar_position">'.__('Sidebar position:').'</label> '. 
    335 form::combo('sidebar_position',array(__('right')=>'right',__('left')=>'left'),$blowup_user['sidebar_position']).'</p>'. 
    336  
    337 '<p class="field"><label for="sidebar_text_f">'.__('Sidebar text font:').'</label> '. 
    338 form::combo('sidebar_text_f',blowupConfig::fontsList(),$blowup_user['sidebar_text_f']).'</p>'. 
    339  
    340 '<p class="field"><label for="sidebar_text_s">'.__('Sidebar text font size:').'</label> '. 
    341 form::field('sidebar_text_s',7,7,$blowup_user['sidebar_text_s']).'</p>'. 
    342  
    343 '<p class="field"><label for="sidebar_text_c">'.__('Sidebar text color:').'</label> '. 
    344 form::field('sidebar_text_c',7,7,$blowup_user['sidebar_text_c'],'colorpicker').'</p>'. 
    345  
    346 '<p class="field"><label for="sidebar_title_f">'.__('Sidebar titles font:').'</label> '. 
    347 form::combo('sidebar_title_f',blowupConfig::fontsList(),$blowup_user['sidebar_title_f']).'</p>'. 
    348  
    349 '<p class="field"><label for="sidebar_title_s">'.__('Sidebar titles font size:').'</label> '. 
    350 form::field('sidebar_title_s',7,7,$blowup_user['sidebar_title_s']).'</p>'. 
    351  
    352 '<p class="field"><label for="sidebar_title_c">'.__('Sidebar titles color:').'</label> '. 
    353 form::field('sidebar_title_c',7,7,$blowup_user['sidebar_title_c'],'colorpicker').'</p>'. 
    354  
    355 '<p class="field"><label for="sidebar_title2_f">'.__('Sidebar 2nd level titles font:').'</label> '. 
    356 form::combo('sidebar_title2_f',blowupConfig::fontsList(),$blowup_user['sidebar_title2_f']).'</p>'. 
    357  
    358 '<p class="field"><label for="sidebar_title2_s">'.__('Sidebar 2nd level titles font size:').'</label> '. 
    359 form::field('sidebar_title2_s',7,7,$blowup_user['sidebar_title2_s']).'</p>'. 
    360  
    361 '<p class="field"><label for="sidebar_title2_c">'.__('Sidebar 2nd level titles color:').'</label> '. 
    362 form::field('sidebar_title2_c',7,7,$blowup_user['sidebar_title2_c'],'colorpicker').'</p>'. 
    363  
    364 '<p class="field"><label for="sidebar_line_c">'.__('Sidebar lines color:').'</label> '. 
    365 form::field('sidebar_line_c',7,7,$blowup_user['sidebar_line_c'],'colorpicker').'</p>'. 
    366  
    367 '<p class="field"><label for="sidebar_link_c">'.__('Sidebar links color:').'</label> '. 
    368 form::field('sidebar_link_c',7,7,$blowup_user['sidebar_link_c'],'colorpicker').'</p>'. 
    369  
    370 '<p class="field"><label for="sidebar_link_v_c">'.__('Sidebar visited links color:').'</label> '. 
    371 form::field('sidebar_link_v_c',7,7,$blowup_user['sidebar_link_v_c'],'colorpicker').'</p>'. 
    372  
    373 '<p class="field"><label for="sidebar_link_f_c">'.__('Sidebar focus links color:').'</label> '. 
    374 form::field('sidebar_link_f_c',7,7,$blowup_user['sidebar_link_f_c'],'colorpicker').'</p>'. 
    375  
    376 '<h4 class="border-top">'.__('Entries').'</h4>'. 
    377 '<p class="field"><label for="date_title_f">'.__('Date title font:').'</label> '. 
    378 form::combo('date_title_f',blowupConfig::fontsList(),$blowup_user['date_title_f']).'</p>'. 
    379  
    380 '<p class="field"><label for="date_title_s">'.__('Date title font size:').'</label> '. 
    381 form::field('date_title_s',7,7,$blowup_user['date_title_s']).'</p>'. 
    382  
    383 '<p class="field"><label for="date_title_c">'.__('Date title color:').'</label> '. 
    384 form::field('date_title_c',7,7,$blowup_user['date_title_c'],'colorpicker').'</p>'. 
    385  
    386 '<p class="field"><label for="post_title_f">'.__('Entry title font:').'</label> '. 
    387 form::combo('post_title_f',blowupConfig::fontsList(),$blowup_user['post_title_f']).'</p>'. 
    388  
    389 '<p class="field"><label for="post_title_s">'.__('Entry title font size:').'</label> '. 
    390 form::field('post_title_s',7,7,$blowup_user['post_title_s']).'</p>'. 
    391  
    392 '<p class="field"><label for="post_title_c">'.__('Entry title color:').'</label> '. 
    393 form::field('post_title_c',7,7,$blowup_user['post_title_c'],'colorpicker').'</p>'; 
     299    if ($blowup_user['top_image'] == 'custom' && $blowup_user['uploaded']) { 
     300        $preview_image = http::concatURL($core->blog->url, blowupConfig::imagesURL() . '/page-t.png'); 
     301    } else { 
     302        $preview_image = dcPage::getPF('blowupConfig/alpha-img/page-t/' . $blowup_user['top_image'] . '.png'); 
     303    } 
     304 
     305    echo 
     306    '<h5 class="pretty-title">' . __('Top image') . '</h5>' . 
     307    '<p class="field"><label for="top_image">' . __('Top image') . '</label> ' . 
     308    form::combo('top_image', $top_images, ($blowup_user['top_image'] ?: 'default')) . '</p>' . 
     309    '<p>' . __('Choose "Custom..." to upload your own image.') . '</p>' . 
     310 
     311    '<p id="uploader"><label for="upfile">' . __('Add your image:') . '</label> ' . 
     312    ' (' . sprintf(__('JPEG or PNG file, 800 pixels wide, maximum size %s'), files::size(DC_MAX_UPLOAD_SIZE)) . ')' . 
     313    '<input type="file" name="upfile" id="upfile" size="35" />' . 
     314    '</p>' . 
     315 
     316    '<h5>' . __('Preview') . '</h5>' . 
     317        '<div class="grid" style="width:800px;border:1px solid #ccc;">' . 
     318        '<img style="display:block;" src="' . $preview_image . '" alt="" id="image-preview" />' . 
     319        '</div>'; 
     320} 
     321 
     322echo 
     323'<h4 class="border-top">' . __('Sidebar') . '</h4>' . 
     324'<p class="field"><label for="sidebar_position">' . __('Sidebar position:') . '</label> ' . 
     325form::combo('sidebar_position', array(__('right') => 'right', __('left') => 'left'), $blowup_user['sidebar_position']) . '</p>' . 
     326 
     327'<p class="field"><label for="sidebar_text_f">' . __('Sidebar text font:') . '</label> ' . 
     328form::combo('sidebar_text_f', blowupConfig::fontsList(), $blowup_user['sidebar_text_f']) . '</p>' . 
     329 
     330'<p class="field"><label for="sidebar_text_s">' . __('Sidebar text font size:') . '</label> ' . 
     331form::field('sidebar_text_s', 7, 7, $blowup_user['sidebar_text_s']) . '</p>' . 
     332 
     333'<p class="field"><label for="sidebar_text_c">' . __('Sidebar text color:') . '</label> ' . 
     334form::field('sidebar_text_c', 7, 7, $blowup_user['sidebar_text_c'], 'colorpicker') . '</p>' . 
     335 
     336'<p class="field"><label for="sidebar_title_f">' . __('Sidebar titles font:') . '</label> ' . 
     337form::combo('sidebar_title_f', blowupConfig::fontsList(), $blowup_user['sidebar_title_f']) . '</p>' . 
     338 
     339'<p class="field"><label for="sidebar_title_s">' . __('Sidebar titles font size:') . '</label> ' . 
     340form::field('sidebar_title_s', 7, 7, $blowup_user['sidebar_title_s']) . '</p>' . 
     341 
     342'<p class="field"><label for="sidebar_title_c">' . __('Sidebar titles color:') . '</label> ' . 
     343form::field('sidebar_title_c', 7, 7, $blowup_user['sidebar_title_c'], 'colorpicker') . '</p>' . 
     344 
     345'<p class="field"><label for="sidebar_title2_f">' . __('Sidebar 2nd level titles font:') . '</label> ' . 
     346form::combo('sidebar_title2_f', blowupConfig::fontsList(), $blowup_user['sidebar_title2_f']) . '</p>' . 
     347 
     348'<p class="field"><label for="sidebar_title2_s">' . __('Sidebar 2nd level titles font size:') . '</label> ' . 
     349form::field('sidebar_title2_s', 7, 7, $blowup_user['sidebar_title2_s']) . '</p>' . 
     350 
     351'<p class="field"><label for="sidebar_title2_c">' . __('Sidebar 2nd level titles color:') . '</label> ' . 
     352form::field('sidebar_title2_c', 7, 7, $blowup_user['sidebar_title2_c'], 'colorpicker') . '</p>' . 
     353 
     354'<p class="field"><label for="sidebar_line_c">' . __('Sidebar lines color:') . '</label> ' . 
     355form::field('sidebar_line_c', 7, 7, $blowup_user['sidebar_line_c'], 'colorpicker') . '</p>' . 
     356 
     357'<p class="field"><label for="sidebar_link_c">' . __('Sidebar links color:') . '</label> ' . 
     358form::field('sidebar_link_c', 7, 7, $blowup_user['sidebar_link_c'], 'colorpicker') . '</p>' . 
     359 
     360'<p class="field"><label for="sidebar_link_v_c">' . __('Sidebar visited links color:') . '</label> ' . 
     361form::field('sidebar_link_v_c', 7, 7, $blowup_user['sidebar_link_v_c'], 'colorpicker') . '</p>' . 
     362 
     363'<p class="field"><label for="sidebar_link_f_c">' . __('Sidebar focus links color:') . '</label> ' . 
     364form::field('sidebar_link_f_c', 7, 7, $blowup_user['sidebar_link_f_c'], 'colorpicker') . '</p>' . 
     365 
     366'<h4 class="border-top">' . __('Entries') . '</h4>' . 
     367'<p class="field"><label for="date_title_f">' . __('Date title font:') . '</label> ' . 
     368form::combo('date_title_f', blowupConfig::fontsList(), $blowup_user['date_title_f']) . '</p>' . 
     369 
     370'<p class="field"><label for="date_title_s">' . __('Date title font size:') . '</label> ' . 
     371form::field('date_title_s', 7, 7, $blowup_user['date_title_s']) . '</p>' . 
     372 
     373'<p class="field"><label for="date_title_c">' . __('Date title color:') . '</label> ' . 
     374form::field('date_title_c', 7, 7, $blowup_user['date_title_c'], 'colorpicker') . '</p>' . 
     375 
     376'<p class="field"><label for="post_title_f">' . __('Entry title font:') . '</label> ' . 
     377form::combo('post_title_f', blowupConfig::fontsList(), $blowup_user['post_title_f']) . '</p>' . 
     378 
     379'<p class="field"><label for="post_title_s">' . __('Entry title font size:') . '</label> ' . 
     380form::field('post_title_s', 7, 7, $blowup_user['post_title_s']) . '</p>' . 
     381 
     382'<p class="field"><label for="post_title_c">' . __('Entry title color:') . '</label> ' . 
     383form::field('post_title_c', 7, 7, $blowup_user['post_title_c'], 'colorpicker') . '</p>'; 
    394384 
    395385if ($can_write_images) { 
    396      echo 
    397      '<p class="field"><label for="post_comment_bg_c">'.__('Comment background color:').'</label> '. 
    398      form::field('post_comment_bg_c',7,7,$blowup_user['post_comment_bg_c'],'colorpicker').'</p>'; 
    399 } 
    400  
    401 echo 
    402 '<p class="field"><label for="post_comment_c">'.__('Comment text color:').'</label> '. 
    403 form::field('post_comment_c',7,7,$blowup_user['post_comment_c'],'colorpicker').'</p>'; 
     386    echo 
     387    '<p class="field"><label for="post_comment_bg_c">' . __('Comment background color:') . '</label> ' . 
     388    form::field('post_comment_bg_c', 7, 7, $blowup_user['post_comment_bg_c'], 'colorpicker') . '</p>'; 
     389} 
     390 
     391echo 
     392'<p class="field"><label for="post_comment_c">' . __('Comment text color:') . '</label> ' . 
     393form::field('post_comment_c', 7, 7, $blowup_user['post_comment_c'], 'colorpicker') . '</p>'; 
    404394 
    405395if ($can_write_images) { 
    406      echo 
    407      '<p class="field"><label for="post_commentmy_bg_c">'.__('My comment background color:').'</label> '. 
    408      form::field('post_commentmy_bg_c',7,7,$blowup_user['post_commentmy_bg_c'],'colorpicker').'</p>'; 
    409 } 
    410  
    411 echo 
    412 '<p class="field"><label for="post_commentmy_c">'.__('My comment text color:').'</label> '. 
    413 form::field('post_commentmy_c',7,7,$blowup_user['post_commentmy_c'],'colorpicker').'</p>'. 
    414  
    415 '<h4 class="border-top">'.__('Footer').'</h4>'. 
    416 '<p class="field"><label for="footer_f">'.__('Footer font:').'</label> '. 
    417 form::combo('footer_f',blowupConfig::fontsList(),$blowup_user['footer_f']).'</p>'. 
    418  
    419 '<p class="field"><label for="footer_s">'.__('Footer font size:').'</label> '. 
    420 form::field('footer_s',7,7,$blowup_user['footer_s']).'</p>'. 
    421  
    422 '<p class="field"><label for="footer_c">'.__('Footer color:').'</label> '. 
    423 form::field('footer_c',7,7,$blowup_user['footer_c'],'colorpicker').'</p>'. 
    424  
    425 '<p class="field"><label for="footer_l_c">'.__('Footer links color:').'</label> '. 
    426 form::field('footer_l_c',7,7,$blowup_user['footer_l_c'],'colorpicker').'</p>'. 
    427  
    428 '<p class="field"><label for="footer_bg_c">'.__('Footer background color:').'</label> '. 
    429 form::field('footer_bg_c',7,7,$blowup_user['footer_bg_c'],'colorpicker').'</p>'; 
    430  
    431 echo 
    432 '<h4 class="border-top">'.__('Additional CSS').'</h4>'. 
    433 '<p><label for="extra_css">'.__('Any additional CSS styles (must be written using the CSS syntax):').'</label> '. 
    434 form::textarea('extra_css',72,5,html::escapeHTML($blowup_user['extra_css']),'maximal','',false,'title="'.__('Additional CSS').'"'). 
    435 '</p>'. 
    436 '</div>'; 
    437  
    438  
     396    echo 
     397    '<p class="field"><label for="post_commentmy_bg_c">' . __('My comment background color:') . '</label> ' . 
     398    form::field('post_commentmy_bg_c', 7, 7, $blowup_user['post_commentmy_bg_c'], 'colorpicker') . '</p>'; 
     399} 
     400 
     401echo 
     402'<p class="field"><label for="post_commentmy_c">' . __('My comment text color:') . '</label> ' . 
     403form::field('post_commentmy_c', 7, 7, $blowup_user['post_commentmy_c'], 'colorpicker') . '</p>' . 
     404 
     405'<h4 class="border-top">' . __('Footer') . '</h4>' . 
     406'<p class="field"><label for="footer_f">' . __('Footer font:') . '</label> ' . 
     407form::combo('footer_f', blowupConfig::fontsList(), $blowup_user['footer_f']) . '</p>' . 
     408 
     409'<p class="field"><label for="footer_s">' . __('Footer font size:') . '</label> ' . 
     410form::field('footer_s', 7, 7, $blowup_user['footer_s']) . '</p>' . 
     411 
     412'<p class="field"><label for="footer_c">' . __('Footer color:') . '</label> ' . 
     413form::field('footer_c', 7, 7, $blowup_user['footer_c'], 'colorpicker') . '</p>' . 
     414 
     415'<p class="field"><label for="footer_l_c">' . __('Footer links color:') . '</label> ' . 
     416form::field('footer_l_c', 7, 7, $blowup_user['footer_l_c'], 'colorpicker') . '</p>' . 
     417 
     418'<p class="field"><label for="footer_bg_c">' . __('Footer background color:') . '</label> ' . 
     419form::field('footer_bg_c', 7, 7, $blowup_user['footer_bg_c'], 'colorpicker') . '</p>'; 
     420 
     421echo 
     422'<h4 class="border-top">' . __('Additional CSS') . '</h4>' . 
     423'<p><label for="extra_css">' . __('Any additional CSS styles (must be written using the CSS syntax):') . '</label> ' . 
     424form::textarea('extra_css', 72, 5, html::escapeHTML($blowup_user['extra_css']), 'maximal', '', false, 'title="' . __('Additional CSS') . '"') . 
     425    '</p>' . 
     426    '</div>'; 
    439427 
    440428// Import / Export configuration 
    441 $tmp_array = array(); 
    442 $tmp_exclude = array('uploaded','top_height'); 
     429$tmp_array   = array(); 
     430$tmp_exclude = array('uploaded', 'top_height'); 
    443431if ($blowup_user['top_image'] == 'custom') { 
    444      $tmp_exclude[] = 'top_image'; 
     432    $tmp_exclude[] = 'top_image'; 
    445433} 
    446434foreach ($blowup_user as $k => $v) { 
    447      if (!in_array($k,$tmp_exclude)) { 
    448           $tmp_array[] = $k.':'.'"'.$v.'"'; 
    449      } 
    450 } 
    451 echo 
    452 '<div class="fieldset">'. 
    453 '<h3 id="bu_export">'.__('Configuration import / export').'</h3>'. 
    454 '<div id="bu_export_content">'. 
    455 '<p>'.__('You can share your configuration using the following code. To apply a configuration, paste the code, click on "Apply code" and save.').'</p>'. 
    456 '<p>'.form::textarea('export_code',72,5,implode('; ',$tmp_array),'maximal','',false,'title="'.__('Copy this code:').'"').'</p>'. 
    457 '</div>'. 
    458 '</div>'; 
    459  
    460 echo 
    461 '<p class="clear"><input type="submit" value="'.__('Save').'" />'. 
    462 $core->formNonce().'</p>'. 
    463 '</form>'; 
     435    if (!in_array($k, $tmp_exclude)) { 
     436        $tmp_array[] = $k . ':' . '"' . $v . '"'; 
     437    } 
     438} 
     439echo 
     440'<div class="fieldset">' . 
     441'<h3 id="bu_export">' . __('Configuration import / export') . '</h3>' . 
     442'<div id="bu_export_content">' . 
     443'<p>' . __('You can share your configuration using the following code. To apply a configuration, paste the code, click on "Apply code" and save.') . '</p>' . 
     444'<p>' . form::textarea('export_code', 72, 5, implode('; ', $tmp_array), 'maximal', '', false, 'title="' . __('Copy this code:') . '"') . '</p>' . 
     445    '</div>' . 
     446    '</div>'; 
     447 
     448echo 
     449'<p class="clear"><input type="submit" value="' . __('Save') . '" />' . 
     450$core->formNonce() . '</p>' . 
     451    '</form>'; 
    464452 
    465453dcPage::helpBlock('blowupConfig'); 
Note: See TracChangeset for help on using the changeset viewer.

Sites map