本文整理汇总了PHP中Resources::addFile方法的典型用法代码示例。如果您正苦于以下问题:PHP Resources::addFile方法的具体用法?PHP Resources::addFile怎么用?PHP Resources::addFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Resources
的用法示例。
在下文中一共展示了Resources::addFile方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
<?php
/* ====================
[BEGIN_COT_EXT]
Hooks=rc
[END_COT_EXT]
==================== */
/**
* share rc
*
* @author Roffun
* @copyright Copyright (C) Roffun | https://github.com/Roffun/share
* @license BSD
*/
defined('COT_CODE') or die('Wrong URL');
if ($cfg['jquery'] && $cfg['turnajax'] && $cfg['plugin']['share']['css']) {
Resources::addFile($cfg['plugins_dir'] . '/share/css/share.css');
}
示例2: pathinfo
}
Resources::$rc_link_func($uidt_cfg['jquery_ui_js'], 'js', 60);
Resources::addFile($uidt_cfg['jquery_ui_css'], 'css', 60);
if (cot::$usr['lang'] != 'en') {
if ($uidt_cfg['enable_datepicker']) {
$lang_file_path = pathinfo($uidt_cfg['jquery_ui_js'], PATHINFO_DIRNAME);
$lang_file = $lang_file_path . "/i18n/jquery.ui.datepicker-{$usr['lang']}.js";
if (!file_exists($lang_file)) {
$lang_file = './js/jquery_ui/i18n/jquery.ui.datepicker-' . cot::$usr['lang'] . '.js';
}
Resources::$rc_link_func($lang_file, 'js', 60);
}
}
if ($uidt_cfg['enable_timepicker']) {
$timepicker_path = pathinfo($uidt_cfg['timepicker_js'], PATHINFO_DIRNAME);
Resources::addFile($uidt_cfg['timepicker_css'], 'css', 70);
Resources::$rc_link_func($uidt_cfg['timepicker_js'], 'js', 70);
if ($usr['lang'] != 'en') {
$lang_file = $timepicker_path . "/i18n/jquery-ui-timepicker-{$usr['lang']}.js";
Resources::$rc_link_func($lang_file, 'js', 70);
}
if ($uidt_cfg['support_touch']) {
Resources::$rc_link_func($timepicker_path . "/jquery-ui-sliderAccess.js", 'js', 70);
}
} else {
$ui_off_code = 'var ui_time_off = true;';
}
if (!$uidt_cfg['enable_datepicker']) {
$ui_off_code .= 'var ui_date_off = true;';
}
Resources::$rc_link_func(cot::$cfg['plugins_dir'] . "/{$plug_name}/js/{$plug_name}.js", 'js', 70);
示例3: defined
<?php
/**
* JavaScript and CSS loader for Nemesis theme
*
* @package Cotonti
* @copyright (c) Cotonti Team
* @license https://github.com/Cotonti/Cotonti/blob/master/License.txt
*/
defined('COT_CODE') or die('Wrong URL.');
Resources::addFile($cfg['themes_dir'] . '/' . $usr['theme'] . '/css/reset.css');
Resources::addFile($cfg['themes_dir'] . '/' . $usr['theme'] . '/css/extras.css');
Resources::addFile($cfg['themes_dir'] . '/' . $usr['theme'] . '/css/default.css');
Resources::addFile($cfg['themes_dir'] . '/' . $usr['theme'] . '/css/modalbox.css');
Resources::addFile($cfg['themes_dir'] . '/' . $usr['theme'] . '/js/js.js');
示例4: cot_rc_add_standard
/**
* Registers standard resources
*/
function cot_rc_add_standard()
{
global $cfg;
if ($cfg['jquery'] && !$cfg['jquery_cdn']) {
Resources::addFile(Resources::jQuery, 'js', 30);
}
if ($cfg['jquery']) {
Resources::addFile('js/jqModal.min.js');
}
Resources::addFile('js/base.js');
if ($cfg['jquery'] && $cfg['turnajax']) {
Resources::addFile('js/ajax_on.js');
}
}
示例5: defined
<?php
/* ====================
[BEGIN_COT_EXT]
Hooks=rc
[END_COT_EXT]
==================== */
/**
* fancyBoxes plugin
*
* @author Roffun
* @copyright Copyright (C) 2015 - today: Roffun | https://webcot.net/cotonti/extensions/fancyboxes-plugin
* @license BSD
*/
defined('COT_CODE') or die('Wrong URL.');
if ($cfg['plugin']['fancyboxes']['css'] == 1) {
Resources::addFile($cfg['plugins_dir'] . '/fancyboxes/css/jquery.fancybox.css');
}
示例6: defined
<?php
/* ====================
[BEGIN_COT_EXT]
Hooks=header.main
[END_COT_EXT]
==================== */
/**
* Cotonti Banners Module
* Banner rotation with statistics
*
* @package Banners
* @author Kalnov Alexey <kalnovalexey@yandex.ru>
* @copyright Portal30 Studio http://portal30.ru
*/
defined('COT_CODE') or die('Wrong URL.');
$brsInclided = false;
if (cot::$cfg['headrc_consolidate'] && cot::$cache) {
Resources::addFile(cot::$cfg['modules_dir'] . "/brs/js/brs.js");
$brsInclided = true;
}
if (!empty($cache_ext) && cot::$usr['id'] == 0 && cot::$cfg['cache_' . $cache_ext]) {
Resources::embedFooter("var brsX = '" . cot::$sys['xk'] . "'");
if (!$brsInclided) {
Resources::linkFileFooter(cot::$cfg['modules_dir'] . "/brs/js/brs.js");
}
}