function advanced_forum_forum_topic_list_content_type_render in Advanced Forum 7.2
Same name and namespace in other branches
- 6.2 plugins/content_types/forum_topic_list.inc \advanced_forum_forum_topic_list_content_type_render()
Render the content.
File
- plugins/
content_types/ forum_topic_list.inc, line 24 - Forum topic list.
Code
function advanced_forum_forum_topic_list_content_type_render($subtype, $conf, $panel_args, $context) {
if (!empty($context) && empty($context->data)) {
return;
}
if (!empty($context->data->container)) {
return;
}
$tid = 0;
if (!empty($context)) {
$tid = $context->data->tid;
}
$block = new stdClass();
$block->module = 'forum-secondary-links';
$block->delta = $tid;
// By default this has no title.
$block->title = '';
_advanced_forum_add_files();
// TODO: We could make these settings, but they're ignored if it isusing
// the view, so we have to be careful about that.
$forum_per_page = variable_get('forum_per_page', 25);
$sortby = variable_get('forum_order', 1);
$block->content = advanced_forum_get_topics($tid, $sortby, $forum_per_page, !empty($conf['show_sort']));
return $block;
}