当前位置: 首页>>代码示例>>PHP>>正文


PHP CKunenaTools::addStyleSheet方法代码示例

本文整理汇总了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;
开发者ID:sillysachin,项目名称:teamtogether,代码行数:31,代码来源:initialize.php

示例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();
开发者ID:redigy,项目名称:Kunena-1.6,代码行数:67,代码来源:kunena.php

示例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 
开发者ID:laiello,项目名称:senluonirvana,代码行数:31,代码来源:initialize.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 */
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:initialize.php


注:本文中的CKunenaTools::addStyleSheet方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。