You are here

function ajax_poll_menu in AJAX Poll 6

Same name and namespace in other branches
  1. 7 ajax_poll.module \ajax_poll_menu()

Implements hook_menu().

File

./ajax_poll.module, line 11
Enables voting on polls without reloading the page.

Code

function ajax_poll_menu() {
  return array(
    'poll/ajax/vote/%node/%/%' => array(
      'type' => MENU_CALLBACK,
      'page callback' => 'ajax_poll_callback',
      'page arguments' => array(
        2,
        3,
        4,
        5,
      ),
      'access arguments' => array(
        'vote on polls',
      ),
    ),
    'poll/ajax/cancel/%node/%/%' => array(
      'type' => MENU_CALLBACK,
      'page callback' => 'ajax_poll_callback',
      'page arguments' => array(
        2,
        3,
        4,
        5,
      ),
      'access arguments' => array(
        'cancel own vote',
      ),
    ),
  );
}