本文整理汇总了PHP中KunenaRoute::getDefault方法的典型用法代码示例。如果您正苦于以下问题:PHP KunenaRoute::getDefault方法的具体用法?PHP KunenaRoute::getDefault怎么用?PHP KunenaRoute::getDefault使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KunenaRoute
的用法示例。
在下文中一共展示了KunenaRoute::getDefault方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
//.........这里部分代码省略.........
include JPATH_COMPONENT . '/lib/kunena.credits.php';
break;
default:
require_once KUNENA_PATH_FUNCS . '/listcat.php';
$page = new CKunenaListcat($catid);
$page->display();
break;
}
if (JDEBUG) {
$__profiler->mark('$func End');
}
// Bottom Module
CKunenaTools::showModulePosition('kunena_bottom');
// PDF and RSS
if ($kunena_config->enablerss || $kunena_config->enablepdf) {
if ($catid > 0) {
kimport('category');
$category = KunenaCategory::getInstance($catid);
if ($category->pub_access == 0 && $category->parent) {
$rss_params = '&catid=' . (int) $catid;
}
} else {
$rss_params = '';
}
if (isset($rss_params) || $kunena_config->enablepdf) {
echo '<div class="krss-block">';
if ($kunena_config->enablepdf && $func == 'view' && KUNENA_JOOMLA_COMPAT == '1.5') {
// FIXME: add better translation:
echo CKunenaLink::GetPDFLink($catid, $limit, $limitstart, $id, CKunenaTools::showIcon('kpdf', JText::_('PDF')), 'nofollow', '', JText::_('PDF'));
}
if ($kunena_config->enablerss && isset($rss_params)) {
if ($kunena_config->rss_specification == 'atom1.0') {
$rss_specification = 'application/atom+xml';
} else {
$rss_specification = 'application/rss+xml';
}
$document->addCustomTag('<link rel="alternate" type="' . $rss_specification . '" title="' . JText::_('COM_KUNENA_LISTCAT_RSS') . '" href="' . CKunenaLink::GetRSSURL($rss_params) . '" />');
echo CKunenaLink::GetRSSLink(CKunenaTools::showIcon('krss', JText::_('COM_KUNENA_LISTCAT_RSS')), 'follow', $rss_params);
}
echo '</div>';
}
}
$template = KunenaFactory::getTemplate();
$this->params = $template->params;
// Credits
echo '<div class="kcredits kms"> ' . CKunenaLink::GetTeamCreditsLink($catid, JText::_('COM_KUNENA_POWEREDBY')) . ' ' . CKunenaLink::GetCreditsLink();
if ($this->params->get('templatebyText') != '') {
echo ' :: <a href ="' . $this->params->get('templatebyLink') . '" rel="follow">' . $this->params->get('templatebyText');
if ($this->params->get('templatebyName')) {
echo ' ' . $this->params->get('templatebyName') . '</a>';
} else {
echo '</a>';
}
}
echo '</div>';
// display footer
// Show total time it took to create the page
$__ktime = JProfiler::getmicrotime() - $__kstarttime;
?>
<div class="kfooter">
<span class="kfooter-time"><?php
echo JText::_('COM_KUNENA_FOOTER_TIME_TO_CREATE') . ' ' . sprintf('%0.2f', $__ktime) . ' ' . JText::_('COM_KUNENA_FOOTER_TIME_SECONDS');
?>
</span>
</div>
</div>
<!-- closes Kunena div -->
<?php
$document->addHeadLink(KunenaRoute::_(), 'canonical', 'rel', '');
$integration = KunenaFactory::getProfile();
$integration->close();
//$params = JComponentHelper::getParams( 'com_kunena' );
//if ($params->get( 'show_page_title' )) $document->setTitle ( $params->get( 'page_title' ) );
if (empty($_POST) && $format == 'html') {
$default = KunenaRoute::getDefault();
if ($default) {
$menu->setActive($default->id);
}
}
}
}
// end of online
if (JDEBUG == 1) {
$__profiler->mark('Done');
$__queries = $__profiler->getQueryCount();
if (defined('JFIREPHP')) {
FB::log($__profiler->getBuffer(), 'Kunena Profiler');
if ($__queries > 50) {
FB::error($__queries, 'Kunena Queries');
} else {
if ($__queries > 35) {
FB::warn($__queries, 'Kunena Queries');
} else {
FB::log($__queries, 'Kunena Queries');
}
}
}
}
ob_end_flush();
}