本文整理汇总了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;
}
示例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');
示例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' : '';
?>
">