Beispiel #1
0
         $ductile_user['alternate_webfont_api'] = $_POST['alternate_webfont_api'];
         $ductile_user['blog_title_w'] = (int) (!empty($_POST['blog_title_w']));
         $ductile_user['blog_title_s'] = dcThemeConfig::adjustFontSize($_POST['blog_title_s']);
         $ductile_user['blog_title_c'] = dcThemeConfig::adjustColor($_POST['blog_title_c']);
         $ductile_user['post_title_w'] = (int) (!empty($_POST['post_title_w']));
         $ductile_user['post_title_s'] = dcThemeConfig::adjustFontSize($_POST['post_title_s']);
         $ductile_user['post_title_c'] = dcThemeConfig::adjustColor($_POST['post_title_c']);
         $ductile_user['post_link_w'] = (int) (!empty($_POST['post_link_w']));
         $ductile_user['post_link_v_c'] = dcThemeConfig::adjustColor($_POST['post_link_v_c']);
         $ductile_user['post_link_f_c'] = dcThemeConfig::adjustColor($_POST['post_link_f_c']);
         $ductile_user['post_simple_title_c'] = dcThemeConfig::adjustColor($_POST['post_simple_title_c']);
         $ductile_user['blog_title_w_m'] = (int) (!empty($_POST['blog_title_w_m']));
         $ductile_user['blog_title_s_m'] = dcThemeConfig::adjustFontSize($_POST['blog_title_s_m']);
         $ductile_user['blog_title_c_m'] = dcThemeConfig::adjustColor($_POST['blog_title_c_m']);
         $ductile_user['post_title_w_m'] = (int) (!empty($_POST['post_title_w_m']));
         $ductile_user['post_title_s_m'] = dcThemeConfig::adjustFontSize($_POST['post_title_s_m']);
         $ductile_user['post_title_c_m'] = dcThemeConfig::adjustColor($_POST['post_title_c_m']);
     }
     $core->blog->settings->addNamespace('themes');
     $core->blog->settings->themes->put($core->blog->settings->system->theme . '_style', serialize($ductile_user));
     $core->blog->settings->themes->put($core->blog->settings->system->theme . '_stickers', serialize($ductile_stickers));
     $core->blog->settings->themes->put($core->blog->settings->system->theme . '_entries_lists', serialize($ductile_lists));
     $core->blog->settings->themes->put($core->blog->settings->system->theme . '_entries_counts', serialize($ductile_counts));
     // Blog refresh
     $core->blog->triggerBlog();
     // Template cache reset
     $core->emptyTemplatesCache();
     dcPage::message(__('Theme configuration upgraded.'), true, true);
 } catch (Exception $e) {
     $core->error->add($e->getMessage());
 }
Beispiel #2
0
 $blowup_user['sidebar_title2_c'] = dcThemeConfig::adjustColor($_POST['sidebar_title2_c']);
 $blowup_user['sidebar_line_c'] = dcThemeConfig::adjustColor($_POST['sidebar_line_c']);
 $blowup_user['sidebar_link_c'] = dcThemeConfig::adjustColor($_POST['sidebar_link_c']);
 $blowup_user['sidebar_link_f_c'] = dcThemeConfig::adjustColor($_POST['sidebar_link_f_c']);
 $blowup_user['sidebar_link_v_c'] = dcThemeConfig::adjustColor($_POST['sidebar_link_v_c']);
 $blowup_user['sidebar_position'] = $_POST['sidebar_position'] == 'left' ? 'left' : null;
 $blowup_user['date_title_f'] = $_POST['date_title_f'];
 $blowup_user['date_title_s'] = dcThemeConfig::adjustFontSize($_POST['date_title_s']);
 $blowup_user['date_title_c'] = dcThemeConfig::adjustColor($_POST['date_title_c']);
 $blowup_user['post_title_f'] = $_POST['post_title_f'];
 $blowup_user['post_title_s'] = dcThemeConfig::adjustFontSize($_POST['post_title_s']);
 $blowup_user['post_title_c'] = dcThemeConfig::adjustColor($_POST['post_title_c']);
 $blowup_user['post_comment_c'] = dcThemeConfig::adjustColor($_POST['post_comment_c']);
 $blowup_user['post_commentmy_c'] = dcThemeConfig::adjustColor($_POST['post_commentmy_c']);
 $blowup_user['footer_f'] = $_POST['footer_f'];
 $blowup_user['footer_s'] = dcThemeConfig::adjustFontSize($_POST['footer_s']);
 $blowup_user['footer_c'] = dcThemeConfig::adjustColor($_POST['footer_c']);
 $blowup_user['footer_l_c'] = dcThemeConfig::adjustColor($_POST['footer_l_c']);
 $blowup_user['footer_bg_c'] = dcThemeConfig::adjustColor($_POST['footer_bg_c']);
 $blowup_user['extra_css'] = dcThemeConfig::cleanCSS($_POST['extra_css']);
 if ($can_write_images) {
     $uploaded = null;
     if ($blowup_user['uploaded'] && is_file(blowupConfig::imagesPath() . '/' . $blowup_user['uploaded'])) {
         $uploaded = blowupConfig::imagesPath() . '/' . $blowup_user['uploaded'];
     }
     if (!empty($_FILES['upfile']) && !empty($_FILES['upfile']['name'])) {
         files::uploadStatus($_FILES['upfile']);
         $uploaded = blowupConfig::uploadImage($_FILES['upfile']);
         $blowup_user['uploaded'] = basename($uploaded);
     }
     $blowup_user['top_image'] = in_array($_POST['top_image'], $top_images) ? $_POST['top_image'] : 'default';