You are here

function faq_ask_menu in FAQ_Ask 6.2

Same name and namespace in other branches
  1. 6 faq_ask.module \faq_ask_menu()
  2. 7 faq_ask.module \faq_ask_menu()

Implementation of hook_menu().

File

./faq_ask.module, line 78
This module is an add-on to the FAQ module that allows users with the 'ask question' permission to create a question which will be queued for an 'expert' to answer.

Code

function faq_ask_menu() {
  $items = array();
  $items['admin/settings/faq/ask'] = array(
    'title' => 'Experts',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'faq_ask_settings_form',
    ),
    'access arguments' => array(
      'administer faq',
    ),
    'description' => 'Allows the user to configure the Ask_FAQ module.',
    'type' => MENU_LOCAL_TASK,
    'weight' => -2,
  );
  $items['faq_ask'] = array(
    'title' => 'Ask a question',
    'page callback' => 'faq_ask_page',
    'access callback' => 'user_access',
    'access arguments' => array(
      'ask question',
    ),
    'weight' => 1,
  );
  $items['faq_ask/%'] = array(
    'page arguments' => array(
      1,
    ),
    'access arguments' => array(
      'ask question',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['faq_ask/answer/%node'] = array(
    'title' => 'Answer a question',
    'page callback' => 'faq_ask_answer',
    'page arguments' => array(
      2,
    ),
    'access arguments' => array(
      'answer question',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['faq_ask/edit/%node'] = array(
    'title' => 'Edit a question',
    'page callback' => 'faq_ask_edit',
    'page arguments' => array(
      2,
    ),
    'access arguments' => array(
      'access content',
    ),
    'type' => MENU_CALLBACK,
  );
  $items['faq_ask/unanswered'] = array(
    'title' => 'List more unanswered questions',
    'page callback' => 'faq_ask_list_more',
    'access callback' => 'faq_ask_user_access_or',
    'access arguments' => array(
      'answer question',
      'ask question',
    ),
    'type' => MENU_CALLBACK,
  );
  return $items;
}