You are here

function ajax_comments_js_load_thread in AJAX Comments 6

Render a new comment thread.

1 string reference to 'ajax_comments_js_load_thread'
ajax_comments_menu in ./ajax_comments.module
Implementation of hook_menu().

File

./ajax_comments.pages.inc, line 208
AJAX comments form handling and callbacks.

Code

function ajax_comments_js_load_thread($nid) {
  global $conf;
  $node = node_load($nid);

  // Hide comments form from thread.
  $conf['comment_controls_' . $node->type] = COMMENT_CONTROLS_HIDDEN;

  // Render the thread.
  $response = array(
    'status' => TRUE,
    'content' => comment_bonus_api_comment_render($node),
  );
  drupal_json($response);
}