當前位置: 首頁>>代碼示例>>PHP>>正文


PHP skin_init函數代碼示例

本文整理匯總了PHP中skin_init函數的典型用法代碼示例。如果您正苦於以下問題:PHP skin_init函數的具體用法?PHP skin_init怎麽用?PHP skin_init使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了skin_init函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: skin_init_ajax

/**
 * Initialize skin for AJAX request
 *
 * @param string Skin name
 * @param string What are we going to display. Most of the time the global $disp should be passed.
 */
function skin_init_ajax($skin_name, $disp)
{
    if (is_ajax_content()) {
        // AJAX request
        if (empty($skin_name)) {
            // Don't initialize without skin name
            return false;
        }
        global $ads_current_skin_path, $skins_path;
        // Init path for current skin
        $ads_current_skin_path = $skins_path . $skin_name . '/';
        // This is the main template; it may be used to display very different things.
        // Do inits depending on current $disp:
        skin_init($disp);
    }
    return true;
}
開發者ID:Ariflaw,項目名稱:b2evolution,代碼行數:23,代碼來源:_skin.funcs.php

示例2: dirname

require_once $inc_path . '_blog_main.inc.php';
// Make sure includes will check in the current folder!
$ads_current_skin_path = dirname(__FILE__) . '/';
# Now, below you'll find the magic template...
// --------------------- PAGE LEVEL CACHING SUPPORT ---------------------
// Note: This is totally optional. General caching must be enabled in Global settings, otherwise this will do nothing.
// Delete this block if you don't care about page level caching. Don't forget to delete the matching section at the end of the page.
load_class('_core/model/_pagecache.class.php', 'PageCache');
$PageCache = new PageCache(NULL);
// Check for cached content & Start caching if needed:
if (!$PageCache->check()) {
    // Cache miss, we have to generate:
    // --------------------- PAGE LEVEL CACHING SUPPORT ---------------------
    // This is the main template; it may be used to display very different things.
    // Do inits depending on current $disp:
    skin_init($disp);
    // Add CSS:
    require_css('basic_styles.css', 'rsc_url');
    // the REAL basic styles
    require_css('basic.css', 'rsc_url');
    // Basic styles
    require_css('blog_base.css', 'rsc_url');
    // Default styles for the blog navigation
    require_css('item_base.css', 'rsc_url');
    // Default styles for the post CONTENT
    require_css('fp02.css', 'rsc_url');
    add_js_for_toolbar();
    // Registers all the javascripts needed by the toolbar menu
    // Functions to work with AJAX response data
    require_js('#jquery#', 'rsc_url');
    require_js('#jqueryUI#', 'rsc_url');
開發者ID:ldanielz,項目名稱:uesp.blog,代碼行數:31,代碼來源:multiblogs.php

示例3: die

    die('Please, do not access this page directly.');
}
if (version_compare($app_version, '6.4') < 0) {
    // Older skins (versions 2.x and above) should work on newer b2evo versions, but newer skins may not work on older b2evo versions.
    die('This skin is designed for b2evolution 6.4 and above. Please <a href="http://b2evolution.net/downloads/index.html">upgrade your b2evolution</a>.');
}
if (!empty($requested_404_title)) {
    // Initialize a prefilled search form
    set_param('s', str_replace('-', ' ', $requested_404_title));
    set_param('sentence', 'OR');
    set_param('title', '');
    // Empty this param to exclude a filter by post_urltitle
}
// This is the main template; it may be used to display very different things.
// Do inits depending on current $disp:
skin_init(!empty($requested_404_title) ? 'search' : $disp);
// -------------------------- HTML HEADER INCLUDED HERE --------------------------
skin_include('_html_header.inc.php', array());
// -------------------------------- END OF HEADER --------------------------------
// ---------------------------- SITE HEADER INCLUDED HERE ----------------------------
// If site headers are enabled, they will be included here:
siteskin_include('_site_body_header.inc.php');
// ------------------------------- END OF SITE HEADER --------------------------------
?>

<div class="container">

<header id="header" class="row<?php 
echo $Settings->get('site_skins_enabled') ? ' site_skins' : '';
?>
">
開發者ID:Ariflaw,項目名稱:b2evolution,代碼行數:31,代碼來源:404_not_found.main.php


注:本文中的skin_init函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。