本文整理汇总了PHP中KunenaForum::display方法的典型用法代码示例。如果您正苦于以下问题:PHP KunenaForum::display方法的具体用法?PHP KunenaForum::display怎么用?PHP KunenaForum::display使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KunenaForum
的用法示例。
在下文中一共展示了KunenaForum::display方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayCategoriesSubscriptions
/**
*
*/
function displayCategoriesSubscriptions()
{
if ($this->config->category_subscriptions == 'disabled') {
return;
}
$params = array('userid' => $this->user->id, 'limit' => 6, 'filter_order' => 'time', 'limitstart' => 0, 'filter_order_Dir' => 'desc');
KunenaForum::display('category', 'user', 'embed', $params);
}
示例2: displaySubscriptions
function displaySubscriptions() {
if ($this->config->topic_subscriptions == 'disabled') return;
$params = array(
'topics_categories' => 0,
'topics_catselection' => 1,
'userid' => $this->user->id,
'mode' => 'subscriptions',
'sel' => -1,
'limit' => 6,
'filter_order' => 'time',
'limitstart' => 0,
'filter_order_Dir' => 'desc',
);
KunenaForum::display('topics', 'user', 'embed', $params);
}
示例3: showTopic
/**
* @param KunenaForumCategory $category
* @param KunenaForumTopic $topic
* @param string $link_topic
*
* @return string
*/
protected function showTopic(KunenaForumCategory $category, KunenaForumTopic $topic, $link_topic)
{
if (!$topic->exists()) {
$this->debug("showTopic: No messages to render");
return '';
}
$this->debug("showTopic: Rendering discussion");
$ordering = $this->params->get('ordering', 1);
// 0=ASC, 1=DESC
$params = array('catid' => $category->id, 'id' => $topic->id, 'limitstart' => (int) (!$ordering), 'limit' => $this->params->get('limit', 25), 'filter_order_Dir' => $ordering ? 'desc' : 'asc', 'templatepath' => __DIR__ . '/tmpl');
ob_start();
KunenaForum::display('topic', 'default', null, $params);
$str = ob_get_contents();
ob_end_clean();
return $link_topic . $str;
}
示例4: _display
protected function _display()
{
// Load language files.
KunenaFactory::loadLanguage('com_kunena.sys', 'admin');
KunenaFactory::loadLanguage();
KunenaFactory::loadLanguage('com_kunena.templates');
// Convert module parameters into topics view parameters
$categories = $this->params->get('category_id', 0);
$categories = is_array($categories) ? implode(',', $categories) : $categories;
$this->params->set('limitstart', 0);
$this->params->set('limit', $this->params->get('nbpost', 5));
$this->params->set('topics_categories', $categories);
$this->params->set('topics_catselection', $this->params->get('sh_category_id_in', 1));
$this->params->set('topics_time', $this->params->get('show_list_time', 168));
$userid = 0;
switch ($this->params->get('choosemodel')) {
case 'latestposts':
$layout = 'posts';
$mode = 'recent';
break;
case 'noreplies':
$layout = 'default';
$mode = 'noreplies';
break;
case 'catsubscriptions':
// TODO
break;
case 'subscriptions':
$userid = -1;
$layout = 'user';
$mode = 'subscriptions';
break;
case 'favorites':
$userid = -1;
$layout = 'user';
$mode = 'favorites';
break;
case 'owntopics':
$layout = 'user';
$mode = 'posted';
break;
case 'deleted':
$layout = 'posts';
$mode = 'deleted';
break;
case 'saidthankyouposts':
$userid = -1;
$layout = 'posts';
$mode = 'mythanks';
break;
case 'gotthankyouposts':
$userid = -1;
$layout = 'posts';
$mode = 'thankyou';
break;
case 'userposts':
$userid = -1;
$layout = 'posts';
$mode = 'recent';
break;
case 'latesttopics':
default:
$layout = 'default';
$mode = 'recent';
}
$this->params->set('layout', $layout);
$this->params->set('mode', $mode);
$this->params->set('userid', $userid);
$this->params->set('moreuri', "index.php?option=com_kunena&view=topics&layout={$layout}&mode={$mode}" . ($userid ? "&userid={$userid}" : ''));
// Set template path to module
$this->params->set('templatepath', dirname(JModuleHelper::getLayoutPath('mod_kunenalatest')));
// Display topics view
KunenaForum::display('topics', $layout, null, $this->params);
}