/** * Get ready for displaying the skin. * * This may register some CSS or JS... */ function display_init() { // call parent: parent::display_init(); // Add CSS: require_css('basic_styles.css', 'blog'); // the REAL basic styles require_css('basic.css', 'blog'); // Basic styles require_css('blog_base.css', 'blog'); // Default styles for the blog navigation require_css('item_base.css', 'blog'); // Default styles for the post CONTENT // Make sure standard CSS is called ahead of custom CSS generated below: require_css('style.css', 'relative'); require_js('ajax.js', 'blog'); require_js('functions.js'); require_js('rollovers.js'); skin_content_header(); // Sets charset! require_js('jquery-1.2.3.min.js'); require_js('jquery.easing.min.js'); require_js('jquery.lavalamp.min.js'); // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images: if ($this->get_setting("colorbox")) { require_js_helper('colorbox', 'blog'); } }
/** * Get ready for displaying the skin. * * This may register some CSS or JS... */ function display_init() { // call parent: parent::display_init(); // Add CSS: require_css('basic_styles.css', 'blog'); // the REAL basic styles require_css('basic.css', 'blog'); // Basic styles require_css('blog_base.css', 'blog'); // Default styles for the blog navigation require_css('item_base.css', 'blog'); // Default styles for the post CONTENT require_js('ajax.js', 'blog'); require_js('functions.js'); require_js('rollovers.js'); // Make sure standard CSS is called ahead of custom CSS generated below: require_css('style.css', 'relative'); // Width switch styles add_headline('<link rel="stylesheet" href="style.css" type="text/css" title="fixed"/>'); add_headline('<link rel="alternate stylesheet" href="fluid.css" type="text/css" title="fluid"/>'); add_headline('<script type="text/javascript" src="rsc/js/styleswitcher.js"></script>'); // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images: if ($this->get_setting("colorbox")) { require_js_helper('colorbox', 'blog'); } }
/** * Get ready for displaying the skin. * * This may register some CSS or JS... */ function display_init() { // call parent: parent::display_init(); // Add CSS: require_css('basic_styles.css', 'blog'); // the REAL basic styles require_css('basic.css', 'blog'); // Basic styles require_css('blog_base.css', 'blog'); // Default styles for the blog navigation require_css('item_base.css', 'blog'); // Default styles for the post CONTENT // Make sure standard CSS is called ahead of custom CSS generated below: require_css('rsc/css/style.css', 'relative'); // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images: if ($this->get_setting("colorbox")) { require_js_helper('colorbox', 'blog'); } // Add custom CSS: $custom_css = ''; $html5support = ''; if ($this->get_setting('html5_support') == '1') { // HTML5 Support $html5support .= ' <!--[if IE]> <script src="rsc/js/html5.js"></script> <![endif]--> <link rel="stylesheet" href="rsc/css/html5.css" type="text/css" /> '; } $custom_css = '' . $html5support . ' '; add_headline($custom_css); }
/** * Get ready for displaying the skin. * * This may register some CSS or JS... */ function display_init() { // call parent: parent::display_init(); // Add CSS: // fp> Note: having those here should allow // 1) Requesting them earlier as if they are @import'ed // 2) Allow bundling // fp> I am not 100% sure though. Comments welcome :) /*require_css( 'basic_styles.css', 'blog' ); // the REAL basic styles require_css( 'basic.css', 'blog' ); // Basic styles require_css( 'blog_base.css', 'blog' ); // Default styles for the blog navigation require_css( 'item_base.css', 'blog' ); // Default styles for the post CONTENT require_css( 'item.css', 'relative' ); require_css( 'style.css', 'relative' );*/ // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images: if ($this->get_setting('colorbox')) { require_js_helper('colorbox', 'blog'); } require_css('basic_styles.css', 'blog'); // the REAL basic styles require_css('basic.css', 'blog'); // Basic styles require_css('style.css', 'relative'); require_js('js/core.js', 'relative'); require_js('navigation.js', 'blog'); }
/** * Get ready for displaying the skin. * * This may register some CSS or JS... */ function display_init() { // call parent: parent::display_init(); // Add CSS: require_css('basic_styles.css', 'blog'); // the REAL basic styles require_css('basic.css', 'blog'); // Basic styles require_css('blog_base.css', 'blog'); // Default styles for the blog navigation require_css('item_base.css', 'blog'); // Default styles for the post CONTENT // Make sure standard CSS is called ahead of custom CSS generated below: require_css('style.css', true); // Add custom CSS: $custom_css = ''; if ($body_bg_color = $this->get_setting('body_bg_color')) { // Custom Header background color: $custom_css .= ' body { background-color: ' . $body_bg_color . " }\n"; } if (!empty($custom_css)) { $custom_css = '<style type="text/css"> <!-- ' . $custom_css . ' --> </style>'; add_headline($custom_css); } // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images: if ($this->get_setting("colorbox")) { require_js_helper('colorbox', 'blog'); } }
/** * Get ready for displaying the skin. * * This may register some CSS or JS... */ function display_init() { // call parent: parent::display_init(); // Add CSS: require_css('basic_styles.css', 'blog'); // the REAL basic styles require_css('basic.css', 'blog'); // Basic styles require_css('blog_base.css', 'blog'); // Default styles for the blog navigation require_css('item_base.css', 'blog'); // Default styles for the post CONTENT // Make sure standard CSS is called ahead of custom CSS generated below: require_css('style.css', 'relative'); // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images: if ($this->get_setting("colorbox")) { require_js_helper('colorbox', 'blog'); } add_headline('<link rel="stylesheet" href="rsc/css/style.css" type="text/css" /> <link rel="alternate stylesheet" href="rsc/css/red.css" type="text/css" title="red" /> <link rel="alternate stylesheet" href="rsc/css/blue.css" type="text/css" title="blue" /> <link rel="alternate stylesheet" href="rsc/css/green.css" type="text/css" title="green" /> <link rel="alternate stylesheet" href="rsc/css/brown.css" type="text/css" title="brown" /> <link rel="alternate stylesheet" href="rsc/css/magenta.css" type="text/css" title="magenta" />'); // Add custom CSS: $custom_css = ''; $skincolor = $this->get_setting('skin_color'); $widthstyle = ''; $html5support = ''; if ($this->get_setting('width_style') == 'fixed') { // Fixed Layout $widthstyle .= 'width: 950px !important; /* fixed */'; } if ($this->get_setting('width_style') == 'fluid') { // Fluid Layout $widthstyle .= 'width: 90% !important; /* fluid */'; } if ($this->get_setting('html5_support') == '1') { // HTML5 Support $html5support .= ' <!--[if IE]> <script src="rsc/js/html5.js"></script> <![endif]--> <link rel="stylesheet" href="rsc/css/html5.css" type="text/css" /> '; } $custom_css = '' . $html5support . ' <link rel="stylesheet" href="rsc/css/' . $skincolor . '.css" type="text/css" title="' . $skincolor . '" /> <style type="text/css"> div.widthstyle { ' . $widthstyle . ' } </style> '; add_headline($custom_css); }
/** * Get ready for displaying the skin. * * This may register some CSS or JS... */ function display_init() { // call parent: parent::display_init(); // Add CSS: require_css('basic_styles.css', 'blog'); // the REAL basic styles require_css('basic.css', 'blog'); // Basic styles require_css('blog_base.css', 'blog'); // Default styles for the blog navigation // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images: if ($this->get_setting("colorbox")) { require_js_helper('colorbox', 'blog'); } }
/** * Get ready for displaying the skin. * * This may register some CSS or JS... */ function display_init() { global $disp; // call parent: parent::display_init(); // Add CSS: require_css('basic_styles.css', 'blog'); // the REAL basic styles require_css('basic.css', 'blog'); // Basic styles require_css('blog_base.css', 'blog'); // Default styles for the blog navigation require_css('item_base.css', 'blog'); // Default styles for the post CONTENT require_css('style.css', 'relative'); // Add custom CSS: $custom_css = ''; // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images: if ($this->get_setting("colorbox")) { require_js_helper('colorbox', 'blog'); } if ($main_content_headline = $this->get_setting('main_content_headline')) { // Custom introduction title: $custom_css .= 'div#main h1:before { content: "' . $main_content_headline . '" }'; } if ($main_content = $this->get_setting('main_content')) { // Custom inroduction text: $custom_css .= 'div#main p:before { content: "' . $main_content . '" }'; } if (!empty($custom_css)) { if ($disp == 'front') { // Use standard bootstrap style on width <= 640px only for disp=front $custom_css = '@media only screen and (min-width: 641px) { ' . $custom_css . ' }'; } $custom_css = '<style type="text/css"> <!-- ' . $custom_css . ' --> </style>'; add_headline($custom_css); } }
/** * Get ready for displaying the skin. * * This may register some CSS or JS... */ function display_init() { // call parent: parent::display_init(); // Add CSS: require_css('basic_styles.css', 'blog'); // the REAL basic styles require_css('basic.css', 'blog'); // Basic styles require_css('blog_base.css', 'blog'); // Default styles for the blog navigation require_css('item_base.css', 'blog'); // Default styles for the post CONTENT // Make sure standard CSS is called ahead of custom CSS generated below: require_css('style.css', 'relative'); // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images: if ($this->get_setting("colorbox")) { require_js_helper('colorbox', 'blog'); } }
/** * Get ready for displaying the skin. * * This may register some CSS or JS... */ function display_init() { // Request some common features that the parent function (Skin::display_init()) knows how to provide: parent::display_init(array('jquery', 'font_awesome', 'bootstrap', 'bootstrap_evo_css', 'bootstrap_messages', 'style_css', 'colorbox', 'bootstrap_init_tooltips', 'disp_auto')); // Add CSS: require_css('basic_styles.css', 'blog'); // the REAL basic styles require_css('basic.css', 'blog'); // Basic styles require_css('blog_base.css', 'blog'); // Default styles for the blog navigation require_css('item_base.css', 'blog'); // Default styles for the post CONTENT require_css('style.css', 'relative'); // Add custom CSS: $custom_css = ''; // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images: if ($this->get_setting("colorbox")) { require_js_helper('colorbox', 'blog'); } }
/** * Get ready for displaying the skin. * * This may register some CSS or JS... */ function display_init() { // call parent: parent::display_init(); require_css('basic_styles.css', 'blog'); // the REAL basic styles require_css('basic.css', 'blog'); // Basic styles require_css('img.css', 'blog'); // Standard image styles require_css('blog_base.css', 'blog'); // Default styles for the blog navigation require_css('item_base.css', 'blog'); // Default styles for the post CONTENT require_css('forms.css', 'blog'); // Default form styles require_css('comments.css', 'blog'); // Default comment styles add_headline('<!--[if IE]><link rel="stylesheet" type="text/css" href="ie.css" /><![endif]-->'); if ($this->get_setting("colorbox")) { require_js_helper('colorbox', 'blog'); } }
/** * Initialize list mode; Several actions need this. */ function init_list_mode() { global $tab, $Blog, $UserSettings, $ItemList, $AdminUI, $posttypes_perms; // set default itemslist param prefix $items_list_param_prefix = 'items_'; if (param('p', 'integer', NULL) || param('title', 'string', NULL)) { // Single post requested, do not filter any post types. If the user // has clicked a post link on the dashboard and previously has selected // a tab which would filter this post, it wouldn't be displayed now. $tab = 'full'; // in case of single item view params prefix must be empty $items_list_param_prefix = NULL; } else { // Store/retrieve preferred tab from UserSettings: $UserSettings->param_Request('tab', 'pref_browse_tab', 'string', NULL, true, true); } /* * Init list of posts to display: */ load_class('items/model/_itemlist.class.php', 'ItemList2'); if (!empty($tab) && !empty($items_list_param_prefix)) { // Use different param prefix for each tab $items_list_param_prefix .= substr($tab, 0, 7) . '_'; } // Create empty List: $ItemList = new ItemList2($Blog, NULL, NULL, $UserSettings->get('results_per_page'), 'ItemCache', $items_list_param_prefix, $tab); // COPY (func) $ItemList->set_default_filters(array('visibility_array' => get_visibility_statuses('keys'))); if ($Blog->get_setting('orderby') == 'RAND') { // Do not display random posts in backoffice for easy management $ItemList->set_default_filters(array('orderby' => 'datemodified')); } switch ($tab) { case 'full': $ItemList->set_default_filters(array('types' => NULL)); // $AdminUI->breadcrumbpath_add( T_('All items'), '?ctrl=items&blog=$blog$&tab='.$tab.'&filter=restore' ); // require colorbox js require_js_helper('colorbox'); break; case 'manual': if ($Blog->get('type') != 'manual') { // Display this tab only for manual blogs global $admin_url; header_redirect($admin_url . '?ctrl=items&blog=' . $Blog->ID . '&tab=list&filter=restore'); } $AdminUI->breadcrumbpath_add(T_('Manual Pages'), '?ctrl=items&blog=$blog$&tab=' . $tab . '&filter=restore'); break; case 'list': // Nothing special $AdminUI->breadcrumbpath_add(T_('Regular posts'), '?ctrl=items&blog=$blog$&tab=' . $tab . '&filter=restore'); break; case 'pages': $ItemList->set_default_filters(array('types' => implode(',', $posttypes_perms['page']))); $AdminUI->breadcrumbpath_add(T_('Pages'), '?ctrl=items&blog=$blog$&tab=' . $tab . '&filter=restore'); break; case 'intros': $ItemList->set_default_filters(array('types' => implode(',', $posttypes_perms['intro']))); $AdminUI->breadcrumbpath_add(T_('Intro posts'), '?ctrl=items&blog=$blog$&tab=' . $tab . '&filter=restore'); break; case 'podcasts': $ItemList->set_default_filters(array('types' => implode(',', $posttypes_perms['podcast']))); $AdminUI->breadcrumbpath_add(T_('Podcasts'), '?ctrl=items&blog=$blog$&tab=' . $tab . '&filter=restore'); break; case 'links': $ItemList->set_default_filters(array('types' => '3000')); $AdminUI->breadcrumbpath_add(T_('Links'), '?ctrl=items&blog=$blog$&tab=' . $tab . '&filter=restore'); break; case 'ads': $ItemList->set_default_filters(array('types' => '4000')); $AdminUI->breadcrumbpath_add(T_('Advertisements'), '?ctrl=items&blog=$blog$&tab=' . $tab . '&filter=restore'); break; case 'tracker': // In tracker mode, we want a different default sort: $ItemList->set_default_filters(array('orderby' => 'priority', 'order' => 'ASC')); break; default: // Delete the pref_browse_tab setting so that the default // (full) gets used the next time the user wants to browse // a blog and we don't run into the same error again. $UserSettings->delete('pref_browse_tab'); $UserSettings->dbupdate(); debug_die('Unknown filterset [' . $tab . ']'); } // Init filter params: if (!$ItemList->load_from_Request()) { // If we could not init a filterset from request // typically happens when we could no fall back to previously saved filterset... // echo ' no filterset!'; } }
$AdminUI->set_path('site', 'dashboard'); $AdminUI->breadcrumbpath_init(false); $AdminUI->breadcrumbpath_add(T_('Site'), $admin_url . '?ctrl=dashboard'); $AdminUI->breadcrumbpath_add(T_('Site Dashboard'), $admin_url . '?ctrl=dashboard'); // Set an url for manual page: $AdminUI->set_page_manual_link('site-dashboard'); } // Load jquery UI to animate background color on change comment status and to transfer a comment to recycle bin require_js('#jqueryUI#'); require_js('communication.js'); // auto requires jQuery // Load the appropriate blog navigation styles (including calendar, comment forms...): require_css($AdminUI->get_template('blog_base.css')); // Default styles for the blog navigation // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images: require_js_helper('colorbox'); // Include files to work with charts require_js('#easypiechart#'); require_css('jquery/jquery.easy-pie-chart.css'); if (empty($blog)) { // Init JS to quick edit an order of the blogs in the table cell by AJAX init_field_editor_js(array('field_prefix' => 'order-blog-', 'action_url' => $admin_url . '?ctrl=dashboard&order_action=update&order_data=')); } // Display <html><head>...</head> section! (Note: should be done early if actions do not redirect) $AdminUI->disp_html_head(); // Display title, menu, messages, etc. (Note: messages MUST be displayed AFTER the actions) $AdminUI->disp_body_top(); if ($blog) { // We want to look at a specific blog: // Begin payload block: // This div is to know where to display the message after overlay close:
/** * Memorize that a specific js helper will be required by the current page. * This allows to require JS + SS + do init. * * All requested helpers will be included in the page head only once (when headlines is called) * Requested helpers should add their required translation strings and any other settings * * @param string helper, name of the required helper */ function require_js_helper($helper = '', $relative_to = 'rsc_url') { static $helpers; if (empty($helpers) || !in_array($helper, $helpers)) { // Helper not already added, add the helper: switch ($helper) { case 'helper': // main helper object required global $debug; require_js('#jquery#', $relative_to); // dependency require_js('helper.js', $relative_to); add_js_headline('jQuery(document).ready(function() { b2evoHelper.Init({ debug:' . ($debug ? 'true' : 'false') . ' }); });'); break; case 'communications': // communications object required require_js_helper('helper', $relative_to); // dependency global $dispatcher; require_js('communication.js', $relative_to); add_js_headline('jQuery(document).ready(function() { b2evoCommunications.Init({ dispatcher:"' . $dispatcher . '" }); });'); // add translation strings T_('Update cancelled', NULL, array('for_helper' => true)); T_('Update paused', NULL, array('for_helper' => true)); T_('Changes pending', NULL, array('for_helper' => true)); T_('Saving changes', NULL, array('for_helper' => true)); break; case 'colorbox': // Colorbox: a lightweight Lightbox alternative -- allows zooming on images and slideshows in groups of images // Added by fplanque - (MIT License) - http://colorpowered.com/colorbox/ require_js('#jqueryUI#', $relative_to); require_js('voting.js', $relative_to); require_js('colorbox/jquery.colorbox-min.js', $relative_to); require_css('colorbox/colorbox.css', $relative_to); if (is_logged_in()) { // If user is logged in - display a voting panel $colorbox_params = ', displayVoting: true, votingUrl: "' . get_secure_htsrv_url() . 'anon_async.php?action=voting&vote_type=file&' . url_crumb('voting') . '", minWidth: 345'; } else { // Set minimum width $colorbox_params = ', minWidth: 255'; } add_js_headline('jQuery(document).ready(function() { jQuery("a[rel^=\'lightbox\']").colorbox( { maxWidth: "95%", maxHeight: "90%", slideshow: true, slideshowAuto: false' . $colorbox_params . ' } ); } );'); // TODO: translation strings break; } // add to list of loaded helpers $helpers[] = $helper; } }
/** * Get ready for displaying the skin. * * This may register some CSS or JS... */ function display_init() { // call parent: parent::display_init(); // Add CSS: require_css('basic_styles.css', 'blog'); // the REAL basic styles require_css('basic.css', 'blog'); // Basic styles require_css('blog_base.css', 'blog'); // Default styles for the blog navigation require_css('item_base.css', 'blog'); // Default styles for the post CONTENT // Make sure standard CSS is called ahead of custom CSS generated below: require_css('style.css', true); // Add custom CSS: $custom_css = ''; if ($color = $this->get_setting('head_bg_color')) { // Custom Header background color: $custom_css .= ' div.pageHeader { background-color: ' . $color . " }\n"; } if ($color = $this->get_setting('head_text_color')) { // Custom Header text color: $custom_css .= ' div.pageHeader, div.pageHeader a { color: ' . $color . " }\n"; } if ($color = $this->get_setting('menu_bg_color')) { // Custom Menu background color: $custom_css .= ' div.top_menu_bg { background-color: ' . $color . " }\n"; } if ($color = $this->get_setting('menu_text_color')) { // Custom Menu text color: $custom_css .= ' div.top_menu a { color: ' . $color . " }\n"; } if ($color = $this->get_setting('footer_bg_color')) { // Custom Footer background color: $custom_css .= ' div#pageFooter { background-color: ' . $color . " }\n"; } if (!empty($custom_css)) { $custom_css = '<style type="text/css"> <!-- ' . $custom_css . ' --> </style>'; add_headline($custom_css); } // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images: if ($this->get_setting("colorbox")) { require_js_helper('colorbox', 'blog'); } // Functions to switch between the width sizes require_js('#jquery#', 'blog'); require_js('widthswitcher.js', 'blog'); }
/** * Get ready for displaying the skin. * * This method may register some CSS or JS. * The default implementation can register a few common things that you may request in the $features param. * This is where you'd specify you want to use BOOTSTRAP, etc. * * If this doesn't do what you need you may add functions like the following to your skin's display_init(): * require_js() , require_css() , add_js_headline() * * @param array of possible features you want to include. If empty, will default to {'b2evo_base', 'style', 'colorbox'} for backwards compatibility. */ function display_init($features = array()) { global $debug, $Messages, $disp; if (empty($features)) { // Fall back to v5 default set of features: $features = array('b2evo_base_css', 'style_css', 'colorbox', 'disp_auto'); } // "Temporary" patch to at least have disp_auto unless another disp_xxx was specified. Use 'disp_off' to NOT include anuthing. if (!preg_grep('/disp_.*/', $features)) { $features[] = 'disp_auto'; } // We're NOT using foreach so that the array can continue to grow during parsing: (see 'disp_auto') for ($i = 0; isset($features[$i]); $i++) { // Get next feature to include: $feature = $features[$i]; switch ($feature) { case 'jquery': // Include jQuery: require_js('#jquery#', 'blog'); break; case 'font_awesome': // Initialize font-awesome icons and use them as a priority over the glyphicons, @see get_icon() init_fontawesome_icons('fontawesome-glyphicons'); break; case 'bootstrap': // Include Bootstrap: require_js('#bootstrap#', 'blog'); require_css('#bootstrap_css#', 'blog'); break; case 'bootstrap_theme_css': // Include the Bootstrap Theme CSS: require_css('#bootstrap_theme_css#', 'blog'); break; case 'bootstrap_evo_css': // Include the bootstrap-b2evo_base CSS (NEW / v6 style) - Use this when you use Bootstrap: if ($debug) { // Use readable CSS: // rsc/less/bootstrap-basic_styles.less // rsc/less/bootstrap-basic.less // rsc/less/bootstrap-blog_base.less // rsc/less/bootstrap-item_base.less // rsc/less/bootstrap-evoskins.less require_css('bootstrap-b2evo_base.bundle.css', 'blog'); // CSS concatenation of the above } else { // Use minified CSS: require_css('bootstrap-b2evo_base.bmin.css', 'blog'); // Concatenation + Minifaction of the above } break; case 'bootstrap_init_tooltips': // JS to init Bootstrap tooltips (E.g. on comment form for allowed file extensions): add_js_headline('jQuery( function () { jQuery( \'[data-toggle="tooltip"]\' ).tooltip() } )'); break; case 'bootstrap_messages': // Initialize $Messages Class to use Bootstrap styles: $Messages->set_params(array('class_success' => 'alert alert-dismissible alert-success fade in', 'class_warning' => 'alert alert-dismissible alert-warning fade in', 'class_error' => 'alert alert-dismissible alert-danger fade in', 'class_note' => 'alert alert-dismissible alert-info fade in', 'before_message' => '<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span></button>')); break; case 'b2evo_base_css': // Include the b2evo_base CSS (OLD / v5 style) - Use this when you DON'T use Bootstrap: if ($debug) { // Use readable CSS: // require_css( 'basic_styles.css', 'blog' ); // the REAL basic styles // require_css( 'basic.css', 'blog' ); // Basic styles // require_css( 'blog_base.css', 'blog' ); // Default styles for the blog navigation // require_css( 'item_base.css', 'blog' ); // Default styles for the post CONTENT // require_css( 'b2evo_base.bundle.css', 'blog' ); // Concatenation of the above require_css('b2evo_base.bundle.css', 'blog'); // Concatenation + Minifaction of the above } else { // Use minified CSS: require_css('b2evo_base.bmin.css', 'blog'); // Concatenation + Minifaction of the above } break; case 'style_css': // Include the default skin style.css: // You should make sure this is called ahead of any custom generated CSS. if ($this->use_min_css == false || $debug || $this->use_min_css == 'check' && !file_exists(dirname(__FILE__) . '/style.min.css')) { // Use readable CSS: require_css('style.css', 'relative'); // Relative to <base> tag (current skin folder) } else { // Use minified CSS: require_css('style.min.css', 'relative'); // Relative to <base> tag (current skin folder) } break; case 'colorbox': // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images: if ($this->get_setting('colorbox')) { // This can be enabled by a setting in skins where it may be relevant require_js_helper('colorbox', 'blog'); } break; case 'disp_auto': // Automatically add a disp_xxx for current $disp: $features[] = 'disp_' . $disp; break; case 'disp_single': // Specific features for disp=single: // Specific features for disp=single: case 'disp_page': // Specific features for disp=page: global $Blog; // Used to init functions for AJAX forms to add a comment: init_ajax_forms('blog'); // Used to set rating for a new comment: init_ratings_js('blog'); // Used to vote on the comments: init_voting_comment_js('blog'); // Used to display a tooltip to the right of plugin help icon: init_plugins_js('blog', $this->get_template('tooltip_plugin')); // Used to autocomplete usernames in textarea: init_autocomplete_usernames_js('blog'); if ($Blog->get_setting('allow_rating_comment_helpfulness')) { // Load jquery UI to animate background color on change comment status or on vote: require_js('#jqueryUI#', 'blog'); } break; case 'disp_users': // Specific features for disp=users: // Used to add new search field "Specific criteria": require_js('#jqueryUI#', 'blog'); require_css('#jqueryUI_css#', 'blog'); // Require results.css to display thread query results in a table: if (!in_array('bootstrap', $features)) { // Only for NON-bootstrap skins require_css('results.css', 'blog'); // Results/tables styles } // Require functions.js to show/hide a panel with filters: require_js('functions.js', 'blog'); // Include this file to expand/collapse the filters panel when JavaScript is disabled global $inc_path; require_once $inc_path . '_filters.inc.php'; break; case 'disp_messages': // Specific features for disp=messages: // Used to display a tooltip to the right of plugin help icon: init_plugins_js('blog', $this->get_template('tooltip_plugin')); // Require results.css to display message query results in a table if (!in_array('bootstrap', $features)) { // Only for NON-bootstrap skins require_css('results.css', 'blog'); // Results/tables styles } // Require functions.js to show/hide a panel with filters: require_js('functions.js', 'blog'); // Include this file to expand/collapse the filters panel when JavaScript is disabled global $inc_path; require_once $inc_path . '_filters.inc.php'; break; case 'disp_contacts': // Specific features for disp=contacts: // Used for combo box "Add all selected contacts to this group": require_js('form_extensions.js', 'blog'); // Require results.css to display contact query results in a table if (!in_array('bootstrap', $features)) { // Only for NON-bootstrap skins require_css('results.css', 'blog'); // Results/tables styles } // Require functions.js to show/hide a panel with filters: require_js('functions.js', 'blog'); // Include this file to expand/collapse the filters panel when JavaScript is disabled global $inc_path; require_once $inc_path . '_filters.inc.php'; break; case 'disp_threads': // Specific features for disp=threads: if (in_array(get_param('action'), array('new', 'create', 'preview'))) { // Used to suggest usernames for the field "Recipients": init_tokeninput_js('blog'); } // Used to display a tooltip to the right of plugin help icon: init_plugins_js('blog', $this->get_template('tooltip_plugin')); // Require results.css to display thread query results in a table: if (!in_array('bootstrap', $features)) { // Only for NON-bootstrap skins require_css('results.css', 'blog'); // Results/tables styles } // Require functions.js to show/hide a panel with filters: require_js('functions.js', 'blog'); // Include this file to expand/collapse the filters panel when JavaScript is disabled global $inc_path; require_once $inc_path . '_filters.inc.php'; break; case 'disp_login': // Specific features for disp=threads: global $Settings, $Plugins; $transmit_hashed_password = (bool) $Settings->get('js_passwd_hashing') && !(bool) $Plugins->trigger_event_first_true('LoginAttemptNeedsRawPassword'); if ($transmit_hashed_password) { // Include JS for client-side password hashing: require_js('build/sha1_md5.bmin.js', 'blog'); } break; case 'disp_profile': // Specific features for disp=profile: // Used to add new user fields: init_userfields_js('blog', $this->get_template('tooltip_plugin')); // Used to crop profile pictures: require_js('#jquery#', 'blog'); require_js('#jcrop#', 'blog'); require_css('#jcrop_css#', 'blog'); break; case 'disp_avatar': // Specific features for disp=avatar: // Used to crop profile pictures: require_js('#jquery#', 'blog'); require_js('#jcrop#', 'blog'); require_css('#jcrop_css#', 'blog'); break; case 'disp_edit': // Specific features for disp=edit: // Require results.css to display attachments as a result table: require_css('results.css'); init_tokeninput_js('blog'); // Used to display a date picker for date form fields: init_datepicker_js('blog'); // Used to display a tooltip to the right of plugin help icon: init_plugins_js('blog', $this->get_template('tooltip_plugin')); // Used to switch to advanced editing: require_js('backoffice.js', 'blog'); // Used to automatically checks the matching extracat when we select a new main cat: require_js('extracats.js', 'blog'); // Used to autocomplete usernames in textarea: init_autocomplete_usernames_js('blog'); break; case 'disp_edit_comment': // Specific features for disp=edit_comment: // Require results.css to display attachments as a result table: require_css('results.css'); // Used to set rating for a new comment: init_ratings_js('blog'); // Used to display a date picker for date form fields: init_datepicker_js('blog'); // Used to display a tooltip to the right of plugin help icon: init_plugins_js('blog', $this->get_template('tooltip_plugin')); // Used to autocomplete usernames in textarea: init_autocomplete_usernames_js('blog'); break; case 'disp_useritems': // Specific features for disp=useritems: // Specific features for disp=useritems: case 'disp_usercomments': // Specific features for disp=usercomments: // Require results.css to display item/comment query results in a table require_css('results.css'); // Results/tables styles // Require functions.js to show/hide a panel with filters require_js('functions.js', 'blog'); // Include this file to expand/collapse the filters panel when JavaScript is disabled global $inc_path; require_once $inc_path . '_filters.inc.php'; break; default: // We no longer want to do this because of 'disp_auto': // debug_die( 'This skin has requested an unknown feature: \''.$feature.'\'. Maybe this skin requires a more recent version of b2evolution.' ); } } }
/** * Get ready for displaying the skin. * * This may register some CSS or JS... */ function display_init() { // call parent: parent::display_init(); // Add CSS: // fp> Note: having those here should allow // 1) Requesting them earlier as if they are @import'ed // 2) Allow bundling // fp> I am not 100% sure though. Comments welcome :) require_css('basic_styles.css', 'blog'); // the REAL basic styles require_css('basic.css', 'blog'); // Basic styles require_css('blog_base.css', 'blog'); // Default styles for the blog navigation require_css('item_base.css', 'blog'); // Default styles for the post CONTENT require_css('item.css', 'relative'); require_css('style.css', 'relative'); // Add custom CSS: $custom_css = ''; $head_bg_color_top = $this->get_setting('head_bg_color_top'); $head_bg_color_bottom = $this->get_setting('head_bg_color_bottom'); if (!empty($head_bg_color_top) && !empty($head_bg_color_bottom)) { // Custom Header background color: $custom_css .= '#headerimg {' . "\n" . 'background:-webkit-linear-gradient(top, ' . $head_bg_color_top . ', ' . $head_bg_color_bottom . ');' . "\n" . 'background:-moz-linear-gradient(top, ' . $head_bg_color_top . ', ' . $head_bg_color_bottom . ');' . "\n" . 'background:-o-linear-gradient(top, ' . $head_bg_color_top . ', ' . $head_bg_color_bottom . ');' . "\n" . 'background: -ms-linear-gradient(top, ' . $head_bg_color_top . ', ' . $head_bg_color_bottom . ');' . "\n" . 'filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=\'' . $head_bg_color_top . '\', endColorstr=\'' . $head_bg_color_bottom . '\');' . "\n" . '}' . "\n"; } if (!empty($custom_css)) { $custom_css = '<style type="text/css"> <!-- ' . $custom_css . ' --> </style>'; add_headline($custom_css); } // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images: if ($this->get_setting("colorbox")) { require_js_helper('colorbox', 'blog'); } }
/** * Initialize list mode; Several actions need this. */ function init_list_mode() { global $tab, $tab_type, $Blog, $UserSettings, $ItemList, $AdminUI; // set default itemslist param prefix $items_list_param_prefix = 'items_'; if (param('p', 'integer', NULL) || param('title', 'string', NULL)) { // Single post requested, do not filter any post types. If the user // has clicked a post link on the dashboard and previously has selected // a tab which would filter this post, it wouldn't be displayed now. $tab = 'full'; // in case of single item view params prefix must be empty $items_list_param_prefix = NULL; } else { // Store/retrieve preferred tab from UserSettings: $UserSettings->param_Request('tab', 'pref_browse_tab', 'string', NULL, true, true); $UserSettings->param_Request('tab_type', 'pref_browse_tab_type', 'string', NULL, true, true); } if ($tab == 'tracker' && !$Blog->get_setting('use_workflow')) { // Display workflow view only if it is enabled global $Messages; $Messages->add(T_('Workflow feature has not been enabled for this collection.'), 'note'); $tab = 'full'; } /* * Init list of posts to display: */ load_class('items/model/_itemlist.class.php', 'ItemList2'); if (!empty($tab) && !empty($items_list_param_prefix)) { // Use different param prefix for each tab $items_list_param_prefix .= substr($tab, 0, 7) . '_'; //.utf8_strtolower( $tab_type ).'_'; } // Set different filterset name for each different tab and tab_type $filterset_name = $tab == 'type' ? $tab . '_' . utf8_strtolower($tab_type) : $tab; // Create empty List: $ItemList = new ItemList2($Blog, NULL, NULL, $UserSettings->get('results_per_page'), 'ItemCache', $items_list_param_prefix, $filterset_name); // COPY (func) $ItemList->set_default_filters(array('visibility_array' => get_visibility_statuses('keys'))); if ($Blog->get_setting('orderby') == 'RAND') { // Do not display random posts in backoffice for easy management $ItemList->set_default_filters(array('orderby' => 'datemodified')); } switch ($tab) { case 'full': $ItemList->set_default_filters(array('types' => NULL)); // $AdminUI->breadcrumbpath_add( T_('All items'), '?ctrl=items&blog=$blog$&tab='.$tab.'&filter=restore' ); // require colorbox js require_js_helper('colorbox'); $AdminUI->breadcrumbpath_add(T_('All'), '?ctrl=items&blog=$blog$&tab=full&filter=restore'); break; case 'manual': if ($Blog->get('type') != 'manual') { // Display this tab only for manual blogs global $admin_url; header_redirect($admin_url . '?ctrl=items&blog=' . $Blog->ID . '&tab=type&tab_type=posts&filter=restore'); } global $ReqURI, $blog; init_field_editor_js(array('action_url' => $ReqURI . '&blog=' . $blog . '&order_action=update&order_data=')); $AdminUI->breadcrumbpath_add(T_('Manual view'), '?ctrl=items&blog=$blog$&tab=' . $tab . '&filter=restore'); break; case 'type': // Filter a posts list by type $ItemList->set_default_filters(array('types' => get_item_types_by_tab($tab_type))); $AdminUI->breadcrumbpath_add(T_($tab_type), '?ctrl=items&blog=$blog$&tab=' . $tab . '&tab_type=' . urlencode($tab_type) . '&filter=restore'); break; case 'tracker': // In tracker mode, we want a different default sort: $ItemList->set_default_filters(array('orderby' => 'priority', 'order' => 'ASC')); $AdminUI->breadcrumbpath_add(T_('Workflow view'), '?ctrl=items&blog=$blog$&tab=tracker&filter=restore'); $AdminUI->set_page_manual_link('workflow-features'); // JS to edit priority of items from list view require_js('jquery/jquery.jeditable.js', 'rsc_url'); break; default: // Delete the pref_browse_tab setting so that the default // (full) gets used the next time the user wants to browse // a blog and we don't run into the same error again. $UserSettings->delete('pref_browse_tab'); $UserSettings->dbupdate(); debug_die('Unknown filterset [' . $tab . ']'); } // Init filter params: if (!$ItemList->load_from_Request()) { // If we could not init a filterset from request // typically happens when we could no fall back to previously saved filterset... // echo ' no filterset!'; } }
/** * Memorize that a specific js helper will be required by the current page. * This allows to require JS + SS + do init. * * All requested helpers will be included in the page head only once (when headlines is called) * Requested helpers should add their required translation strings and any other settings * * @param string helper, name of the required helper */ function require_js_helper($helper = '', $relative_to = 'rsc_url') { static $helpers; if (empty($helpers) || !in_array($helper, $helpers)) { // Helper not already added, add the helper: switch ($helper) { case 'helper': // main helper object required global $debug; require_js('#jquery#', $relative_to); // dependency require_js('helper.js', $relative_to); add_js_headline('jQuery(document).ready(function() { b2evoHelper.Init({ debug:' . ($debug ? 'true' : 'false') . ' }); });'); break; case 'communications': // communications object required require_js_helper('helper', $relative_to); // dependency global $dispatcher; require_js('communication.js', $relative_to); add_js_headline('jQuery(document).ready(function() { b2evoCommunications.Init({ dispatcher:"' . $dispatcher . '" }); });'); // add translation strings T_('Update cancelled', NULL, array('for_helper' => true)); T_('Update paused', NULL, array('for_helper' => true)); T_('Changes pending', NULL, array('for_helper' => true)); T_('Saving changes', NULL, array('for_helper' => true)); break; case 'colorbox': // Colorbox: a lightweight Lightbox alternative -- allows zooming on images and slideshows in groups of images // Added by fplanque - (MIT License) - http://colorpowered.com/colorbox/ global $b2evo_icons_type, $blog; $blog_param = empty($blog) ? '' : '&blog=' . $blog; // Colorbox params to translate the strings: $colorbox_strings_params = 'current: "' . TS_('image {current} of {total}') . '", previous: "' . TS_('Previous') . '", next: "' . TS_('Next') . '", close: "' . TS_('Close') . '", openNewWindowText: "' . TS_('Open in a new window') . '", slideshowStart: "' . TS_('Start slideshow') . '", slideshowStop: "' . TS_('Stop slideshow') . '",'; // Colorbox params to display a voting panel: $colorbox_voting_params = '{' . $colorbox_strings_params . ' displayVoting: true, votingUrl: "' . get_secure_htsrv_url() . 'anon_async.php?action=voting&vote_type=link&b2evo_icons_type=' . $b2evo_icons_type . $blog_param . '", minWidth: 305}'; // Colorbox params without voting panel: $colorbox_no_voting_params = '{' . $colorbox_strings_params . ' minWidth: 255}'; // Initialize js variables b2evo_colorbox_params* that are used in async loaded colorbox file if (is_logged_in()) { // User is logged in // All unknown images have a voting panel $colorbox_params_other = 'var b2evo_colorbox_params_other = ' . $colorbox_voting_params; if (is_admin_page()) { // Display a voting panel for all images in backoffice $colorbox_params_post = 'var b2evo_colorbox_params_post = ' . $colorbox_voting_params; $colorbox_params_cmnt = 'var b2evo_colorbox_params_cmnt = ' . $colorbox_voting_params; $colorbox_params_user = '******' . $colorbox_voting_params; } else { // Display a voting panel depending on skin settings global $Skin; if (!empty($Skin)) { $colorbox_params_post = 'var b2evo_colorbox_params_post = ' . ($Skin->get_setting('colorbox_vote_post') ? $colorbox_voting_params : $colorbox_no_voting_params); $colorbox_params_cmnt = 'var b2evo_colorbox_params_cmnt = ' . ($Skin->get_setting('colorbox_vote_comment') ? $colorbox_voting_params : $colorbox_no_voting_params); $colorbox_params_user = '******' . ($Skin->get_setting('colorbox_vote_user') ? $colorbox_voting_params : $colorbox_no_voting_params); } } } if (!isset($colorbox_params_post)) { // Don't display a voting panel for all images if user is NOT logged in OR for case when $Skin is not defined $colorbox_params_other = 'var b2evo_colorbox_params_other = ' . $colorbox_no_voting_params; $colorbox_params_post = 'var b2evo_colorbox_params_post = ' . $colorbox_no_voting_params; $colorbox_params_cmnt = 'var b2evo_colorbox_params_cmnt = ' . $colorbox_no_voting_params; $colorbox_params_user = '******' . $colorbox_no_voting_params; } require_js('#jquery#', $relative_to); // Initialize the colorbox settings: add_js_headline('var b2evo_colorbox_params = { maxWidth: jQuery( window ).width() > 480 ? "95%" : "100%", maxHeight: jQuery( window ).height() > 480 ? "90%" : "100%", slideshow: true, slideshowAuto: false }; ' . $colorbox_params_post . '; b2evo_colorbox_params_post = jQuery.extend( {}, b2evo_colorbox_params, b2evo_colorbox_params_post ); ' . $colorbox_params_cmnt . '; b2evo_colorbox_params_cmnt = jQuery.extend( {}, b2evo_colorbox_params, b2evo_colorbox_params_cmnt ); ' . $colorbox_params_user . '; b2evo_colorbox_params_user = jQuery.extend( {}, b2evo_colorbox_params, b2evo_colorbox_params_user ); ' . $colorbox_params_other . '; b2evo_colorbox_params = jQuery.extend( {}, b2evo_colorbox_params, b2evo_colorbox_params_other );'); // TODO: translation strings for colorbox buttons require_js('build/colorbox.bmin.js', $relative_to, true); require_css('colorbox/colorbox.css', $relative_to); break; } // add to list of loaded helpers $helpers[] = $helper; } }
// Change to 'redemption' status only if status is 'warning', 'suspicious1', 'suspicious2', 'suspicious3' or 'prmerror' $EmailAddress->set('status', 'redemption'); $EmailAddress->dbupdate(); } // Redirect so that a reload doesn't write to the DB twice: header_redirect($admin_url . '?ctrl=user&user_tab=' . $user_tab . '&user_ID=' . $user_ID); // Will EXIT // We have EXITed already at this point!! break; } } if ($display_mode != 'js') { // Display a form to quick search users $AdminUI->top_block = get_user_quick_search_form(); // require colorbox js require_js_helper('colorbox', 'rsc_url'); $AdminUI->breadcrumbpath_init(false); // fp> I'm playing with the idea of keeping the current blog in the path here... $AdminUI->breadcrumbpath_add(T_('Users'), '?ctrl=users'); if ($action == 'new') { $AdminUI->breadcrumbpath_add($edited_User->login, '?ctrl=user&user_ID=' . $edited_User->ID); } else { $AdminUI->breadcrumbpath_add($edited_User->get_colored_login(array('login_text' => 'name')), '?ctrl=user&user_ID=' . $edited_User->ID); } switch ($user_tab) { case 'profile': $AdminUI->breadcrumbpath_add(T_('Profile'), '?ctrl=user&user_ID=' . $edited_User->ID . '&user_tab=' . $user_tab); init_userfields_js('rsc_url', $AdminUI->get_template('tooltip_plugin')); require_js('#jcrop#', 'rsc_url'); require_css('#jcrop_css#', 'rsc_url'); // Set an url for manual page:
/** * Get ready for displaying the skin. * * This may register some CSS or JS... */ function display_init() { // call parent: parent::display_init(); // Add CSS: require_css('basic_styles.css', 'blog'); // the REAL basic styles require_css('basic.css', 'blog'); // Basic styles require_css('blog_base.css', 'blog'); // Default styles for the blog navigation require_css('item_base.css', 'blog'); // Default styles for the post CONTENT require_css('style.css', 'relative'); // Add custom CSS: $custom_css = ''; require_css('rsc/nifty_corners.css', true, 'Nifty Corners'); require_css('rsc/nifty_print.css', true, 'Print', 'print'); require_js('rsc/nifty_corners.js', true); $custom_js = <<<HEREDOC \t<script type="text/javascript"> \t\t<!-- \t\twindow.onload=function() \t\t{ \t\t\tif(!NiftyCheck()) \t\t\t\t\treturn; \t\t\tRounded("div.outerwrap","all","transparent","#fff",""); \t\t\tRounded("div.posts","all","transparent","#fff",""); \t\t\tRounded("div.bSideBar","all","transparent","#fff",""); \t\t\tRounded("div.bTitle","top","#fff","#0099cc","smooth"); \t\t} \t\t// --> \t</script> HEREDOC; add_headline($custom_js); // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images: if ($this->get_setting("colorbox")) { require_js_helper('colorbox', 'blog'); } }
/** * Get ready for displaying the skin. * * This may register some CSS or JS... */ function display_init() { // call parent: parent::display_init(); require_js('#jquery#'); require_js('chita/rsc/colorpicker.js', true); require_js('chita/rsc/iphone-style-checkboxes.js', true); require_css('chita/rsc/extensions.css', true); // Make sure standard CSS is called ahead of custom CSS generated below: require_css('style.css', true); // Add custom CSS: $custom_css = ''; //color vars $body_background_color = $this->get_setting('body_background_color'); $header_background_color = $this->get_setting('header_background_color'); $header_text_color = $this->get_setting('header_text_color'); $header_link_color = $this->get_setting('header_link_color'); $footer_background_color = $this->get_setting('footer_background_color'); $footer_text_color = $this->get_setting('footer_text_color'); $footer_link_color = $this->get_setting('footer_link_color'); $content_background_color = $this->get_setting('conten_background_color'); $content_text_color = $this->get_setting('content_text_color'); $content_link_color = $this->get_setting('content_link_color'); if (!empty($content_background_color)) { $custom_css .= 'body { background-color: ' . $body_background_color . ' }'; } if (!empty($header_background_color)) { $custom_css .= 'div#tq-header { background-color: ' . $header_background_color . ' }'; } if (!empty($header_text_color)) { $custom_css .= 'div#tq-header { color: ' . $header_text_color . ' }'; } if (!empty($header_link_color)) { $custom_css .= 'div#tq-header a { color: ' . $header_link_color . ' }'; } if (!empty($content_background_color)) { $custom_css .= 'div#tq-content { background-color: ' . $content_background_color . ' }'; } if (!empty($content_text_color)) { $custom_css .= 'div#tq-content { color: ' . $content_text_color . ' }'; } if (!empty($content_link_color)) { $custom_css .= 'div#tq-content a { color: ' . $content_link_color . ' }'; } if (!empty($footer_background_color)) { $custom_css .= 'div#tq-footer { background-color: ' . $footer_background_color . ' }'; } if (!empty($footer_text_color)) { $custom_css .= 'div#tq-footer { color: ' . $footer_text_color . ' }'; } if (!empty($footer_link_color)) { $custom_css .= 'div#tq-footer a { color: ' . $footer_link_color . ' }'; } if ($use_google_font = $this->get_setting('use_google_font')) { $r_plus = array('+'); } $r_rep = array(' '); $use_google_font_s = str_replace($r_plus, $r_rep, $use_google_font); if ($use_google_font != "No") { $custom_css .= ' body { font-family: \'' . $use_google_font_s . "',arial serif }\n"; } if ($custom_width = $this->get_setting('custom_width')) { $custom_css .= ' div#custom-mainbody { width: ' . $custom_width . " }\n"; } if ($font_size = $this->get_setting('font_size')) { $custom_css .= ' div#wrapper-r { font-size: ' . $font_size . " }\n"; } if ($slider_width = $this->get_setting('slider_width')) { $custom_css .= ' div#nivo-slider { width: ' . $slider_width . " !important }\n"; } if ($slider_height = $this->get_setting('slider_height')) { $custom_css .= ' div#nivo-slider { height: ' . $slider_height . " !important }\n"; } if ($this->get_setting('bg_pattern') == "none") { $custom_css .= 'body { background-image: none;}'; } if ($this->get_setting('bg_pattern') == "shadow") { $custom_css .= 'body { background-image: url(img/shado.png); background-repeat: repeat-x; background-color: ' . $body_background_color . " }\n"; } if ($this->get_setting('bg_pattern') == "grid") { $custom_css .= 'body { background-image: url(img/grid.png); background-color: ' . $body_background_color . " }\n"; } if ($this->get_setting('bg_pattern') == "royal") { $custom_css .= 'body { background-image: url(img/royal.png); background-color: ' . $body_background_color . " }\n"; } if ($this->get_setting('bg_pattern') == "abstrblue") { $custom_css .= 'body { background-image: url(img/abstr-blue.png); background-color: ' . $body_background_color . " }\n"; } if (!empty($custom_css)) { $custom_css = '<style type="text/css">' . "\n" . '<!--' . "\n" . $custom_css . ' -->' . "\n" . '</style>'; add_headline($custom_css); } // Colorbox (a lightweight Lightbox alternative) allows to zoom on images and do slideshows with groups of images: if ($this->get_setting("colorbox")) { require_js_helper('colorbox', 'blog'); } }