You are here

function advanced_forum_forum_page in Advanced Forum 6.2

Same name and namespace in other branches
  1. 7.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 Drupal core's user view, which is user_page_view().

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 66

Code

function advanced_forum_forum_page($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(
    $tid,
  ));
  $output = ctools_context_handler_render($task, '', $contexts, array(
    $tid,
  ));
  if ($output === FALSE) {

    // Fall back!
    $output = advanced_forum_page($tid);
  }
  return $output;
}