本文整理汇总了PHP中Resources::linkFile方法的典型用法代码示例。如果您正苦于以下问题:PHP Resources::linkFile方法的具体用法?PHP Resources::linkFile怎么用?PHP Resources::linkFile使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Resources
的用法示例。
在下文中一共展示了Resources::linkFile方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: defined
<?php
/* ====================
[BEGIN_COT_EXT]
Hooks=header.main
Tags=header.tpl:{HEADER_USER_PMS},{HEADER_USER_PMREMINDER}
[END_COT_EXT]
==================== */
/**
* PM header notices
*
* @package PM
* @copyright (c) Cotonti Team
* @license https://github.com/Cotonti/Cotonti/blob/master/License.txt
*/
defined('COT_CODE') or die('Wrong URL.');
if ($usr['id'] > 0) {
$out['pms'] = cot_rc_link(cot_url('pm'), $L['Private_Messages']);
require_once cot_incfile('pm', 'module');
if ($usr['newpm']) {
$usr['messages'] = $db->query("SELECT COUNT(*) FROM {$db_pm} WHERE pm_touserid='" . $usr['id'] . "' AND pm_tostate=0")->fetchColumn();
}
$out['pmreminder'] = cot_rc_link(cot_url('pm'), $usr['messages'] > 0 ? cot_declension($usr['messages'], $Ls['Privatemessages']) : $L['hea_noprivatemessages']);
$t->assign(array('HEADER_USER_PM_URL' => cot_url('pm'), 'HEADER_USER_PMS' => $out['pms'], 'HEADER_USER_PMREMINDER' => $out['pmreminder']));
}
if ($cfg['pm']['css'] && $env['ext'] == 'pm') {
Resources::linkFile($cfg['modules_dir'] . '/pm/tpl/pm.css');
}
示例2: cot_rc_link_file
/**
* A shortcut for plain output of a link to a CSS/JS file in the header of the page
*
* @global array $out Output snippets
* @param string $path Stylesheet *.css or script *.js path/url
* @param bool $prepend Prepend this file before other header outputs
*
* @deprecated Will be removed in v.1.0. Use Resources::linkFile() instead
*/
function cot_rc_link_file($path, $prepend = false)
{
$order = 60;
if ($prepend) {
$order = 40;
}
Resources::linkFile($path, '', $order);
}
示例3: cot_auth
/* ===== */
$out['logstatus'] = $usr['id'] > 0 ? $L['hea_youareloggedas'] . ' ' . $usr['name'] : $L['hea_youarenotlogged'];
$out['userlist'] = cot_auth('users', 'a', 'R') ? cot_rc_link(cot_url('users'), $L['Users']) : '';
unset($title_tags, $title_data);
if (is_numeric($pg) && $pg > 1) {
// Append page number to subtitle
$out['subtitle'] .= cot_rc('code_title_page_num', array('num' => $pg));
}
$title_params = array('MAINTITLE' => $cfg['maintitle'], 'DESCRIPTION' => $cfg['subtitle'], 'SUBTITLE' => $out['subtitle']);
if (defined('COT_INDEX')) {
$out['fulltitle'] = cot_title('title_header_index', $title_params);
} else {
$out['fulltitle'] = cot_title('title_header', $title_params);
}
if ($cfg['jquery'] && $cfg['jquery_cdn']) {
Resources::linkFile($cfg['jquery_cdn'], 'js', 30);
}
$html = Resources::render();
if ($html) {
$out['head_head'] = $html . $out['head_head'];
}
$out['meta_contenttype'] = $cfg['xmlclient'] ? 'application/xml' : 'text/html';
$out['basehref'] = $R['code_basehref'];
$out['meta_charset'] = 'UTF-8';
$out['meta_desc'] = empty($out['desc']) ? $cfg['subtitle'] : htmlspecialchars($out['desc']);
$out['meta_keywords'] = empty($out['keywords']) ? $cfg['metakeywords'] : htmlspecialchars($out['keywords']);
$out['meta_lastmod'] = gmdate('D, d M Y H:i:s');
$out['head_head'] .= $out['head'];
if ($sys['noindex']) {
$out['head_head'] .= $R['code_noindex'];
}