When users click on the “Invitations” tab in their profile pages, it automatically sends them to the default “Accepted” page. What I’m trying to do is to set the “Make an Invitation” page as the default page so that when users click on the “Invitations” tab in their profile pages, they’ll automatically get the “Make an Invitation” page. How can I do something like this?

CommentFileSizeAuthor
default tab.jpg25.82 KBazwildcat

Comments

zeemp’s picture

+1

nymo’s picture

In a custom module, you could create a hook_menu_alter as such:

/**                                
 * Implementation of hook_menu_alter().                      
 */
function custom_module_menu_alter(&$callbacks) {
  $callbacks['user/%user/invites'] = array(
    'title' => 'Invitations',
    'page callback' => 'drupal_get_form',
    'page arguments' => array('invite_form', 'page', array()),
    'access callback' => 'invite_user_access',
    'access arguments' => array('send invitations', 1),
    'type' => MENU_LOCAL_TASK,
  );
  $callbacks['user/%user/invites/accepted']['type'] = MENU_LOCAL_TASK;
  $callbacks['user/%user/invites/new']['type'] = MENU_DEFAULT_LOCAL_TASK;
}
dale42’s picture

Version: 6.x-2.0-beta2 » 6.x-2.x-dev
Issue summary: View changes
Status: Active » Closed (outdated)

I'm helping the Invite module maintainers by cleaning up old issues.

Drupal 6 is no longer supported so I'm setting the issue status to Closed (outdated). Information on what that means is here: Issue Status field.

If you have a question about one of the current versions of the module please do submit a new issue.