function advanced_forum_forum_page in Advanced Forum 7.2
Same name and namespace in other branches
- 6.2 plugins/tasks/forum.inc \advanced_forum_forum_page()
Entry point for our overridden user view.
This function asks its assigned handlers who, if anyone, would like to run with it. If no one does, it passes through to advanced_forum_page().
1 string reference to 'advanced_forum_forum_page'
- advanced_forum_forum_menu_alter in plugins/
tasks/ forum.inc - Callback defined by advanced_forum_forum_page_manager_tasks().
File
- plugins/
tasks/ forum.inc, line 70 - Plugin for tasks.
Code
function advanced_forum_forum_page($forum_term = NULL) {
if (!isset($forum_term)) {
// On the main page, display all the top-level forums.
$forum_term = advanced_forum_forum_load(0);
}
// Set tid for <root> container.
if (!isset($forum_term->tid)) {
$forum_term->tid = 0;
}
// Load my task plugin:
$task = page_manager_get_task('forum');
// Load the account into a context.
ctools_include('context');
ctools_include('context-task-handler');
$contexts = ctools_context_handler_get_task_contexts($task, '', array(
$forum_term->tid,
));
$output = ctools_context_handler_render($task, '', $contexts, array(
$forum_term->tid,
));
if ($output === FALSE) {
$output = advanced_forum_page($forum_term);
}
return $output;
}