1 | <?php |
---|
2 | # -- BEGIN LICENSE BLOCK --------------------------------------- |
---|
3 | # |
---|
4 | # This file is part of Dotclear 2. |
---|
5 | # |
---|
6 | # Copyright (c) 2003-2013 Olivier Meunier & Association Dotclear |
---|
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 ----------------------------------------- |
---|
12 | if (!defined('DC_CONTEXT_ADMIN')) { return; } |
---|
13 | |
---|
14 | require dirname(__FILE__).'/lib/class.blowup.config.php'; |
---|
15 | |
---|
16 | $can_write_images = blowupConfig::canWriteImages(); |
---|
17 | $can_write_css = blowupConfig::canWriteCss(); |
---|
18 | |
---|
19 | if ($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', |
---|
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 |
---|
83 | ); |
---|
84 | |
---|
85 | $blowup_user = $core->blog->settings->themes->blowup_style; |
---|
86 | |
---|
87 | $blowup_user = @unserialize($blowup_user); |
---|
88 | if (!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 | |
---|
105 | if (!empty($_POST)) |
---|
106 | { |
---|
107 | try |
---|
108 | { |
---|
109 | $blowup_user['body_txt_f'] = $_POST['body_txt_f']; |
---|
110 | $blowup_user['body_txt_s'] = blowupConfig::adjustFontSize($_POST['body_txt_s']); |
---|
111 | $blowup_user['body_txt_c'] = blowupConfig::adjustColor($_POST['body_txt_c']); |
---|
112 | $blowup_user['body_line_height'] = blowupConfig::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'] = blowupConfig::adjustFontSize($_POST['blog_title_s']); |
---|
125 | $blowup_user['blog_title_c'] = blowupConfig::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'] = blowupConfig::adjustPosition($_POST['blog_title_p']); |
---|
128 | } |
---|
129 | |
---|
130 | $blowup_user['body_link_c'] = blowupConfig::adjustColor($_POST['body_link_c']); |
---|
131 | $blowup_user['body_link_f_c'] = blowupConfig::adjustColor($_POST['body_link_f_c']); |
---|
132 | $blowup_user['body_link_v_c'] = blowupConfig::adjustColor($_POST['body_link_v_c']); |
---|
133 | |
---|
134 | $blowup_user['sidebar_text_f'] = $_POST['sidebar_text_f']; |
---|
135 | $blowup_user['sidebar_text_s'] = blowupConfig::adjustFontSize($_POST['sidebar_text_s']); |
---|
136 | $blowup_user['sidebar_text_c'] = blowupConfig::adjustColor($_POST['sidebar_text_c']); |
---|
137 | $blowup_user['sidebar_title_f'] = $_POST['sidebar_title_f']; |
---|
138 | $blowup_user['sidebar_title_s'] = blowupConfig::adjustFontSize($_POST['sidebar_title_s']); |
---|
139 | $blowup_user['sidebar_title_c'] = blowupConfig::adjustColor($_POST['sidebar_title_c']); |
---|
140 | $blowup_user['sidebar_title2_f'] = $_POST['sidebar_title2_f']; |
---|
141 | $blowup_user['sidebar_title2_s'] = blowupConfig::adjustFontSize($_POST['sidebar_title2_s']); |
---|
142 | $blowup_user['sidebar_title2_c'] = blowupConfig::adjustColor($_POST['sidebar_title2_c']); |
---|
143 | $blowup_user['sidebar_line_c'] = blowupConfig::adjustColor($_POST['sidebar_line_c']); |
---|
144 | $blowup_user['sidebar_link_c'] = blowupConfig::adjustColor($_POST['sidebar_link_c']); |
---|
145 | $blowup_user['sidebar_link_f_c'] = blowupConfig::adjustColor($_POST['sidebar_link_f_c']); |
---|
146 | $blowup_user['sidebar_link_v_c'] = blowupConfig::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'] = blowupConfig::adjustFontSize($_POST['date_title_s']); |
---|
152 | $blowup_user['date_title_c'] = blowupConfig::adjustColor($_POST['date_title_c']); |
---|
153 | |
---|
154 | $blowup_user['post_title_f'] = $_POST['post_title_f']; |
---|
155 | $blowup_user['post_title_s'] = blowupConfig::adjustFontSize($_POST['post_title_s']); |
---|
156 | $blowup_user['post_title_c'] = blowupConfig::adjustColor($_POST['post_title_c']); |
---|
157 | $blowup_user['post_comment_c'] = blowupConfig::adjustColor($_POST['post_comment_c']); |
---|
158 | $blowup_user['post_commentmy_c'] = blowupConfig::adjustColor($_POST['post_commentmy_c']); |
---|
159 | |
---|
160 | |
---|
161 | $blowup_user['footer_f'] = $_POST['footer_f']; |
---|
162 | $blowup_user['footer_s'] = blowupConfig::adjustFontSize($_POST['footer_s']); |
---|
163 | $blowup_user['footer_c'] = blowupConfig::adjustColor($_POST['footer_c']); |
---|
164 | $blowup_user['footer_l_c'] = blowupConfig::adjustColor($_POST['footer_l_c']); |
---|
165 | $blowup_user['footer_bg_c'] = blowupConfig::adjustColor($_POST['footer_bg_c']); |
---|
166 | |
---|
167 | |
---|
168 | $blowup_user['extra_css'] = blowupConfig::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'] = blowupConfig::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'] = blowupConfig::adjustColor($_POST['post_comment_bg_c']); |
---|
188 | $blowup_user['post_commentmy_bg_c'] = blowupConfig::adjustColor($_POST['post_commentmy_bg_c']); |
---|
189 | $blowup_user['prelude_c'] = blowupConfig::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 | http::redirect($p_url.'&upd=1'); |
---|
203 | } |
---|
204 | catch (Exception $e) |
---|
205 | { |
---|
206 | $core->error->add($e->getMessage()); |
---|
207 | } |
---|
208 | } |
---|
209 | ?> |
---|
210 | <html> |
---|
211 | <head> |
---|
212 | <title><?php echo __('Blowup configuration'); ?></title> |
---|
213 | <?php echo dcPage::jsLoad('index.php?pf=blowupConfig/config.js'); ?> |
---|
214 | <?php echo dcPage::jsColorPicker(); ?> |
---|
215 | <script type="text/javascript"> |
---|
216 | //<![CDATA[ |
---|
217 | <?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 | //]]> |
---|
224 | </script> |
---|
225 | </head> |
---|
226 | |
---|
227 | <body> |
---|
228 | <?php |
---|
229 | echo dcPage::breadcrumb( |
---|
230 | array( |
---|
231 | html::escapeHTML($core->blog->name) => '', |
---|
232 | __('Blog appearance') => 'blog_theme.php', |
---|
233 | '<span class="page-title">'.__('Blowup configuration').'</span>' => '' |
---|
234 | )); |
---|
235 | |
---|
236 | echo |
---|
237 | '<p><a class="back" href="blog_theme.php">'.__('Back to Blog appearance').'</a></p>'; |
---|
238 | |
---|
239 | |
---|
240 | if (!$can_write_images) { |
---|
241 | dcPage::message(__('For the following reasons, images cannot be created. You won\'t be able to change some background properties.'). |
---|
242 | $notices,false,true); |
---|
243 | } |
---|
244 | |
---|
245 | if (!empty($_GET['upd'])) { |
---|
246 | dcPage::success(__('Theme configuration has been successfully updated.')); |
---|
247 | } |
---|
248 | |
---|
249 | echo '<form id="theme_config" action="'.$p_url.'" method="post" enctype="multipart/form-data">'; |
---|
250 | |
---|
251 | echo '<div class="fieldset"><h3>'.__('Customization').'</h3>'. |
---|
252 | '<h4>'.__('General').'</h4>'; |
---|
253 | |
---|
254 | if ($can_write_images) { |
---|
255 | echo |
---|
256 | '<p class="field"><label for="body_bg_c">'.__('Background color:').'</label> '. |
---|
257 | form::field('body_bg_c',7,7,$blowup_user['body_bg_c'],'colorpicker').'</p>'. |
---|
258 | |
---|
259 | '<p class="field"><label for="body_bg_g">'.__('Background color fill:').'</label> '. |
---|
260 | form::combo('body_bg_g',$gradient_types,$blowup_user['body_bg_g']).'</p>'; |
---|
261 | } |
---|
262 | |
---|
263 | echo |
---|
264 | '<p class="field"><label for="body_txt_f">'.__('Main text font:').'</label> '. |
---|
265 | form::combo('body_txt_f',blowupConfig::fontsList(),$blowup_user['body_txt_f']).'</p>'. |
---|
266 | |
---|
267 | '<p class="field"><label for="body_txt_s">'.__('Main text font size:').'</label> '. |
---|
268 | form::field('body_txt_s',7,7,$blowup_user['body_txt_s']).'</p>'. |
---|
269 | |
---|
270 | '<p class="field"><label for="body_txt_c">'.__('Main text color:').'</label> '. |
---|
271 | form::field('body_txt_c',7,7,$blowup_user['body_txt_c'],'colorpicker').'</p>'. |
---|
272 | |
---|
273 | '<p class="field"><label for="body_line_height">'.__('Text line height:').'</label> '. |
---|
274 | form::field('body_line_height',7,7,$blowup_user['body_line_height']).'</p>'. |
---|
275 | |
---|
276 | '<h4 class="border-top">'.__('Links').'</h4>'. |
---|
277 | '<p class="field"><label for="body_link_c">'.__('Links color:').'</label> '. |
---|
278 | form::field('body_link_c',7,7,$blowup_user['body_link_c'],'colorpicker').'</p>'. |
---|
279 | |
---|
280 | '<p class="field"><label for="body_link_v_c">'.__('Visited links color:').'</label> '. |
---|
281 | form::field('body_link_v_c',7,7,$blowup_user['body_link_v_c'],'colorpicker').'</p>'. |
---|
282 | |
---|
283 | '<p class="field"><label for="body_link_f_c">'.__('Focus links color:').'</label> '. |
---|
284 | form::field('body_link_f_c',7,7,$blowup_user['body_link_f_c'],'colorpicker').'</p>'. |
---|
285 | |
---|
286 | '<h4 class="border-top">'.__('Page top').'</h4>'; |
---|
287 | |
---|
288 | if ($can_write_images) { |
---|
289 | echo |
---|
290 | '<p class="field"><label for="prelude_c">'.__('Prelude color:').'</label> '. |
---|
291 | form::field('prelude_c',7,7,$blowup_user['prelude_c'],'colorpicker').'</p>'; |
---|
292 | } |
---|
293 | |
---|
294 | echo |
---|
295 | '<p class="field"><label for="blog_title_hide">'.__('Hide main title').' '. |
---|
296 | form::checkbox('blog_title_hide',1,$blowup_user['blog_title_hide']).'</label></p>'. |
---|
297 | |
---|
298 | '<p class="field"><label for="blog_title_f">'.__('Main title font:').'</label> '. |
---|
299 | form::combo('blog_title_f',blowupConfig::fontsList(),$blowup_user['blog_title_f']).'</p>'. |
---|
300 | |
---|
301 | '<p class="field"><label for="blog_title_s">'.__('Main title font size:').'</label> '. |
---|
302 | form::field('blog_title_s',7,7,$blowup_user['blog_title_s']).'</p>'. |
---|
303 | |
---|
304 | '<p class="field"><label for="blog_title_c">'.__('Main title color:').'</label> '. |
---|
305 | form::field('blog_title_c',7,7,$blowup_user['blog_title_c'],'colorpicker').'</p>'. |
---|
306 | |
---|
307 | '<p class="field"><label for="blog_title_a">'.__('Main title alignment:').'</label> '. |
---|
308 | form::combo('blog_title_a',array(__('center')=>'center',__('left')=>'left',__('right')=>'right'),$blowup_user['blog_title_a']).'</p>'. |
---|
309 | |
---|
310 | '<p class="field"><label for="blog_title_p">'.__('Main title position (x:y)').'</label> '. |
---|
311 | form::field('blog_title_p',7,7,$blowup_user['blog_title_p']).'</p>'; |
---|
312 | |
---|
313 | if ($can_write_images) { |
---|
314 | if ($blowup_user['top_image'] == 'custom' && $blowup_user['uploaded']) { |
---|
315 | $preview_image = http::concatURL($core->blog->url,blowupConfig::imagesURL().'/page-t.png'); |
---|
316 | } else { |
---|
317 | $preview_image = 'index.php?pf=blowupConfig/alpha-img/page-t/'.$blowup_user['top_image'].'.png'; |
---|
318 | } |
---|
319 | |
---|
320 | echo |
---|
321 | '<h4 class="border-top">'.__('Top image').'</h4>'. |
---|
322 | '<p class="field"><label for="top_image">'.__('Top image').'</label> '. |
---|
323 | form::combo('top_image',$top_images,($blowup_user['top_image'] ? $blowup_user['top_image'] : 'default')).'</p>'. |
---|
324 | '<p>'.__('Choose "Custom..." to upload your own image.').'</p>'. |
---|
325 | |
---|
326 | '<p id="uploader"><label for="upfile">'.__('Add your image:').'</label> '. |
---|
327 | ' ('.sprintf(__('JPEG or PNG file, 800 pixels wide, maximum size %s'),files::size(DC_MAX_UPLOAD_SIZE)).')'. |
---|
328 | '<input type="file" name="upfile" id="upfile" size="35" />'. |
---|
329 | '</p>'. |
---|
330 | |
---|
331 | '<h5>'.__('Preview').'</h5>'. |
---|
332 | '<div class="grid" style="width:800px;border:1px solid #ccc;">'. |
---|
333 | '<img style="display:block;" src="'.$preview_image.'" alt="" id="image-preview" />'. |
---|
334 | '</div>'; |
---|
335 | } |
---|
336 | |
---|
337 | echo |
---|
338 | '<h4 class="border-top">'.__('Sidebar').'</h4>'. |
---|
339 | '<p class="field"><label for="sidebar_position">'.__('Sidebar position:').'</label> '. |
---|
340 | form::combo('sidebar_position',array(__('right')=>'right',__('left')=>'left'),$blowup_user['sidebar_position']).'</p>'. |
---|
341 | |
---|
342 | '<p class="field"><label for="sidebar_text_f">'.__('Sidebar text font:').'</label> '. |
---|
343 | form::combo('sidebar_text_f',blowupConfig::fontsList(),$blowup_user['sidebar_text_f']).'</p>'. |
---|
344 | |
---|
345 | '<p class="field"><label for="sidebar_text_s">'.__('Sidebar text font size:').'</label> '. |
---|
346 | form::field('sidebar_text_s',7,7,$blowup_user['sidebar_text_s']).'</p>'. |
---|
347 | |
---|
348 | '<p class="field"><label for="sidebar_text_c">'.__('Sidebar text color:').'</label> '. |
---|
349 | form::field('sidebar_text_c',7,7,$blowup_user['sidebar_text_c'],'colorpicker').'</p>'. |
---|
350 | |
---|
351 | '<p class="field"><label for="sidebar_title_f">'.__('Sidebar titles font:').'</label> '. |
---|
352 | form::combo('sidebar_title_f',blowupConfig::fontsList(),$blowup_user['sidebar_title_f']).'</p>'. |
---|
353 | |
---|
354 | '<p class="field"><label for="sidebar_title_s">'.__('Sidebar titles font size:').'</label> '. |
---|
355 | form::field('sidebar_title_s',7,7,$blowup_user['sidebar_title_s']).'</p>'. |
---|
356 | |
---|
357 | '<p class="field"><label for="sidebar_title_c">'.__('Sidebar titles color:').'</label> '. |
---|
358 | form::field('sidebar_title_c',7,7,$blowup_user['sidebar_title_c'],'colorpicker').'</p>'. |
---|
359 | |
---|
360 | '<p class="field"><label for="sidebar_title2_f">'.__('Sidebar 2nd level titles font:').'</label> '. |
---|
361 | form::combo('sidebar_title2_f',blowupConfig::fontsList(),$blowup_user['sidebar_title2_f']).'</p>'. |
---|
362 | |
---|
363 | '<p class="field"><label for="sidebar_title2_s">'.__('Sidebar 2nd level titles font size:').'</label> '. |
---|
364 | form::field('sidebar_title2_s',7,7,$blowup_user['sidebar_title2_s']).'</p>'. |
---|
365 | |
---|
366 | '<p class="field"><label for="sidebar_title2_c">'.__('Sidebar 2nd level titles color:').'</label> '. |
---|
367 | form::field('sidebar_title2_c',7,7,$blowup_user['sidebar_title2_c'],'colorpicker').'</p>'. |
---|
368 | |
---|
369 | '<p class="field"><label for="sidebar_line_c">'.__('Sidebar lines color:').'</label> '. |
---|
370 | form::field('sidebar_line_c',7,7,$blowup_user['sidebar_line_c'],'colorpicker').'</p>'. |
---|
371 | |
---|
372 | '<p class="field"><label for="sidebar_link_c">'.__('Sidebar links color:').'</label> '. |
---|
373 | form::field('sidebar_link_c',7,7,$blowup_user['sidebar_link_c'],'colorpicker').'</p>'. |
---|
374 | |
---|
375 | '<p class="field"><label for="sidebar_link_v_c">'.__('Sidebar visited links color:').'</label> '. |
---|
376 | form::field('sidebar_link_v_c',7,7,$blowup_user['sidebar_link_v_c'],'colorpicker').'</p>'. |
---|
377 | |
---|
378 | '<p class="field"><label for="sidebar_link_f_c">'.__('Sidebar focus links color:').'</label> '. |
---|
379 | form::field('sidebar_link_f_c',7,7,$blowup_user['sidebar_link_f_c'],'colorpicker').'</p>'. |
---|
380 | '</fieldset>'. |
---|
381 | |
---|
382 | '<h4 class="border-top">'.__('Entries').'</h4>'. |
---|
383 | '<p class="field"><label for="date_title_f">'.__('Date title font:').'</label> '. |
---|
384 | form::combo('date_title_f',blowupConfig::fontsList(),$blowup_user['date_title_f']).'</p>'. |
---|
385 | |
---|
386 | '<p class="field"><label for="date_title_s">'.__('Date title font size:').'</label> '. |
---|
387 | form::field('date_title_s',7,7,$blowup_user['date_title_s']).'</p>'. |
---|
388 | |
---|
389 | '<p class="field"><label for="date_title_c">'.__('Date title color:').'</label> '. |
---|
390 | form::field('date_title_c',7,7,$blowup_user['date_title_c'],'colorpicker').'</p>'. |
---|
391 | |
---|
392 | '<p class="field"><label for="post_title_f">'.__('Entry title font:').'</label> '. |
---|
393 | form::combo('post_title_f',blowupConfig::fontsList(),$blowup_user['post_title_f']).'</p>'. |
---|
394 | |
---|
395 | '<p class="field"><label for="post_title_s">'.__('Entry title font size:').'</label> '. |
---|
396 | form::field('post_title_s',7,7,$blowup_user['post_title_s']).'</p>'. |
---|
397 | |
---|
398 | '<p class="field"><label for="post_title_c">'.__('Entry title color:').'</label> '. |
---|
399 | form::field('post_title_c',7,7,$blowup_user['post_title_c'],'colorpicker').'</p>'; |
---|
400 | |
---|
401 | if ($can_write_images) { |
---|
402 | echo |
---|
403 | '<p class="field"><label for="post_comment_bg_c">'.__('Comment background color:').'</label> '. |
---|
404 | form::field('post_comment_bg_c',7,7,$blowup_user['post_comment_bg_c'],'colorpicker').'</p>'; |
---|
405 | } |
---|
406 | |
---|
407 | echo |
---|
408 | '<p class="field"><label for="post_comment_c">'.__('Comment text color:').'</label> '. |
---|
409 | form::field('post_comment_c',7,7,$blowup_user['post_comment_c'],'colorpicker').'</p>'; |
---|
410 | |
---|
411 | if ($can_write_images) { |
---|
412 | echo |
---|
413 | '<p class="field"><label for="post_commentmy_bg_c">'.__('My comment background color:').'</label> '. |
---|
414 | form::field('post_commentmy_bg_c',7,7,$blowup_user['post_commentmy_bg_c'],'colorpicker').'</p>'; |
---|
415 | } |
---|
416 | |
---|
417 | echo |
---|
418 | '<p class="field"><label for="post_commentmy_c">'.__('My comment text color:').'</label> '. |
---|
419 | form::field('post_commentmy_c',7,7,$blowup_user['post_commentmy_c'],'colorpicker').'</p>'. |
---|
420 | |
---|
421 | '<h4 class="border-top">'.__('Footer').'</h4>'. |
---|
422 | '<p class="field"><label for="footer_f">'.__('Footer font:').'</label> '. |
---|
423 | form::combo('footer_f',blowupConfig::fontsList(),$blowup_user['footer_f']).'</p>'. |
---|
424 | |
---|
425 | '<p class="field"><label for="footer_s">'.__('Footer font size:').'</label> '. |
---|
426 | form::field('footer_s',7,7,$blowup_user['footer_s']).'</p>'. |
---|
427 | |
---|
428 | '<p class="field"><label for="footer_c">'.__('Footer color:').'</label> '. |
---|
429 | form::field('footer_c',7,7,$blowup_user['footer_c'],'colorpicker').'</p>'. |
---|
430 | |
---|
431 | '<p class="field"><label for="footer_l_c">'.__('Footer links color:').'</label> '. |
---|
432 | form::field('footer_l_c',7,7,$blowup_user['footer_l_c'],'colorpicker').'</p>'. |
---|
433 | |
---|
434 | '<p class="field"><label for="footer_bg_c">'.__('Footer background color:').'</label> '. |
---|
435 | form::field('footer_bg_c',7,7,$blowup_user['footer_bg_c'],'colorpicker').'</p>'; |
---|
436 | |
---|
437 | echo |
---|
438 | '<h4 class="border-top">'.__('Additional CSS').'</h4>'. |
---|
439 | '<p><label for="extra_css">'.__('Any additional CSS styles (must be written using the CSS syntax):').'</label> '. |
---|
440 | form::textarea('extra_css',72,5,html::escapeHTML($blowup_user['extra_css']),'maximal','',false,'title="'.__('Additional CSS').'"'). |
---|
441 | '</p>'. |
---|
442 | '</div>'; |
---|
443 | |
---|
444 | |
---|
445 | |
---|
446 | // Import / Export configuration |
---|
447 | $tmp_array = array(); |
---|
448 | $tmp_exclude = array('uploaded','top_height'); |
---|
449 | if ($blowup_user['top_image'] == 'custom') { |
---|
450 | $tmp_exclude[] = 'top_image'; |
---|
451 | } |
---|
452 | foreach ($blowup_user as $k => $v) { |
---|
453 | if (!in_array($k,$tmp_exclude)) { |
---|
454 | $tmp_array[] = $k.':'.'"'.$v.'"'; |
---|
455 | } |
---|
456 | } |
---|
457 | echo |
---|
458 | '<div class="fieldset">'. |
---|
459 | '<h3 id="bu_export">'.__('Configuration import / export').'</h3>'. |
---|
460 | '<div id="bu_export_content">'. |
---|
461 | '<p>'.__('You can share your configuration using the following code. To apply a configuration, paste the code, click on "Apply code" and save.').'</p>'. |
---|
462 | '<p>'.form::textarea('export_code',72,5,implode('; ',$tmp_array),'maximal','',false,'title="'.__('Copy this code:').'"').'</p>'. |
---|
463 | '</div>'. |
---|
464 | '</div>'; |
---|
465 | |
---|
466 | echo |
---|
467 | '<p class="clear"><input type="submit" value="'.__('Save').'" />'. |
---|
468 | $core->formNonce().'</p>'. |
---|
469 | '</form>'; |
---|
470 | |
---|
471 | dcPage::helpBlock('blowupConfig'); |
---|
472 | ?> |
---|
473 | </body> |
---|
474 | </html> |
---|