本文整理汇总了PHP中Skin::display_init方法的典型用法代码示例。如果您正苦于以下问题:PHP Skin::display_init方法的具体用法?PHP Skin::display_init怎么用?PHP Skin::display_init使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Skin
的用法示例。
在下文中一共展示了Skin::display_init方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display_init
function display_init()
{
global $Messages, $debug;
// 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'));
// Skin specific initializations:
}
示例2:
/**
* 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');
}
}
示例3:
/**
* 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');
}
示例4:
/**
* 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('rsc/css/item.css', 'relative');
require_css('rsc/css/style.css', 'relative');
// 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 . "\n";
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');
}
}
示例5:
/**
* 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');
}
}
示例6: display_init
/**
* 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('b2evo_base_css', 'colorbox', 'disp_auto'));
// $this->require_css( 'style.css' );
// $this->require_css( 'item.css' );
// $this->require_css( 'evopress.bundle.css' ); // Concatenation of the above
$this->require_css('evopress.bmin.css');
// Concatenation + Minifaction of the above
// 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: linear-gradient( to bottom, ' . $head_bg_color_top . ', ' . $head_bg_color_bottom . ');' . "\n" . '}' . "\n";
}
if (!empty($custom_css)) {
$custom_css = '<style type="text/css">
<!--
' . $custom_css . ' -->
</style>';
add_headline($custom_css);
}
}
示例7:
/**
* Get ready for displaying the skin.
*
* This may register some CSS or JS...
*/
function display_init()
{
// call parent:
parent::display_init();
// We pass NO params. This gives up the default Skins API v5 behavior.
require_css('item.css', 'relative');
}
示例8:
/**
* 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);
}
示例9:
/**
* Get ready for displaying the skin.
*
* This may register some CSS or JS...
*/
function display_init()
{
// call parent:
parent::display_init();
// We pass NO params. This gives up the default Skins API v5 behavior.
add_js_headline('var touch_skin_switch_confirm_text = "' . TS_('Switch to regular view? \\n \\n You can switch back again in the footer.') . '";');
$this->require_js('js/core.js');
require_js('navigation.js', 'blog');
}
示例10: array
/**
* Get ready for displaying the skin.
*
* This may register some CSS or JS...
*/
function display_init()
{
// call parent:
parent::display_init();
// We pass NO params. This gives up the default Skins API v5 behavior.
// Add custom CSS:
$custom_css = '';
// Custom menu styles:
$custom_styles = array();
if ($bg_color = $this->get_setting('menu_bg_color')) {
// Background color:
$custom_styles[] = 'background-color: ' . $bg_color;
}
if ($text_color = $this->get_setting('menu_text_color')) {
// Text color:
$custom_styles[] = 'color: ' . $text_color;
}
if (!empty($custom_styles)) {
$custom_css .= ' div.pageHeader { ' . implode(';', $custom_styles) . " }\n";
}
// Custom page styles:
$custom_styles = array();
if ($bg_color = $this->get_setting('page_bg_color')) {
// Background color:
$custom_styles[] = 'background-color: ' . $bg_color;
}
if ($text_color = $this->get_setting('page_text_color')) {
// Text color:
$custom_styles[] = 'color: ' . $text_color;
}
if (!empty($custom_styles)) {
$custom_css .= ' body { ' . implode(';', $custom_styles) . " }\n";
}
// Custom post area styles:
$custom_styles = array();
if ($bg_color = $this->get_setting('post_bg_color')) {
// Background color:
$custom_styles[] = 'background-color: ' . $bg_color;
}
if ($text_color = $this->get_setting('post_text_color')) {
// Text color:
$custom_styles[] = 'color: ' . $text_color;
}
if (!empty($custom_styles)) {
$custom_css .= ' div.bDetails { ' . implode(';', $custom_styles) . " }\n";
}
if (!empty($custom_css)) {
$custom_css = '<style type="text/css">
<!--
' . $custom_css . ' -->
</style>';
add_headline($custom_css);
}
}
示例11: display_init
/**
* Get ready for displaying the skin.
*
* This may register some CSS or JS...
*/
function display_init()
{
global $Messages, $debug;
// 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'));
// Skin specific initializations:
// Limit images by max height:
$max_image_height = intval($this->get_setting('max_image_height'));
if ($max_image_height > 0) {
add_css_headline('.evo_image_block img { max-height: ' . $max_image_height . 'px; width: auto; }');
}
}
示例12: and
/**
* 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);
}
}
示例13:
/**
* Get ready for displaying the skin.
*
* This may register some CSS or JS...
*/
function display_init()
{
// call parent:
parent::display_init();
// We pass NO params. This gives up the default Skins API v5 behavior.
// 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);
}
}
示例14:
/**
* Get ready for displaying the skin.
*
* This may register some CSS or JS...
*/
function display_init()
{
global $disp;
// call parent:
parent::display_init();
// We pass NO params. This gives up the default Skins API v5 behavior.
// 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);
}
// Functions to switch between the width sizes
require_js('#jquery#', 'blog');
require_js('widthswitcher.js', 'blog');
if (in_array($disp, array('single', 'page', 'comments'))) {
// Load jquery UI to animate background color on change comment status or on vote
require_js('#jqueryUI#', 'blog');
}
}
示例15:
/**
* 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');
}
}