Ejemplo n.º 1
0
 public static function publicHeadContent($core)
 {
     $url = blowupConfig::publicCssUrlHelper();
     if ($url) {
         echo '<link rel="stylesheet" href="' . $url . '" type="text/css" />';
     }
 }
Ejemplo n.º 2
0
    if ($blowup_user['top_image'] == 'custom' && $blowup_user['uploaded']) {
        $preview_image = http::concatURL($core->blog->url, blowupConfig::imagesURL() . '/page-t.png');
    } else {
        $preview_image = 'index.php?pf=blowupConfig/alpha-img/page-t/' . $blowup_user['top_image'] . '.png';
    }
    echo '<fieldset><legend>' . __('Top image') . '</legend>' . '<p class="field"><label>' . __('Top image') . form::combo('top_image', $top_images, $blowup_user['top_image'] ? $blowup_user['top_image'] : 'default') . '</label></p>' . '<p>' . __('Choose "Custom..." to upload your own image.') . '</p>' . '<p id="uploader"><label>' . __('Add your image:') . ' (' . sprintf(__('JPEG or PNG file, 800 pixels wide, maximum size %s'), files::size(DC_MAX_UPLOAD_SIZE)) . ')' . '<input type="file" name="upfile" size="35" />' . '</label></p>' . '<h3>' . __('Preview') . '</h3>' . '<div class="grid" style="width:800px;border:1px solid #ccc;">' . '<img style="display:block;" src="' . $preview_image . '" alt="" id="image-preview" />' . '</div>' . '</fieldset>';
}
echo '<fieldset><legend>' . __('Sidebar') . '</legend>' . '<p class="field"><label>' . __('Sidebar position:') . ' ' . form::combo('sidebar_position', array(__('right') => 'right', __('left') => 'left'), $blowup_user['sidebar_position']) . '</label></p>' . '<p class="field"><label>' . __('Sidebar text font:') . ' ' . form::combo('sidebar_text_f', blowupConfig::fontsList(), $blowup_user['sidebar_text_f']) . '</label></p>' . '<p class="field"><label>' . __('Sidebar text font size:') . ' ' . form::field('sidebar_text_s', 7, 7, $blowup_user['sidebar_text_s']) . '</label></p>' . '<p class="field"><label>' . __('Sidebar text color:') . ' ' . form::field('sidebar_text_c', 7, 7, $blowup_user['sidebar_text_c'], 'colorpicker') . '</label></p>' . '<p class="field"><label>' . __('Sidebar titles font:') . ' ' . form::combo('sidebar_title_f', blowupConfig::fontsList(), $blowup_user['sidebar_title_f']) . '</label></p>' . '<p class="field"><label>' . __('Sidebar titles font size:') . ' ' . form::field('sidebar_title_s', 7, 7, $blowup_user['sidebar_title_s']) . '</label></p>' . '<p class="field"><label>' . __('Sidebar titles color:') . ' ' . form::field('sidebar_title_c', 7, 7, $blowup_user['sidebar_title_c'], 'colorpicker') . '</label></p>' . '<p class="field"><label>' . __('Sidebar 2nd level titles font:') . ' ' . form::combo('sidebar_title2_f', blowupConfig::fontsList(), $blowup_user['sidebar_title2_f']) . '</label></p>' . '<p class="field"><label>' . __('Sidebar 2nd level titles font size:') . ' ' . form::field('sidebar_title2_s', 7, 7, $blowup_user['sidebar_title2_s']) . '</label></p>' . '<p class="field"><label>' . __('Sidebar 2nd level titles color:') . ' ' . form::field('sidebar_title2_c', 7, 7, $blowup_user['sidebar_title2_c'], 'colorpicker') . '</label></p>' . '<p class="field"><label>' . __('Sidebar lines color:') . ' ' . form::field('sidebar_line_c', 7, 7, $blowup_user['sidebar_line_c'], 'colorpicker') . '</label></p>' . '<p class="field"><label>' . __('Sidebar links color:') . ' ' . form::field('sidebar_link_c', 7, 7, $blowup_user['sidebar_link_c'], 'colorpicker') . '</label></p>' . '<p class="field"><label>' . __('Sidebar visited links color:') . ' ' . form::field('sidebar_link_v_c', 7, 7, $blowup_user['sidebar_link_v_c'], 'colorpicker') . '</label></p>' . '<p class="field"><label>' . __('Sidebar focus links color:') . ' ' . form::field('sidebar_link_f_c', 7, 7, $blowup_user['sidebar_link_f_c'], 'colorpicker') . '</label></p>' . '</fieldset>' . '<fieldset><legend>' . __('Entries') . '</legend>' . '<p class="field"><label>' . __('Date title font:') . ' ' . form::combo('date_title_f', blowupConfig::fontsList(), $blowup_user['date_title_f']) . '</label></p>' . '<p class="field"><label>' . __('Date title font size:') . ' ' . form::field('date_title_s', 7, 7, $blowup_user['date_title_s']) . '</label></p>' . '<p class="field"><label>' . __('Date title color:') . ' ' . form::field('date_title_c', 7, 7, $blowup_user['date_title_c'], 'colorpicker') . '</label></p>' . '<p class="field"><label>' . __('Entry title font:') . ' ' . form::combo('post_title_f', blowupConfig::fontsList(), $blowup_user['post_title_f']) . '</label></p>' . '<p class="field"><label>' . __('Entry title font size:') . ' ' . form::field('post_title_s', 7, 7, $blowup_user['post_title_s']) . '</label></p>' . '<p class="field"><label>' . __('Entry title color:') . ' ' . form::field('post_title_c', 7, 7, $blowup_user['post_title_c'], 'colorpicker') . '</label></p>';
if ($can_write_images) {
    echo '<p class="field"><label>' . __('Comment background color:') . ' ' . form::field('post_comment_bg_c', 7, 7, $blowup_user['post_comment_bg_c'], 'colorpicker') . '</label></p>';
}
echo '<p class="field"><label>' . __('Comment text color:') . ' ' . form::field('post_comment_c', 7, 7, $blowup_user['post_comment_c'], 'colorpicker') . '</label></p>';
if ($can_write_images) {
    echo '<p class="field"><label>' . __('My comment background color:') . ' ' . form::field('post_commentmy_bg_c', 7, 7, $blowup_user['post_commentmy_bg_c'], 'colorpicker') . '</label></p>';
}
echo '<p class="field"><label>' . __('My comment text color:') . ' ' . form::field('post_commentmy_c', 7, 7, $blowup_user['post_commentmy_c'], 'colorpicker') . '</label></p>' . '</fieldset>' . '<fieldset><legend>' . __('Footer') . '</legend>' . '<p class="field"><label>' . __('Footer font:') . ' ' . form::combo('footer_f', blowupConfig::fontsList(), $blowup_user['footer_f']) . '</label></p>' . '<p class="field"><label>' . __('Footer font size:') . ' ' . form::field('footer_s', 7, 7, $blowup_user['footer_s']) . '</label></p>' . '<p class="field"><label>' . __('Footer color:') . ' ' . form::field('footer_c', 7, 7, $blowup_user['footer_c'], 'colorpicker') . '</label></p>' . '<p class="field"><label>' . __('Footer links color:') . ' ' . form::field('footer_l_c', 7, 7, $blowup_user['footer_l_c'], 'colorpicker') . '</label></p>' . '<p class="field"><label>' . __('Footer background color:') . ' ' . form::field('footer_bg_c', 7, 7, $blowup_user['footer_bg_c'], 'colorpicker') . '</label></p>' . '</fieldset>';
// Import / Export configuration
$tmp_array = array();
$tmp_exclude = array('uploaded', 'top_height');
if ($blowup_user['top_image'] == 'custom') {
    $tmp_exclude[] = 'top_image';
}
foreach ($blowup_user as $k => $v) {
    if (!in_array($k, $tmp_exclude)) {
        $tmp_array[] = $k . ':' . '"' . $v . '"';
    }
}
echo '<h3 id="bu_export">' . __('Configuration import / export') . '</h3><fieldset>' . '<p>' . __('You can share your configuration using the following code. To apply a configuration, paste the code, click on "Apply code" and save.') . '</p>' . '<p>' . form::textarea('export_code', 72, 5, implode('; ', $tmp_array), 'maximal') . '</p>' . '</fieldset>';
echo '<p class="clear"><input type="submit" value="' . __('save') . '" />' . $core->formNonce() . '</p>' . '</form>';
dcPage::helpBlock('blowupConfig');
?>
Ejemplo n.º 3
0
    if ($blowup_user['top_image'] == 'custom' && $blowup_user['uploaded']) {
        $preview_image = http::concatURL($core->blog->url, blowupConfig::imagesURL() . '/page-t.png');
    } else {
        $preview_image = dcPage::getPF('blowupConfig/alpha-img/page-t/' . $blowup_user['top_image'] . '.png');
    }
    echo '<h5 class="pretty-title">' . __('Top image') . '</h5>' . '<p class="field"><label for="top_image">' . __('Top image') . '</label> ' . form::combo('top_image', $top_images, $blowup_user['top_image'] ? $blowup_user['top_image'] : 'default') . '</p>' . '<p>' . __('Choose "Custom..." to upload your own image.') . '</p>' . '<p id="uploader"><label for="upfile">' . __('Add your image:') . '</label> ' . ' (' . sprintf(__('JPEG or PNG file, 800 pixels wide, maximum size %s'), files::size(DC_MAX_UPLOAD_SIZE)) . ')' . '<input type="file" name="upfile" id="upfile" size="35" />' . '</p>' . '<h5>' . __('Preview') . '</h5>' . '<div class="grid" style="width:800px;border:1px solid #ccc;">' . '<img style="display:block;" src="' . $preview_image . '" alt="" id="image-preview" />' . '</div>';
}
echo '<h4 class="border-top">' . __('Sidebar') . '</h4>' . '<p class="field"><label for="sidebar_position">' . __('Sidebar position:') . '</label> ' . form::combo('sidebar_position', array(__('right') => 'right', __('left') => 'left'), $blowup_user['sidebar_position']) . '</p>' . '<p class="field"><label for="sidebar_text_f">' . __('Sidebar text font:') . '</label> ' . form::combo('sidebar_text_f', blowupConfig::fontsList(), $blowup_user['sidebar_text_f']) . '</p>' . '<p class="field"><label for="sidebar_text_s">' . __('Sidebar text font size:') . '</label> ' . form::field('sidebar_text_s', 7, 7, $blowup_user['sidebar_text_s']) . '</p>' . '<p class="field"><label for="sidebar_text_c">' . __('Sidebar text color:') . '</label> ' . form::field('sidebar_text_c', 7, 7, $blowup_user['sidebar_text_c'], 'colorpicker') . '</p>' . '<p class="field"><label for="sidebar_title_f">' . __('Sidebar titles font:') . '</label> ' . form::combo('sidebar_title_f', blowupConfig::fontsList(), $blowup_user['sidebar_title_f']) . '</p>' . '<p class="field"><label for="sidebar_title_s">' . __('Sidebar titles font size:') . '</label> ' . form::field('sidebar_title_s', 7, 7, $blowup_user['sidebar_title_s']) . '</p>' . '<p class="field"><label for="sidebar_title_c">' . __('Sidebar titles color:') . '</label> ' . form::field('sidebar_title_c', 7, 7, $blowup_user['sidebar_title_c'], 'colorpicker') . '</p>' . '<p class="field"><label for="sidebar_title2_f">' . __('Sidebar 2nd level titles font:') . '</label> ' . form::combo('sidebar_title2_f', blowupConfig::fontsList(), $blowup_user['sidebar_title2_f']) . '</p>' . '<p class="field"><label for="sidebar_title2_s">' . __('Sidebar 2nd level titles font size:') . '</label> ' . form::field('sidebar_title2_s', 7, 7, $blowup_user['sidebar_title2_s']) . '</p>' . '<p class="field"><label for="sidebar_title2_c">' . __('Sidebar 2nd level titles color:') . '</label> ' . form::field('sidebar_title2_c', 7, 7, $blowup_user['sidebar_title2_c'], 'colorpicker') . '</p>' . '<p class="field"><label for="sidebar_line_c">' . __('Sidebar lines color:') . '</label> ' . form::field('sidebar_line_c', 7, 7, $blowup_user['sidebar_line_c'], 'colorpicker') . '</p>' . '<p class="field"><label for="sidebar_link_c">' . __('Sidebar links color:') . '</label> ' . form::field('sidebar_link_c', 7, 7, $blowup_user['sidebar_link_c'], 'colorpicker') . '</p>' . '<p class="field"><label for="sidebar_link_v_c">' . __('Sidebar visited links color:') . '</label> ' . form::field('sidebar_link_v_c', 7, 7, $blowup_user['sidebar_link_v_c'], 'colorpicker') . '</p>' . '<p class="field"><label for="sidebar_link_f_c">' . __('Sidebar focus links color:') . '</label> ' . form::field('sidebar_link_f_c', 7, 7, $blowup_user['sidebar_link_f_c'], 'colorpicker') . '</p>' . '<h4 class="border-top">' . __('Entries') . '</h4>' . '<p class="field"><label for="date_title_f">' . __('Date title font:') . '</label> ' . form::combo('date_title_f', blowupConfig::fontsList(), $blowup_user['date_title_f']) . '</p>' . '<p class="field"><label for="date_title_s">' . __('Date title font size:') . '</label> ' . form::field('date_title_s', 7, 7, $blowup_user['date_title_s']) . '</p>' . '<p class="field"><label for="date_title_c">' . __('Date title color:') . '</label> ' . form::field('date_title_c', 7, 7, $blowup_user['date_title_c'], 'colorpicker') . '</p>' . '<p class="field"><label for="post_title_f">' . __('Entry title font:') . '</label> ' . form::combo('post_title_f', blowupConfig::fontsList(), $blowup_user['post_title_f']) . '</p>' . '<p class="field"><label for="post_title_s">' . __('Entry title font size:') . '</label> ' . form::field('post_title_s', 7, 7, $blowup_user['post_title_s']) . '</p>' . '<p class="field"><label for="post_title_c">' . __('Entry title color:') . '</label> ' . form::field('post_title_c', 7, 7, $blowup_user['post_title_c'], 'colorpicker') . '</p>';
if ($can_write_images) {
    echo '<p class="field"><label for="post_comment_bg_c">' . __('Comment background color:') . '</label> ' . form::field('post_comment_bg_c', 7, 7, $blowup_user['post_comment_bg_c'], 'colorpicker') . '</p>';
}
echo '<p class="field"><label for="post_comment_c">' . __('Comment text color:') . '</label> ' . form::field('post_comment_c', 7, 7, $blowup_user['post_comment_c'], 'colorpicker') . '</p>';
if ($can_write_images) {
    echo '<p class="field"><label for="post_commentmy_bg_c">' . __('My comment background color:') . '</label> ' . form::field('post_commentmy_bg_c', 7, 7, $blowup_user['post_commentmy_bg_c'], 'colorpicker') . '</p>';
}
echo '<p class="field"><label for="post_commentmy_c">' . __('My comment text color:') . '</label> ' . form::field('post_commentmy_c', 7, 7, $blowup_user['post_commentmy_c'], 'colorpicker') . '</p>' . '<h4 class="border-top">' . __('Footer') . '</h4>' . '<p class="field"><label for="footer_f">' . __('Footer font:') . '</label> ' . form::combo('footer_f', blowupConfig::fontsList(), $blowup_user['footer_f']) . '</p>' . '<p class="field"><label for="footer_s">' . __('Footer font size:') . '</label> ' . form::field('footer_s', 7, 7, $blowup_user['footer_s']) . '</p>' . '<p class="field"><label for="footer_c">' . __('Footer color:') . '</label> ' . form::field('footer_c', 7, 7, $blowup_user['footer_c'], 'colorpicker') . '</p>' . '<p class="field"><label for="footer_l_c">' . __('Footer links color:') . '</label> ' . form::field('footer_l_c', 7, 7, $blowup_user['footer_l_c'], 'colorpicker') . '</p>' . '<p class="field"><label for="footer_bg_c">' . __('Footer background color:') . '</label> ' . form::field('footer_bg_c', 7, 7, $blowup_user['footer_bg_c'], 'colorpicker') . '</p>';
echo '<h4 class="border-top">' . __('Additional CSS') . '</h4>' . '<p><label for="extra_css">' . __('Any additional CSS styles (must be written using the CSS syntax):') . '</label> ' . form::textarea('extra_css', 72, 5, html::escapeHTML($blowup_user['extra_css']), 'maximal', '', false, 'title="' . __('Additional CSS') . '"') . '</p>' . '</div>';
// Import / Export configuration
$tmp_array = array();
$tmp_exclude = array('uploaded', 'top_height');
if ($blowup_user['top_image'] == 'custom') {
    $tmp_exclude[] = 'top_image';
}
foreach ($blowup_user as $k => $v) {
    if (!in_array($k, $tmp_exclude)) {
        $tmp_array[] = $k . ':' . '"' . $v . '"';
    }
}
echo '<div class="fieldset">' . '<h3 id="bu_export">' . __('Configuration import / export') . '</h3>' . '<div id="bu_export_content">' . '<p>' . __('You can share your configuration using the following code. To apply a configuration, paste the code, click on "Apply code" and save.') . '</p>' . '<p>' . form::textarea('export_code', 72, 5, implode('; ', $tmp_array), 'maximal', '', false, 'title="' . __('Copy this code:') . '"') . '</p>' . '</div>' . '</div>';
echo '<p class="clear"><input type="submit" value="' . __('Save') . '" />' . $core->formNonce() . '</p>' . '</form>';
dcPage::helpBlock('blowupConfig');
Ejemplo n.º 4
0
 protected static function backgroundImg(&$css, $selector, $value, $image)
 {
     $file = blowupConfig::imagesPath() . '/' . $image;
     if ($value && file_exists($file)) {
         $css[$selector]['background-image'] = 'url(' . blowupConfig::imagesURL() . '/' . $image . ')';
     }
 }