rendered paste bodyfunction cnucustom_menu($may_cache) {
global $user;
$items = array();
if ($may_cache) {
$items[] = array('title' => t('Map Drupal Users'),
'path' => 'civicrm/map',
'access' => user_access('access CiviCRM'),
'callback' => 'cnucustom_uf_matches',
);
}
// we have to override the tabs on the user's page so that we can add
// a new member splash page and make the 'view' say 'member profile'.
else {
if (arg(0) == 'user' && is_numeric(arg(1)) && arg(1) > 0) {
$title = (arg(1) == $user->uid) ? t('my profile') : t('member profile');
$items[] = array('path' => 'user/'. arg(1),
'title' => $title,
'type' => MENU_CALLBACK,
'callback arguments' => array(arg(1)),
'callback' => 'user_view',
'access' => 1,
);
$items[] = array('path' => 'user/'. arg(1) .'/view',
'type' => MENU_DEFAULT_LOCAL_TASK,
'title' => $title, // "my" or "member"
'access' => 1,
'weight' => -10,
);
}
}
return $items;
}