1

Hello I need to create a pop up comment form for content type. I wrote this code

function ajax_comment_menu() {
  $items = array();
  $items['ajax_comment/%ctools_js/comment/reply/%node'] = array(
    'title' => 'Contact',
    'page callback' => 'ajax_comment_page_callback',
    'page arguments' => array(1),
    'access arguments' => array('access site-wide contact form'),
    'delivery callback' => 'ajax_deliver',
  );
  return $items;
}

function ajax_comment_block_info() {
  // First, we define our block
  $blocks['add_comment'] = array(
    // This title will show up on the block admin page
    'info' => t('Add comment'),
  ); 
  return $blocks;
}

but I'm not sure what to wrote in ajax_comment_block_view() and in ajax_comment_page_callback(). I need this pop up to add commnet to content type. Also I'm not sure what path in menu items[] shoul be

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.