function biblio_menu in Bibliography Module 6
Same name and namespace in other branches
- 5 biblio.module \biblio_menu()
- 6.2 biblio.module \biblio_menu()
- 7 biblio.module \biblio_menu()
- 7.2 biblio.module \biblio_menu()
Implementation of hook_menu().
Here we define some built in links for the biblio module, links exposed are:
File
- ./
biblio.module, line 576
Code
function biblio_menu() {
global $user;
$items = array();
$base = variable_get('biblio_base', 'biblio');
$base_title = check_plain(variable_get('biblio_base_title', 'Biblio'));
$items["{$base}"] = array(
'title' => $base_title,
'page callback' => 'biblio_db_search',
'access callback' => 'user_access',
'access arguments' => array(
'access biblio content',
),
'file' => 'biblio.pages.inc',
);
$items["{$base}/authors"] = array(
'title' => 'Authors',
'page callback' => 'biblio_author_page',
'access callback' => 'user_access',
'access arguments' => array(
'access biblio content',
),
'file' => 'biblio.pages.inc',
'weight' => 1,
);
$items["{$base}/keywords"] = array(
'title' => 'Keywords',
'page callback' => 'biblio_keyword_page',
'access callback' => 'user_access',
'access arguments' => array(
'access biblio content',
),
'file' => 'biblio.pages.inc',
// 'type' => MENU_LOCAL_TASK,
'weight' => 2,
);
$items["{$base}/import"] = array(
'title' => 'Import',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_import_form',
),
'file' => 'biblio.import.export.inc',
'access callback' => 'user_access',
'access arguments' => array(
'import from file',
),
// 'type' => MENU_LOCAL_TASK,
'weight' => 10,
);
$items["{$base}/user/%biblio_user"] = array(
'title' => 'My publications',
'page callback' => 'biblio_get_user_pubs',
'page arguments' => array(
2,
),
'access callback' => '_biblio_profile_access',
'access arguments' => array(
2,
'menu',
),
'parent' => '',
'file' => 'biblio.pages.inc',
);
/*
$items["$base/backup"] = array(
'title' => '',
'page callback' => 'biblio_backup',
'access callback' => 'user_access',
'access arguments' => array('access content'),
'file' => 'biblio.import.export.inc',
'type' => MENU_CALLBACK
);
*/
$items["{$base}/pot"] = array(
'title' => '',
'page callback' => 'biblio_dump_db_data_for_pot',
'access callback' => 'user_access',
'access arguments' => array(
'access biblio content',
),
'type' => MENU_CALLBACK,
);
$wildcard = 2 + (count(explode("/", $base)) - 1);
$items["{$base}/authors/%/edit"] = array(
'title' => 'Edit author information',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_author_edit_form',
$wildcard,
),
'access callback' => 'biblio_access',
'access arguments' => array(
'edit_author',
),
'file' => 'biblio.admin.inc',
'type' => MENU_CALLBACK,
);
$items["{$base}/keywords/%/edit"] = array(
'title' => '',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_keyword_edit_form',
$wildcard,
),
'access callback' => 'user_access',
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'type' => MENU_CALLBACK,
);
$items["{$base}/keyword/%/delete"] = array(
'title' => 'Delete',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_keyword_delete_confirm',
$wildcard,
),
'access callback' => 'user_access',
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'weight' => 1,
'type' => MENU_CALLBACK,
);
$items["{$base}/view/%"] = array(
'page callback' => 'biblio_view_node',
'page arguments' => array(
$wildcard,
),
'access callback' => 'user_access',
'access arguments' => array(
'access biblio content',
),
'file' => 'biblio.pages.inc',
'type' => MENU_CALLBACK,
);
$items["user/%user/{$base}"] = array(
'title' => 'Publications',
'page callback' => 'biblio_get_user_pubs',
'page arguments' => array(
1,
'profile',
'no_filters',
),
'access callback' => '_biblio_profile_access',
'access arguments' => array(
1,
'profile',
),
'file' => 'biblio.pages.inc',
'type' => MENU_LOCAL_TASK,
);
// The next two "LOCAL TASKS" are for the admin/settings/biblio page
$items['admin/settings/biblio'] = array(
'title' => 'Biblio settings',
'description' => 'Configure default behavior of the biblio module.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_settings',
),
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
);
$items['admin/settings/biblio/ahah'] = array(
'title' => '',
'page callback' => 'biblio_admin_ahah',
'file' => 'biblio.admin.inc',
'access arguments' => array(
'administer biblio',
),
'type' => MENU_CALLBACK,
);
$items['admin/settings/biblio/basic'] = array(
'title' => 'Preferences',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items['admin/settings/biblio/import'] = array(
'title' => 'Import',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_import_form',
),
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.import.export.inc',
'type' => MENU_LOCAL_TASK,
'weight' => 1,
);
$items['admin/settings/biblio/export'] = array(
'title' => 'Export',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_export_form',
),
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.import.export.inc',
'type' => MENU_LOCAL_TASK,
'weight' => 2,
);
$items['admin/settings/biblio/fields'] = array(
'title' => 'Fields',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_types_edit_form',
),
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -9,
);
$items['admin/settings/biblio/fields/common'] = array(
'title' => 'Common',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_types_edit_form',
),
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -9,
);
$items['admin/settings/biblio/fields/type'] = array(
'title' => 'Publication Types',
'page callback' => 'biblio_admin_types_form',
// 'page arguments' => array('biblio_admin_types_form'),
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -8,
);
$items['admin/settings/biblio/fields/typemap'] = array(
'title' => 'Type Mapping',
'page callback' => 'biblio_admin_type_mapper_page',
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -1,
);
$items['admin/settings/biblio/fields/typemap/%'] = array(
'title' => 'Type Mapping',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_type_mapper_form',
5,
),
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'type' => MENU_CALLBACK,
'weight' => -1,
);
$items['admin/settings/biblio/fields/fieldmap/%'] = array(
'title' => 'Field Mapping',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_field_mapper_form',
5,
),
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'type' => MENU_CALLBACK,
'weight' => -1,
);
$items['admin/settings/biblio/fields/type/edit'] = array(
'title' => '',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_types_edit_form',
),
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'type' => MENU_CALLBACK,
);
$items['admin/settings/biblio/fields/type/delete'] = array(
'title' => '',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_types_delete_form',
),
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'type' => MENU_CALLBACK,
);
$items['admin/settings/biblio/fields/type/new'] = array(
'title' => 'Add New Type',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_types_add_form',
),
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -9,
);
$items['admin/settings/biblio/fields/type/reset'] = array(
'title' => 'Reset all types to defaults',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_types_reset_form',
),
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'type' => MENU_LOCAL_TASK,
);
$items['admin/settings/biblio/fields/type/hide'] = array(
'title' => '',
'page callback' => 'biblio_admin_types_hide',
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'type' => MENU_CALLBACK,
);
$items['admin/settings/biblio/fields/type/show'] = array(
'title' => '',
'page callback' => 'biblio_admin_types_show',
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'type' => MENU_CALLBACK,
);
$items['admin/settings/biblio/author'] = array(
'title' => 'Authors',
'page callback' => 'biblio_author_page',
'access callback' => 'user_access',
'access arguments' => array(
'access biblio content',
),
'file' => 'biblio.pages.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -7,
);
$items['admin/settings/biblio/author/list'] = array(
'title' => 'List',
'page callback' => 'biblio_author_page',
'access callback' => 'user_access',
'access arguments' => array(
'access biblio content',
),
'file' => 'biblio.pages.inc',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -7,
);
$items['admin/settings/biblio/author/%/edit'] = array(
'title' => 'Edit author information',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_author_edit_form',
4,
),
'access callback' => 'biblio_access',
'access arguments' => array(
'edit_author',
),
'file' => 'biblio.admin.inc',
'type' => MENU_CALLBACK,
'weight' => -6,
);
$items['admin/settings/biblio/author/orphans'] = array(
'title' => 'Orphaned Authors',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_orphans_form',
),
'access arguments' => array(
'administer biblio',
),
'description' => 'Delete orphaned biblio authors.',
'file' => 'biblio.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -6,
);
$items['admin/settings/biblio/author/type'] = array(
'title' => 'Author Types',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_author_types_form',
6,
5,
),
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -5,
);
$items['admin/settings/biblio/author/type/new'] = array(
'title' => 'Add New Author Type',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_author_types_form_new',
'new',
),
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -9,
);
$items['admin/settings/biblio/author/type/%/edit'] = array(
'title' => 'Add New Author Type',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_author_types_form_edit',
'edit',
5,
),
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'type' => MENU_CALLBACK,
'weight' => -9,
);
$items['admin/settings/biblio/author/type/%/delete'] = array(
'title' => 'Delete',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_author_type_delete_confirm',
5,
),
'access callback' => 'user_access',
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'weight' => 1,
'type' => MENU_CALLBACK,
);
$items['admin/settings/biblio/keywords'] = array(
'title' => 'Keywords',
'page callback' => 'biblio_keyword_page',
'access callback' => 'user_access',
'access arguments' => array(
'access biblio content',
),
'file' => 'biblio.pages.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -7,
);
$items['admin/settings/biblio/keywords/list'] = array(
'title' => 'List',
'page callback' => 'biblio_keyword_page',
'access callback' => 'user_access',
'access arguments' => array(
'access biblio content',
),
'file' => 'biblio.pages.inc',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -7,
);
$items['admin/settings/biblio/keywords/%/edit'] = array(
'title' => 'Edit keyword information',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_keyword_edit_form',
4,
),
'access callback' => 'user_access',
'access arguments' => array(
'administer biblio',
),
'file' => 'biblio.admin.inc',
'type' => MENU_CALLBACK,
'weight' => -6,
);
$items['admin/settings/biblio/keywords/orphans'] = array(
'title' => 'Orphaned Keywords',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_admin_keyword_orphans_form',
),
'access arguments' => array(
'administer biblio',
),
'description' => 'Delete orphaned biblio keywords.',
'file' => 'biblio.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => -6,
);
/* $items['admin/settings/biblio/authors/reset'] = array(
'title' => t('Reset all Author types to defaults'),
'page callback' => 'drupal_get_form',
'page arguments' => array('biblio_admin_author_type_reset_form'),
'access arguments' => array('administer biblio'),
'file' => 'biblio.admin.inc',
'type' => MENU_LOCAL_TASK
);
*/
$items['biblio/autocomplete'] = array(
'title' => 'Autocomplete ',
'page callback' => 'biblio_autocomplete',
'access callback' => 'user_access',
'access arguments' => array(
'access biblio content',
),
'type' => MENU_CALLBACK,
);
$items['biblio/js'] = array(
'title' => 'Javascript Contributors Form',
'page callback' => 'biblio_contributors_js',
'access arguments' => array(
'access biblio content',
),
'type' => MENU_CALLBACK,
);
$items["{$base}/list"] = array(
'title' => 'List',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
$items["{$base}/filter"] = array(
'title' => 'Filter',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'biblio_form_filter',
),
'access callback' => 'user_access',
'access arguments' => array(
'show filter tab',
),
'type' => MENU_LOCAL_TASK,
'file' => 'biblio.pages.inc',
'weight' => -9,
);
$items["{$base}/filter/clear"] = array(
'title' => '',
'page callback' => 'biblio_filter_clear',
'access callback' => 'user_access',
'access arguments' => array(
'access biblio content',
),
'type' => MENU_CALLBACK,
);
$items["{$base}/help"] = array(
'title' => 'Help',
'page callback' => 'biblio_help_page',
'access callback' => 'user_access',
'access arguments' => array(
'access biblio content',
),
'type' => MENU_CALLBACK,
);
$items["{$base}/export"] = array(
'title' => '',
'page callback' => 'biblio_export',
'access callback' => 'user_access',
'access arguments' => array(
'show export links',
),
'file' => 'biblio.import.export.inc',
'type' => MENU_CALLBACK,
);
$items["{$base}/citekey"] = array(
'title' => '',
'page callback' => 'biblio_citekey_view',
'access arguments' => array(
'access biblio content',
),
'file' => 'biblio.pages.inc',
'type' => MENU_CALLBACK,
);
$items["{$base}/viewinline/%node"] = array(
'title' => '',
'page callback' => 'biblio_view_inline',
'page arguments' => array(
2,
),
'access callback' => 'user_access',
'access arguments' => array(
'access biblio content',
),
'file' => 'biblio.pages.inc',
'type' => MENU_CALLBACK,
);
$items["{$base}/recent/rss.xml"] = array(
'title' => 'RSS feed',
'page callback' => 'biblio_recent_feed',
'access callback' => 'biblio_access',
'access arguments' => array(
'rss',
),
'type' => MENU_CALLBACK,
);
return $items;
}