0
'add_site'というモジュールを作成しました。しかし、私が管理パネルのモジュールセクションに行くと、このモジュールの許可を設定するオプションはありません。したがって、匿名ユーザーはこのモジュールにもアクセスできます。しかし、私は匿名ユーザーにこのモジュールにアクセスさせたくありません。あなたはdrupalで私のコードのフックパーミッションが必要です7コードが
my drupal .module code is here pls povide me the hook_permission code
<?php
// $Id: person.module
/**
* implements hook_menu()
*/
function person_menu(){
$items = array();
$items['person'] = array(
'title' => "Person",
'page callback' => "perso_personal_info", // after visit drupal6/person, person_personal_info() function is called
'access callback' => true, // must return true, otherwise it will not visible as menu item
'type' => MENU_NORMAL_ITEM, // drupal's default menu type
'weight' => '10', // we want to display person link below in our nav menu
);
return $items; // finally, do not forget to return $items array
}
function perso_personal_info(){
$output = 'Name: Gaurav</br>';
$output .= 'City: nanital </br>';
$output .= 'Country: india </br>';
return $output;
}
?>