本文整理汇总了PHP中CKunenaTools::addStyleSheet方法的典型用法代码示例。如果您正苦于以下问题:PHP CKunenaTools::addStyleSheet方法的具体用法?PHP CKunenaTools::addStyleSheet怎么用?PHP CKunenaTools::addStyleSheet使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKunenaTools
的用法示例。
在下文中一共展示了CKunenaTools::addStyleSheet方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: elseif
// We load mediaxboxadvanced library only if configuration setting allow it
if (KunenaFactory::getConfig()->lightbox == 1) {
$template->addStyleSheet('css/mediaboxAdv.css');
$template->addScript('js/mediaboxAdv.js');
}
// New Kunena JS for default template
$template->addScript('js/default.js');
$rtl = JFactory::getLanguage()->isRTL();
$skinner = $template->params->get('enableSkinner', 0);
if (file_exists(JPATH_ROOT . "/templates/{$app->getTemplate()}/css/kunena.forum.css")) {
// Load css from Joomla template
CKunenaTools::addStyleSheet(JURI::root(true) . "templates/{$app->getTemplate()}/css/kunena.forum.css");
if ($skinner && file_exists(JPATH_ROOT . "templates/{$app->getTemplate()}/css/kunena.skinner.css")) {
CKunenaTools::addStyleSheet(JURI::root(true) . "templates/{$app->getTemplate()}/css/kunena.skinner.css");
} elseif (!$skinner && file_exists(JPATH_ROOT . "templates/{$app->getTemplate()}/css/kunena.default.css")) {
CKunenaTools::addStyleSheet(JURI::root(true) . "templates/{$app->getTemplate()}/css/kunena.default.css");
}
} else {
// Load css from default template
$template->addStyleSheet('css/kunena.forum.css');
if ($skinner) {
$template->addStyleSheet('css/kunena.skinner.css');
} else {
$template->addStyleSheet('css/kunena.default.css');
}
}
$cssurl = JURI::root(true) . '/components/com_kunena/template/jsn_corsa/css';
?>
<!--[if lte IE 7]>
<link rel="stylesheet" href="<?php
echo $cssurl;
示例2: __construct
//.........这里部分代码省略.........
if ($func == "json") {
if (JDEBUG == 1 && defined('JFIREPHP')) {
FB::log('Kunena JSON request');
}
// URL format for JSON requests: e.g: index.php?option=com_kunena&func=json&action=autocomplete&do=getcat
require_once JPATH_COMPONENT . '/lib/kunena.ajax.helper.php';
$ajaxHelper =& CKunenaAjaxHelper::getInstance();
// Get the document object.
$document =& JFactory::getDocument();
// Set the MIME type for JSON output.
$document->setMimeEncoding('application/json');
// Change the suggested filename.
if ($action != 'uploadfile') {
JResponse::setHeader('Content-Disposition', 'attachment; filename="kunena.json"');
}
$value = JRequest::getVar('value', '');
JResponse::sendHeaders();
if ($kunena_config->board_offline && !CKunenaTools::isAdmin()) {
// when the forum is offline, we don't entertain json requests
json_encode(array('status' => '0', 'error' => @sprintf(_KUNENA_FORUM_OFFLINE)));
} else {
// Generate reponse
echo $ajaxHelper->generateJsonResponse($action, $do, $value);
}
$kunena_app->close();
}
if ($kunena_config->board_offline && !CKunenaTools::isAdmin()) {
// if the board is offline
echo $kunena_config->offline_message;
} else {
if ($kunena_config->regonly && !$kunena_my->id) {
// if we only allow registered users
if (file_exists(KUNENA_JTEMPLATEPATH . '/css/kunena.forum-min.css')) {
CKunenaTools::addStyleSheet(KUNENA_JTEMPLATEURL . '/css/kunena.forum-min.css');
} else {
CKunenaTools::addStyleSheet(KUNENA_TMPLTCSSURL);
}
echo '<div id="Kunena">';
$this->header = JText::_('COM_KUNENA_LOGIN_NOTIFICATION');
$this->body = JText::_('COM_KUNENA_LOGIN_FORUM');
CKunenaTools::loadTemplate('/login.php');
echo '</div>';
} else {
// =======================================================================================
// Forum is online:
//intercept the RSS request; we should stop afterwards
if ($func == 'rss') {
require_once JPATH_COMPONENT . '/funcs/rss.php';
$feed = new CKunenaRSSView($catid);
$feed->display();
$kunena_app->close();
}
if ($func == 'fb_pdf' || $func == 'pdf') {
$httpReferer = JRequest::getVar('HTTP_REFERER', JURI::base(true), 'server');
if (KUNENA_JOOMLA_COMPAT == '1.5') {
include JPATH_COMPONENT . '/lib/kunena.pdf.php';
$kunena_app->close();
}
}
$format = JRequest::getCmd('format', 'html');
if ($format != 'html') {
echo "Kunena: Unsupported output format {$format}, please use only format=html or .html";
$kunena_app->close();
}
$integration = KunenaFactory::getProfile();
$integration->open();
示例3: elseif
CKunenaTools::addStyleSheet(JURI::root(true) . "templates/{$app->getTemplate()}/css/kunena.skinner.css");
} elseif (!$skinner && file_exists(JPATH_ROOT . "templates/{$app->getTemplate()}/css/kunena.default.css")) {
CKunenaTools::addStyleSheet(JURI::root(true) . "templates/{$app->getTemplate()}/css/kunena.default.css");
}
} else {
// Load css from default template
$template->addStyleSheet('css/kunena.forum.css');
if ($skinner) {
$template->addStyleSheet('css/kunena.skinner.css');
} else {
$template->addStyleSheet('css/kunena.default.css');
}
}
CKunenaTools::addStyleSheet(KUNENA_DIRECTURL . 'template/jf_corporate/css/kunena.forum-joomforest.css', $rtl);
CKunenaTools::addStyleSheet(KUNENA_DIRECTURL . 'template/jf_corporate/css/kunena.forum-joomforest-k20.css', $rtl);
CKunenaTools::addStyleSheet(KUNENA_DIRECTURL . 'template/jf_corporate/css/kunena.forum.jf-browsers.css', $rtl);
$cssurl = JURI::root(true) . "components/com_kunena/template/jf_corporate/css";
?>
<script src="<?php
echo JURI::base();
?>
components/com_kunena/template/jf_corporate/js/joomforest.js" type="text/javascript"></script>
<script type="text/javascript">jQuery(document).ready(function(jQuery){jQuery('#Kunena').next().css({'font-size':'.833em','margin':'-20px 0 10px'});});</script>
<!--[if lte IE 8]>
<link rel="stylesheet" href="<?php
echo $cssurl;
?>
/kunena.forum.ie8.css" type="text/css" />
<![endif]-->
<!--[if lte IE 7]>
<link rel="stylesheet" href="<?php
示例4: elseif
} else {
if (file_exists(KUNENA_ABSTMPLTPATH . '/css/kunena.forum.css')) {
// Load css from the current template
CKunenaTools::addStyleSheet(KUNENA_TMPLTCSSURL, $rtl);
if ($skinner && file_exists(KUNENA_ABSTMPLTPATH . '/css/kunena.skinner.css')) {
CKunenaTools::addStyleSheet(KUNENA_TMPLTURL . 'css/kunena.skinner-min.css', $rtl);
} elseif (!$skinner && file_exists(KUNENA_ABSTMPLTPATH . '/css/kunena.default.css')) {
CKunenaTools::addStyleSheet(KUNENA_TMPLTURL . 'css/kunena.default-min.css', $rtl);
}
} else {
// Load css from default template
CKunenaTools::addStyleSheet(KUNENA_DIRECTURL . 'template/default/css/kunena.forum-min.css', $rtl);
if ($skinner) {
CKunenaTools::addStyleSheet(KUNENA_DIRECTURL . 'template/default/css/kunena.skinner-min.css', $rtl);
} else {
CKunenaTools::addStyleSheet(KUNENA_DIRECTURL . 'template/default/css/kunena.default-min.css', $rtl);
}
}
}
$cssurl = JURI::base() . "components/com_kunena/template/default/css";
?>
<!--[if lte IE 7]>
<link rel="stylesheet" href="<?php
echo $cssurl;
?>
/kunena.forum.ie7.css" type="text/css" />
<![endif]-->
<?php
$mediaurl = JURI::base() . "components/com_kunena/template/default/media";
$styles = <<<EOF
\t/* Kunena Custom CSS */