function fb_menu in Drupal for Facebook 6.3
Same name and namespace in other branches
- 5.2 fb.module \fb_menu()
- 5 fb.module \fb_menu()
- 6.2 fb.module \fb_menu()
- 7.4 fb.module \fb_menu()
- 7.3 fb.module \fb_menu()
Implements hook_menu().
File
- ./
fb.module, line 1214 - This is the core required module of Drupal for Facebook.
Code
function fb_menu() {
$items = array();
// Admin pages overview.
$items[FB_PATH_ADMIN] = array(
'title' => 'Facebook Applications',
'description' => 'Facebook Applications',
'page callback' => 'fb_admin_page',
'access arguments' => array(
FB_PERM_ADMINISTER,
),
'file' => 'fb.admin.inc',
'type' => MENU_NORMAL_ITEM,
);
$items[FB_PATH_ADMIN . '/list'] = array(
'title' => 'List Apps',
'weight' => -2,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items[FB_PATH_ADMIN . '/settings'] = array(
'title' => 'Settings',
'access arguments' => array(
FB_PERM_ADMINISTER,
),
'weight' => -1,
'type' => MENU_LOCAL_TASK,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'fb_admin_settings',
),
'file' => 'fb.admin.inc',
);
// Admin pages for each app.
$items[FB_PATH_ADMIN_APPS . '/%fb'] = array(
'title' => 'Application Detail',
'description' => 'Facebook Applications',
'page callback' => 'fb_admin_app_page',
'page arguments' => array(
FB_PATH_ADMIN_APPS_ARGS,
),
'access arguments' => array(
FB_PERM_ADMINISTER,
),
'file' => 'fb.admin.inc',
'type' => MENU_CALLBACK,
);
$items[FB_PATH_ADMIN_APPS . '/%fb/fb'] = array(
'title' => 'View',
'weight' => -2,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items[FB_PATH_ADMIN_APPS . '/%fb/fb/set_props'] = array(
'title' => 'Set Properties',
'description' => 'Set Facebook Application Properties',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'fb_admin_set_properties_form',
FB_PATH_ADMIN_APPS_ARGS,
),
'access arguments' => array(
FB_PERM_ADMINISTER,
),
'file' => 'fb.admin.inc',
'type' => MENU_CALLBACK,
);
// Javascript helper
$items['fb/js'] = array(
'page callback' => 'fb_js_cb',
'type' => MENU_CALLBACK,
'access callback' => TRUE,
);
// Ajax event handler.
$items[FB_PATH_AJAX_EVENT . '/%'] = array(
'page callback' => 'fb_ajax_event',
'type' => MENU_CALLBACK,
'access callback' => TRUE,
'page arguments' => array(
FB_PATH_AJAX_EVENT_ARGS,
),
);
// "Channel" http://developers.facebook.com/docs/reference/javascript/FB.init
$items['fb/channel'] = array(
'page callback' => 'fb_channel_page',
'type' => MENU_CALLBACK,
'access callback' => TRUE,
);
return $items;
}