function shoutbox_menu in Shoutbox 6
Same name and namespace in other branches
- 5 shoutbox.module \shoutbox_menu()
- 6.2 shoutbox.module \shoutbox_menu()
- 7.2 shoutbox.module \shoutbox_menu()
- 7 shoutbox.module \shoutbox_menu()
Implementation of hook_menu().
File
- ./
shoutbox.module, line 30 - shoutbox module displays a block for users to create short messages for thw whole site. Uses AHAH to update the database and display content.
Code
function shoutbox_menu() {
$items = array();
$items['shoutbox'] = array(
'title' => 'All Shouts',
'page callback' => 'shoutbox_page_view',
'access arguments' => array(
'access content',
),
'type' => MENU_CALLBACK,
);
$items['shoutbox/js/view'] = array(
'title' => 'View Shouts',
'page callback' => 'shoutbox_js_view',
'access arguments' => array(
'access content',
),
'type' => MENU_CALLBACK,
);
$items['shoutbox/%shoutbox/edit'] = array(
'title' => 'Edit Shout',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'shoutbox_edit_form',
1,
),
'access callback' => '_shoutbox_user_access',
'access arguments' => array(
'edit own shouts',
1,
),
'type' => MENU_CALLBACK,
);
$items['shoutbox/%shoutbox/delete'] = array(
'title' => 'Delete Shout',
'page callback' => 'theme',
'page arguments' => array(
'shoutbox_delete_form',
1,
),
'access callback' => '_shoutbox_user_access',
'access arguments' => array(
'delete own shouts',
1,
),
'type' => MENU_CALLBACK,
);
$items['shoutbox/%shoutbox/publish'] = array(
'title' => 'Publish Shout',
'page callback' => 'theme',
'page arguments' => array(
'shoutbox_publish_form',
1,
),
'access callback' => '_shoutbox_user_access',
'access arguments' => array(
'moderate shoutbox',
),
'type' => MENU_CALLBACK,
);
$items['shoutbox/%shoutbox/unpublish'] = array(
'title' => 'Unpublish Shout',
'page callback' => 'theme',
'page arguments' => array(
'shoutbox_unpublish_form',
1,
),
'access callback' => '_shoutbox_user_access',
'access arguments' => array(
'moderate shoutbox',
),
'type' => MENU_CALLBACK,
);
$items['admin/settings/shoutbox'] = array(
'title' => 'Shoutbox',
'description' => 'Settings for displaying and deleting shouts',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'shoutbox_admin_settings',
),
'access arguments' => array(
'administer site configuration',
),
'type' => MENU_NORMAL_ITEM,
);
return $items;
}