[solved]

new_newbie - October 24, 2007 - 09:09
Project:Simple invite
Version:5.x-1.x-dev
Component:Code
Category:support request
Priority:normal
Assigned:new_newbie
Status:closed
Description

Hi there,

I built in the simple invite modul and it works fine. But by default the modul generates a link in the menu. I want to disable it because I have already made a link to the modul from a customized block.

How can I do this? I guess the simpleinvite.module has to be changed somewhere in the "function simpleinvite_menu" but I don't know where exactly and how to.

Could anyone help me please?

Cheers
new_newbie

#1

new_newbie - October 24, 2007 - 10:22
Title:How to disable the simple invite modul displaying in the menu?» [solved]
Status:active» closed

I found a solution. The change has to be made in the simpleinvite.module near line 31:

  else {
    $items[] = array(
      'path' => 'invite',
      'title' => t('Postidea.ch empfehlen'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array('simpleinvite_form'), 
      'access' => user_access('access content') && $user->mail,
    );
  }

Change to:

  else {
    $items[] = array(
      'path' => 'invite',
      'title' => t('Postidea.ch empfehlen'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array('simpleinvite_form'), 
      'access' => user_access('access content') && $user->mail,
  'type' => MENU_CALLBACK,
    );
  }

The change is the additional line "'type' => MENU_CALLBACK,". This disabled the menu item. I'm new to Drupal and I don't know if this fix is correct but It works fine for me, so the problem is solved.

Cheers
new_newbie

 
 

Drupal is a registered trademark of Dries Buytaert.