本文整理汇总了PHP中KunenaController::display方法的典型用法代码示例。如果您正苦于以下问题:PHP KunenaController::display方法的具体用法?PHP KunenaController::display怎么用?PHP KunenaController::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KunenaController
的用法示例。
在下文中一共展示了KunenaController::display方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
public function display($cachable = false, $urlparams = false)
{
// Redirect profile to integrated component if profile integration is turned on
$redirect = 1;
$active = $this->app->getMenu()->getActive();
if (!empty($active)) {
$params = $active->params;
$redirect = $params->get('integration', 1);
}
if ($redirect && JRequest::getCmd('format', 'html') == 'html') {
$profileIntegration = KunenaFactory::getProfile();
$layout = JRequest::getCmd('layout', 'default');
if ($profileIntegration instanceof KunenaProfileKunena) {
// Continue
} elseif ($layout == 'default') {
$url = $this->me->getUrl(false);
} elseif ($layout == 'list') {
$url = $profileIntegration->getUserListURL('', false);
}
if (!empty($url)) {
$this->setRedirect($url);
return;
}
}
$layout = JRequest::getCmd('layout', 'default');
if ($layout == 'list') {
if (KunenaFactory::getConfig()->userlist_allowed && JFactory::getUser()->guest) {
$this->redirectBack();
}
}
parent::display();
}
示例2: display
public function display($cachable = false, $urlparams = false)
{
// Redirect profile to integrated component if profile integration is turned on
$redirect = 1;
$active = $this->app->getMenu()->getActive();
if (!empty($active)) {
if (version_compare(JVERSION, '1.6', '>')) {
// Joomla 1.6+
$params = $active->params;
} else {
// Joomla 1.5
$params = new JParameter($active->params);
}
$redirect = $params->get('integration', 1);
}
if ($redirect && JRequest::getCmd('format') == 'html') {
$profileIntegration = KunenaFactory::getProfile();
if ($profileIntegration instanceof KunenaProfileKunena) {
// Continue
} elseif (JRequest::getCmd('layout', 'default') == 'default') {
$url = $this->me->getUrl(false);
} elseif (JRequest::getCmd('layout') == 'list') {
$url = $profileIntegration->getUserListURL('', false);
}
if (!empty($url)) {
$this->setRedirect($url);
return;
}
}
parent::display();
}
示例3: display
public function display($cachable = false, $urlparams = false)
{
$db = JFactory::getDbo();
// Enable Kunena updates if they were disabled (but only every 6 hours or logout/login).
$now = time();
$timestamp = $this->app->getUserState('pkg_kunena.updateCheck', 0);
if ($timestamp < $now) {
$query = $db->getQuery(true)->update($db->quoteName('#__update_sites'))->set($db->quoteName('enabled') . '=1')->where($db->quoteName('location') . ' LIKE ' . $db->quote('http://update.kunena.org/%'));
$db->setQuery($query);
$db->execute();
$this->app->setUserState('pkg_kunena.updateCheck', $now + 60 * 60 * 6);
}
parent::display($cachable, $urlparams);
}
示例4: display
public function display() {
// Redirect profile to integrated component if profile integration is turned on
$redirect = 1;
$active = JFactory::getApplication ()->getMenu ()->getActive ();
if (!empty($active)) {
$params = new JParameter($active->params);
$redirect = $params->get('integration');
}
if ($redirect) {
$profileIntegration = KunenaFactory::getProfile();
if (!($profileIntegration instanceof KunenaProfileKunena)) {
$url = CKunenaLink::GetProfileURL(KunenaFactory::getUser()->userid, false);
if ($url) {
$this->setRedirect($url);
return;
}
}
}
parent::display();
}