function shoutbox_menu in Shoutbox 6.2
Same name and namespace in other branches
- 5 shoutbox.module \shoutbox_menu()
- 6 shoutbox.module \shoutbox_menu()
- 7.2 shoutbox.module \shoutbox_menu()
- 7 shoutbox.module \shoutbox_menu()
Implementation of hook_menu().
File
- ./
shoutbox.module, line 13 - Shout box 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' => 'Shout box',
'page callback' => 'shoutbox_view',
'access arguments' => array(
'view shouts',
),
'type' => MENU_CALLBACK,
);
$items['shoutbox/js/view'] = array(
'title' => 'View shouts',
'page callback' => 'shoutbox_js_view',
'access arguments' => array(
'view shouts',
),
'type' => MENU_CALLBACK,
);
$items['shout/%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,
'file' => $file,
);
$items['shout/%shoutbox/delete'] = array(
'title' => 'Delete shout',
'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/publish'] = array(
'title' => 'Publish shout',
'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/unpublish'] = array(
'title' => 'Unpublish shout',
'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/settings/shoutbox'] = array(
'title' => 'Shout box',
'description' => 'Settings for Shout box',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'shoutbox_admin_settings',
),
'access arguments' => array(
'administer shoutbox',
),
'type' => MENU_NORMAL_ITEM,
'file' => $file,
);
return $items;
}