use 4th menu entry

git-svn-id: https://forge.glpi-project.org/svn/example/trunk@102 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
moyooo 2009-12-01 14:14:44 +00:00
parent 5584c44e58
commit 63931aeb3f
2 changed files with 9 additions and 5 deletions

View File

@ -39,7 +39,7 @@ define('GLPI_ROOT', '../..');
include (GLPI_ROOT . "/inc/includes.php"); include (GLPI_ROOT . "/inc/includes.php");
if ($_SESSION["glpiactiveprofile"]["interface"] == "central"){ if ($_SESSION["glpiactiveprofile"]["interface"] == "central"){
commonHeader("TITRE", $_SERVER['PHP_SELF'],"plugins","example"); commonHeader("TITRE", $_SERVER['PHP_SELF'],"plugins","example","optionname");
} else { } else {
helpHeader("TITRE", $_SERVER['PHP_SELF']); helpHeader("TITRE", $_SERVER['PHP_SELF']);
} }

View File

@ -62,10 +62,14 @@ function plugin_init_example() {
// Display a menu entry ? // Display a menu entry ?
if (plugin_example_haveTypeRight(PLUGIN_EXAMPLE_TYPE,'r')) { // Right set in change_profile hook if (plugin_example_haveTypeRight(PLUGIN_EXAMPLE_TYPE,'r')) { // Right set in change_profile hook
$PLUGIN_HOOKS['menu_entry']['example'] = true; $PLUGIN_HOOKS['menu_entry']['example'] = true;
$PLUGIN_HOOKS['submenu_entry']['example']['add'] = 'example.form.php';
$PLUGIN_HOOKS['submenu_entry']['example']["<img src='".$CFG_GLPI["root_doc"]."/pics/menu_showall.png' title='".$LANG['plugin_example']["test"]."' alt='".$LANG['plugin_example']["test"]."'>"] = 'index.php'; $PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['title']="Search";
$PLUGIN_HOOKS['submenu_entry']['example'][$LANG['plugin_example']["test"]] = 'index.php'; $PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['page']='index.php';
$PLUGIN_HOOKS['submenu_entry']['example']['config'] = 'index.php'; $PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links']['search']='index.php';
$PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links']['add'] = 'example.form.php';
$PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links']['config'] = 'index.php';
$PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links']["<img src='".$CFG_GLPI["root_doc"]."/pics/menu_showall.png' title='".$LANG['plugin_example']["test"]."' alt='".$LANG['plugin_example']["test"]."'>"] = 'index.php';
$PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links'][$LANG['plugin_example']["test"]] = 'index.php';
$PLUGIN_HOOKS["helpdesk_menu_entry"]['example'] = true; $PLUGIN_HOOKS["helpdesk_menu_entry"]['example'] = true;
} }