Dotclear

source: plugins/blowupConfig/index.php @ 3340:30cec05f4e63

Revision 3340:30cec05f4e63, 19.0 KB checked in by franck <carnet.franck.paul@…>, 9 years ago (diff)

PHP 5.3+ : (expr1 ? expr1 : expr2) may be written → (expr1 ?: expr2)

RevLine 
[0]1<?php
2# -- BEGIN LICENSE BLOCK ---------------------------------------
3#
4# This file is part of Dotclear 2.
5#
[1179]6# Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear
[0]7# Licensed under the GPL version 2.0 license.
8# See LICENSE file or
9# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
10#
11# -- END LICENSE BLOCK -----------------------------------------
12if (!defined('DC_CONTEXT_ADMIN')) { return; }
13
14require dirname(__FILE__).'/lib/class.blowup.config.php';
15
16$can_write_images = blowupConfig::canWriteImages();
[1436]17$can_write_css = blowupConfig::canWriteCss();
[0]18
19if ($core->error->flag()) {
20          $notices = $core->error->toHTML();
21          $core->error->reset();
22}
23
24$blowup_base = array(
25     'body_bg_c' => null,
26     'body_bg_g' => 'light',
[295]27
[0]28     'body_txt_f' => null,
29     'body_txt_s' => null,
30     'body_txt_c' => null,
31     'body_line_height' => null,
[295]32
[0]33     'top_image' => 'default',
34     'top_height' => null,
35     'uploaded' => null,
[295]36
[0]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,
[295]43
[0]44     'body_link_c' => null,
45     'body_link_f_c' => null,
46     'body_link_v_c' => null,
[295]47
[0]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,
[295]62
[0]63     'date_title_f' => null,
64     'date_title_s' => null,
65     'date_title_c' => null,
[295]66
[0]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,
[295]74
[0]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,
[295]81
82     'extra_css' => null
[0]83);
84
85$blowup_user = $core->blog->settings->themes->blowup_style;
86
87$blowup_user = @unserialize($blowup_user);
88if (!is_array($blowup_user)) {
89     $blowup_user = array();
90}
91
92$blowup_user = array_merge($blowup_base,$blowup_user);
93
94$gradient_types = array(
95     __('Light linear gradient') => 'light',
96     __('Medium linear gradient') => 'medium',
97     __('Dark linear gradient') => 'dark',
98     __('Solid color') => 'solid'
99);
100
101$top_images = array(__('Custom...') => 'custom');
102$top_images = array_merge($top_images,array_flip(blowupConfig::$top_images));
103
104
105if (!empty($_POST))
106{
107     try
108     {
109          $blowup_user['body_txt_f'] = $_POST['body_txt_f'];
[2657]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']);
[295]113
[0]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          );
[295]120
[0]121          if ($update_blog_title)
122          {
123               $blowup_user['blog_title_f'] = $_POST['blog_title_f'];
[2657]124               $blowup_user['blog_title_s'] = dcThemeConfig::adjustFontSize($_POST['blog_title_s']);
125               $blowup_user['blog_title_c'] = dcThemeConfig::adjustColor($_POST['blog_title_c']);
[0]126               $blowup_user['blog_title_a'] = preg_match('/^(left|center|right)$/',$_POST['blog_title_a']) ? $_POST['blog_title_a'] : null;
[2657]127               $blowup_user['blog_title_p'] = dcThemeConfig::adjustPosition($_POST['blog_title_p']);
[0]128          }
[295]129
[2657]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']);
[295]133
[0]134          $blowup_user['sidebar_text_f'] = $_POST['sidebar_text_f'];
[2657]135          $blowup_user['sidebar_text_s'] = dcThemeConfig::adjustFontSize($_POST['sidebar_text_s']);
136          $blowup_user['sidebar_text_c'] = dcThemeConfig::adjustColor($_POST['sidebar_text_c']);
[0]137          $blowup_user['sidebar_title_f'] = $_POST['sidebar_title_f'];
[2657]138          $blowup_user['sidebar_title_s'] = dcThemeConfig::adjustFontSize($_POST['sidebar_title_s']);
139          $blowup_user['sidebar_title_c'] = dcThemeConfig::adjustColor($_POST['sidebar_title_c']);
[0]140          $blowup_user['sidebar_title2_f'] = $_POST['sidebar_title2_f'];
[2657]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']);
[295]147
[0]148          $blowup_user['sidebar_position'] = ($_POST['sidebar_position'] == 'left') ? 'left' : null;
[295]149
[0]150          $blowup_user['date_title_f'] = $_POST['date_title_f'];
[2657]151          $blowup_user['date_title_s'] = dcThemeConfig::adjustFontSize($_POST['date_title_s']);
152          $blowup_user['date_title_c'] = dcThemeConfig::adjustColor($_POST['date_title_c']);
[295]153
[0]154          $blowup_user['post_title_f'] = $_POST['post_title_f'];
[2657]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']);
[295]159
160
[0]161          $blowup_user['footer_f'] = $_POST['footer_f'];
[2657]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']);
[295]166
167
[2657]168          $blowup_user['extra_css'] = dcThemeConfig::cleanCSS($_POST['extra_css']);
[295]169
[0]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               }
[295]176
[0]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               }
[295]182
[0]183               $blowup_user['top_image'] = in_array($_POST['top_image'],$top_images) ? $_POST['top_image'] : 'default';
[295]184
[2657]185               $blowup_user['body_bg_c'] = dcThemeConfig::adjustColor($_POST['body_bg_c']);
[0]186               $blowup_user['body_bg_g'] = in_array($_POST['body_bg_g'],$gradient_types) ? $_POST['body_bg_g'] : '';
[2657]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']);
[0]190               blowupConfig::createImages($blowup_user,$uploaded);
191          }
[295]192
[1436]193          if ($can_write_css)
194          {
195               blowupConfig::createCss($blowup_user);
196          }
197
[0]198          $core->blog->settings->addNamespace('themes');
199          $core->blog->settings->themes->put('blowup_style',serialize($blowup_user));
200          $core->blog->triggerBlog();
[2566]201
[2256]202          dcPage::addSuccessNotice(__('Theme configuration has been successfully updated.'));
203          http::redirect($p_url);
[0]204     }
205     catch (Exception $e)
206     {
207          $core->error->add($e->getMessage());
208     }
209}
210?>
211<html>
212<head>
213  <title><?php echo __('Blowup configuration'); ?></title>
[2849]214  <?php echo dcPage::jsLoad(dcPage::getPF('blowupConfig/config.js')); ?>
[0]215  <?php echo dcPage::jsColorPicker(); ?>
216  <script type="text/javascript">
217  //<![CDATA[
218  <?php
219  echo dcPage::jsVar('dotclear.blowup_public_url',blowupConfig::imagesURL());
220  echo dcPage::jsVar('dotclear.msg.predefined_styles',__('Predefined styles'));
221  echo dcPage::jsVar('dotclear.msg.apply_code',__('Apply code'));
[78]222  echo dcPage::jsVar('dotclear.msg.predefined_style_title',__('Choose a predefined style'));
[0]223  ?>
224  //]]>
225  </script>
226</head>
227
228<body>
229<?php
[1358]230echo dcPage::breadcrumb(
[1339]231     array(
232          html::escapeHTML($core->blog->name) => '',
[2824]233          __('Blog appearance') => $core->adminurl->get('admin.blog.theme'),
[2166]234          __('Blowup configuration') => ''
[2256]235     )).dcPage::notices();
[1339]236
[0]237echo
[2824]238'<p><a class="back" href="'.$core->adminurl->get('admin.blog.theme').'">'.__('Back to Blog appearance').'</a></p>';
[0]239
240
241if (!$can_write_images) {
[907]242     dcPage::message(__('For the following reasons, images cannot be created. You won\'t be able to change some background properties.').
243          $notices,false,true);
[0]244}
245
246echo '<form id="theme_config" action="'.$p_url.'" method="post" enctype="multipart/form-data">';
[295]247
[1499]248echo '<div class="fieldset"><h3>'.__('Customization').'</h3>'.
249'<h4>'.__('General').'</h4>';
[0]250
251if ($can_write_images) {
252     echo
[1454]253     '<p class="field"><label for="body_bg_c">'.__('Background color:').'</label> '.
254     form::field('body_bg_c',7,7,$blowup_user['body_bg_c'],'colorpicker').'</p>'.
[295]255
[1454]256     '<p class="field"><label for="body_bg_g">'.__('Background color fill:').'</label> '.
257     form::combo('body_bg_g',$gradient_types,$blowup_user['body_bg_g']).'</p>';
[0]258}
259
260echo
[1454]261'<p class="field"><label for="body_txt_f">'.__('Main text font:').'</label> '.
262form::combo('body_txt_f',blowupConfig::fontsList(),$blowup_user['body_txt_f']).'</p>'.
[0]263
[1454]264'<p class="field"><label for="body_txt_s">'.__('Main text font size:').'</label> '.
265form::field('body_txt_s',7,7,$blowup_user['body_txt_s']).'</p>'.
[0]266
[1454]267'<p class="field"><label for="body_txt_c">'.__('Main text color:').'</label> '.
268form::field('body_txt_c',7,7,$blowup_user['body_txt_c'],'colorpicker').'</p>'.
[0]269
[1454]270'<p class="field"><label for="body_line_height">'.__('Text line height:').'</label> '.
271form::field('body_line_height',7,7,$blowup_user['body_line_height']).'</p>'.
[0]272
[1499]273'<h4 class="border-top">'.__('Links').'</h4>'.
[1454]274'<p class="field"><label for="body_link_c">'.__('Links color:').'</label> '.
275form::field('body_link_c',7,7,$blowup_user['body_link_c'],'colorpicker').'</p>'.
[0]276
[1454]277'<p class="field"><label for="body_link_v_c">'.__('Visited links color:').'</label> '.
278form::field('body_link_v_c',7,7,$blowup_user['body_link_v_c'],'colorpicker').'</p>'.
[0]279
[1454]280'<p class="field"><label for="body_link_f_c">'.__('Focus links color:').'</label> '.
281form::field('body_link_f_c',7,7,$blowup_user['body_link_f_c'],'colorpicker').'</p>'.
[0]282
[1499]283'<h4 class="border-top">'.__('Page top').'</h4>';
[0]284
285if ($can_write_images) {
286     echo
[1454]287     '<p class="field"><label for="prelude_c">'.__('Prelude color:').'</label> '.
288     form::field('prelude_c',7,7,$blowup_user['prelude_c'],'colorpicker').'</p>';
[0]289}
290
291echo
[2335]292'<p class="field"><label for="blog_title_hide">'.__('Hide main title').'</label> '.
293form::checkbox('blog_title_hide',1,$blowup_user['blog_title_hide']).'</p>'.
[0]294
[1454]295'<p class="field"><label for="blog_title_f">'.__('Main title font:').'</label> '.
296form::combo('blog_title_f',blowupConfig::fontsList(),$blowup_user['blog_title_f']).'</p>'.
[0]297
[1454]298'<p class="field"><label for="blog_title_s">'.__('Main title font size:').'</label> '.
299form::field('blog_title_s',7,7,$blowup_user['blog_title_s']).'</p>'.
[0]300
[1454]301'<p class="field"><label for="blog_title_c">'.__('Main title color:').'</label> '.
302form::field('blog_title_c',7,7,$blowup_user['blog_title_c'],'colorpicker').'</p>'.
[0]303
[1454]304'<p class="field"><label for="blog_title_a">'.__('Main title alignment:').'</label> '.
305form::combo('blog_title_a',array(__('center')=>'center',__('left')=>'left',__('right')=>'right'),$blowup_user['blog_title_a']).'</p>'.
[0]306
[1454]307'<p class="field"><label for="blog_title_p">'.__('Main title position (x:y)').'</label> '.
[1499]308form::field('blog_title_p',7,7,$blowup_user['blog_title_p']).'</p>';
[0]309
310if ($can_write_images) {
311     if ($blowup_user['top_image'] == 'custom' && $blowup_user['uploaded']) {
312          $preview_image = http::concatURL($core->blog->url,blowupConfig::imagesURL().'/page-t.png');
313     } else {
[2849]314          $preview_image = dcPage::getPF('blowupConfig/alpha-img/page-t/'.$blowup_user['top_image'].'.png');
[0]315     }
[295]316
[0]317     echo
[2442]318     '<h5 class="pretty-title">'.__('Top image').'</h5>'.
[1454]319     '<p class="field"><label for="top_image">'.__('Top image').'</label> '.
[3340]320     form::combo('top_image',$top_images,($blowup_user['top_image'] ?: 'default')).'</p>'.
[0]321     '<p>'.__('Choose "Custom..." to upload your own image.').'</p>'.
[295]322
[1454]323     '<p id="uploader"><label for="upfile">'.__('Add your image:').'</label> '.
[0]324     ' ('.sprintf(__('JPEG or PNG file, 800 pixels wide, maximum size %s'),files::size(DC_MAX_UPLOAD_SIZE)).')'.
[76]325     '<input type="file" name="upfile" id="upfile" size="35" />'.
[1454]326     '</p>'.
[295]327
[1499]328     '<h5>'.__('Preview').'</h5>'.
[0]329     '<div class="grid" style="width:800px;border:1px solid #ccc;">'.
330     '<img style="display:block;" src="'.$preview_image.'" alt="" id="image-preview" />'.
[1499]331     '</div>';
[0]332}
333
334echo
[1499]335'<h4 class="border-top">'.__('Sidebar').'</h4>'.
[1454]336'<p class="field"><label for="sidebar_position">'.__('Sidebar position:').'</label> '.
337form::combo('sidebar_position',array(__('right')=>'right',__('left')=>'left'),$blowup_user['sidebar_position']).'</p>'.
[0]338
[1454]339'<p class="field"><label for="sidebar_text_f">'.__('Sidebar text font:').'</label> '.
340form::combo('sidebar_text_f',blowupConfig::fontsList(),$blowup_user['sidebar_text_f']).'</p>'.
[0]341
[1454]342'<p class="field"><label for="sidebar_text_s">'.__('Sidebar text font size:').'</label> '.
343form::field('sidebar_text_s',7,7,$blowup_user['sidebar_text_s']).'</p>'.
[0]344
[1454]345'<p class="field"><label for="sidebar_text_c">'.__('Sidebar text color:').'</label> '.
346form::field('sidebar_text_c',7,7,$blowup_user['sidebar_text_c'],'colorpicker').'</p>'.
[0]347
[1454]348'<p class="field"><label for="sidebar_title_f">'.__('Sidebar titles font:').'</label> '.
349form::combo('sidebar_title_f',blowupConfig::fontsList(),$blowup_user['sidebar_title_f']).'</p>'.
[0]350
[1454]351'<p class="field"><label for="sidebar_title_s">'.__('Sidebar titles font size:').'</label> '.
352form::field('sidebar_title_s',7,7,$blowup_user['sidebar_title_s']).'</p>'.
[0]353
[1454]354'<p class="field"><label for="sidebar_title_c">'.__('Sidebar titles color:').'</label> '.
355form::field('sidebar_title_c',7,7,$blowup_user['sidebar_title_c'],'colorpicker').'</p>'.
[0]356
[1454]357'<p class="field"><label for="sidebar_title2_f">'.__('Sidebar 2nd level titles font:').'</label> '.
358form::combo('sidebar_title2_f',blowupConfig::fontsList(),$blowup_user['sidebar_title2_f']).'</p>'.
[0]359
[1454]360'<p class="field"><label for="sidebar_title2_s">'.__('Sidebar 2nd level titles font size:').'</label> '.
361form::field('sidebar_title2_s',7,7,$blowup_user['sidebar_title2_s']).'</p>'.
[0]362
[1454]363'<p class="field"><label for="sidebar_title2_c">'.__('Sidebar 2nd level titles color:').'</label> '.
364form::field('sidebar_title2_c',7,7,$blowup_user['sidebar_title2_c'],'colorpicker').'</p>'.
[0]365
[1454]366'<p class="field"><label for="sidebar_line_c">'.__('Sidebar lines color:').'</label> '.
367form::field('sidebar_line_c',7,7,$blowup_user['sidebar_line_c'],'colorpicker').'</p>'.
[0]368
[1454]369'<p class="field"><label for="sidebar_link_c">'.__('Sidebar links color:').'</label> '.
370form::field('sidebar_link_c',7,7,$blowup_user['sidebar_link_c'],'colorpicker').'</p>'.
[0]371
[1454]372'<p class="field"><label for="sidebar_link_v_c">'.__('Sidebar visited links color:').'</label> '.
373form::field('sidebar_link_v_c',7,7,$blowup_user['sidebar_link_v_c'],'colorpicker').'</p>'.
[0]374
[1454]375'<p class="field"><label for="sidebar_link_f_c">'.__('Sidebar focus links color:').'</label> '.
376form::field('sidebar_link_f_c',7,7,$blowup_user['sidebar_link_f_c'],'colorpicker').'</p>'.
[0]377
[1499]378'<h4 class="border-top">'.__('Entries').'</h4>'.
[1454]379'<p class="field"><label for="date_title_f">'.__('Date title font:').'</label> '.
380form::combo('date_title_f',blowupConfig::fontsList(),$blowup_user['date_title_f']).'</p>'.
[0]381
[1454]382'<p class="field"><label for="date_title_s">'.__('Date title font size:').'</label> '.
383form::field('date_title_s',7,7,$blowup_user['date_title_s']).'</p>'.
[0]384
[1454]385'<p class="field"><label for="date_title_c">'.__('Date title color:').'</label> '.
386form::field('date_title_c',7,7,$blowup_user['date_title_c'],'colorpicker').'</p>'.
[0]387
[1454]388'<p class="field"><label for="post_title_f">'.__('Entry title font:').'</label> '.
389form::combo('post_title_f',blowupConfig::fontsList(),$blowup_user['post_title_f']).'</p>'.
[0]390
[1454]391'<p class="field"><label for="post_title_s">'.__('Entry title font size:').'</label> '.
392form::field('post_title_s',7,7,$blowup_user['post_title_s']).'</p>'.
[0]393
[1454]394'<p class="field"><label for="post_title_c">'.__('Entry title color:').'</label> '.
395form::field('post_title_c',7,7,$blowup_user['post_title_c'],'colorpicker').'</p>';
[0]396
397if ($can_write_images) {
398     echo
[1454]399     '<p class="field"><label for="post_comment_bg_c">'.__('Comment background color:').'</label> '.
400     form::field('post_comment_bg_c',7,7,$blowup_user['post_comment_bg_c'],'colorpicker').'</p>';
[0]401}
402
403echo
[1454]404'<p class="field"><label for="post_comment_c">'.__('Comment text color:').'</label> '.
405form::field('post_comment_c',7,7,$blowup_user['post_comment_c'],'colorpicker').'</p>';
[0]406
407if ($can_write_images) {
408     echo
[1454]409     '<p class="field"><label for="post_commentmy_bg_c">'.__('My comment background color:').'</label> '.
410     form::field('post_commentmy_bg_c',7,7,$blowup_user['post_commentmy_bg_c'],'colorpicker').'</p>';
[0]411}
412
413echo
[1454]414'<p class="field"><label for="post_commentmy_c">'.__('My comment text color:').'</label> '.
415form::field('post_commentmy_c',7,7,$blowup_user['post_commentmy_c'],'colorpicker').'</p>'.
[0]416
[1499]417'<h4 class="border-top">'.__('Footer').'</h4>'.
[1454]418'<p class="field"><label for="footer_f">'.__('Footer font:').'</label> '.
419form::combo('footer_f',blowupConfig::fontsList(),$blowup_user['footer_f']).'</p>'.
[0]420
[1454]421'<p class="field"><label for="footer_s">'.__('Footer font size:').'</label> '.
422form::field('footer_s',7,7,$blowup_user['footer_s']).'</p>'.
[0]423
[1454]424'<p class="field"><label for="footer_c">'.__('Footer color:').'</label> '.
425form::field('footer_c',7,7,$blowup_user['footer_c'],'colorpicker').'</p>'.
[0]426
[1454]427'<p class="field"><label for="footer_l_c">'.__('Footer links color:').'</label> '.
428form::field('footer_l_c',7,7,$blowup_user['footer_l_c'],'colorpicker').'</p>'.
[0]429
[1454]430'<p class="field"><label for="footer_bg_c">'.__('Footer background color:').'</label> '.
[1499]431form::field('footer_bg_c',7,7,$blowup_user['footer_bg_c'],'colorpicker').'</p>';
[0]432
[295]433echo
[1499]434'<h4 class="border-top">'.__('Additional CSS').'</h4>'.
[1454]435'<p><label for="extra_css">'.__('Any additional CSS styles (must be written using the CSS syntax):').'</label> '.
[994]436form::textarea('extra_css',72,5,html::escapeHTML($blowup_user['extra_css']),'maximal','',false,'title="'.__('Additional CSS').'"').
[1454]437'</p>'.
[1499]438'</div>';
[295]439
440
441
[0]442// Import / Export configuration
443$tmp_array = array();
444$tmp_exclude = array('uploaded','top_height');
445if ($blowup_user['top_image'] == 'custom') {
446     $tmp_exclude[] = 'top_image';
447}
448foreach ($blowup_user as $k => $v) {
449     if (!in_array($k,$tmp_exclude)) {
450          $tmp_array[] = $k.':'.'"'.$v.'"';
451     }
452}
453echo
[1499]454'<div class="fieldset">'.
455'<h3 id="bu_export">'.__('Configuration import / export').'</h3>'.
456'<div id="bu_export_content">'.
[0]457'<p>'.__('You can share your configuration using the following code. To apply a configuration, paste the code, click on "Apply code" and save.').'</p>'.
[76]458'<p>'.form::textarea('export_code',72,5,implode('; ',$tmp_array),'maximal','',false,'title="'.__('Copy this code:').'"').'</p>'.
[1499]459'</div>'.
460'</div>';
[0]461
462echo
[217]463'<p class="clear"><input type="submit" value="'.__('Save').'" />'.
[0]464$core->formNonce().'</p>'.
465'</form>';
466
467dcPage::helpBlock('blowupConfig');
468?>
469</body>
[295]470</html>
Note: See TracBrowser for help on using the repository browser.

Sites map