function advanced_forum_get_topics in Advanced Forum 7.2
Same name and namespace in other branches
- 6.2 includes/core-overrides.inc \advanced_forum_get_topics()
This is copied from the forum module and adapted.
2 calls to advanced_forum_get_topics()
- advanced_forum_forum_topic_list_content_type_render in plugins/
content_types/ forum_topic_list.inc - Render the content.
- advanced_forum_page in includes/
core-overrides.inc - Menu callback; prints a forum listing.
File
- includes/
core-overrides.inc, line 274 - User page callbacks for the forum module.
Code
function advanced_forum_get_topics($tid, $sortby, $forum_per_page, $sort_form = TRUE) {
$term = taxonomy_term_load($tid);
drupal_add_feed('taxonomy/term/' . $tid . '/feed', 'RSS - ' . check_plain($term->name));
// Views handles this page.
$view = views_get_view('advanced_forum_topic_list');
$view
->set_items_per_page($forum_per_page);
$view->sort_form = $sort_form;
return $view
->preview('default', array(
$tid,
));
}