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

Comments

new_newbie’s picture

Title: How to disable the simple invite modul displaying in the menu? » [solved]
Status: Active » Closed (fixed)

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