function shoutbox_menu in Shoutbox 7
Same name and namespace in other branches
- 5 shoutbox.module \shoutbox_menu()
- 6.2 shoutbox.module \shoutbox_menu()
- 6 shoutbox.module \shoutbox_menu()
- 7.2 shoutbox.module \shoutbox_menu()
Implements hook_menu().
File
- ./
shoutbox.module, line 37 - Shoutbox module displays a block for users to create short messages for the whole site. Uses AHAH to update the database and display content.
Code
function shoutbox_menu() {
$items = array();
$file = 'shoutbox.pages.inc';
$items['shoutbox'] = array(
'title' => 'Shoutbox',
'page callback' => 'shoutbox_view',
'access arguments' => array(
'access shoutbox',
),
'menu_name' => 'navigation',
'type' => MENU_NORMAL_ITEM,
);
$items['shoutbox/js/view'] = array(
'title' => 'View ' . DEFAULTSHOUTPLURAL,
'page callback' => 'shoutbox_js_view',
'access arguments' => array(
'access shoutbox',
),
'type' => MENU_CALLBACK,
);
$items['shout/%shoutbox_shout/edit'] = array(
'title' => 'Edit ' . DEFAULTSHOUTSINGULAR,
'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,
'file' => $file,
);
$items['shout/%shoutbox_shout/delete'] = array(
'title' => 'Delete ' . DEFAULTSHOUTSINGULAR,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'shoutbox_delete_form',
1,
),
'access callback' => '_shoutbox_user_access',
'access arguments' => array(
'delete own shouts',
1,
),
'type' => MENU_CALLBACK,
'file' => $file,
);
$items['shout/%shoutbox_shout/publish'] = array(
'title' => 'Publish ' . DEFAULTSHOUTSINGULAR,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'shoutbox_publish_form',
1,
),
'access callback' => '_shoutbox_user_access',
'access arguments' => array(
'moderate shoutbox',
),
'type' => MENU_CALLBACK,
'file' => $file,
);
$items['shout/%shoutbox_shout/unpublish'] = array(
'title' => 'Unpublish ' . DEFAULTSHOUTSINGULAR,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'shoutbox_unpublish_form',
1,
),
'access callback' => '_shoutbox_user_access',
'access arguments' => array(
'moderate shoutbox',
),
'type' => MENU_CALLBACK,
'file' => $file,
);
$items['admin/config/user-interface/shoutbox'] = array(
'title' => 'Shoutbox',
'description' => 'Settings for Shoutbox',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'shoutbox_admin_settings',
),
'access arguments' => array(
'administer shoutbox',
),
'file' => $file,
);
$items['admin/config/user-interface/shoutbox/manage'] = array(
'title' => 'Shoutbox',
'type' => MENU_DEFAULT_LOCAL_TASK,
'description' => 'Settings for Shoutbox',
'file' => $file,
);
return $items;
}