From 63931aeb3f0a3c46631272afa2896547cd8748e0 Mon Sep 17 00:00:00 2001 From: moyooo Date: Tue, 1 Dec 2009 14:14:44 +0000 Subject: [PATCH] use 4th menu entry git-svn-id: https://forge.glpi-project.org/svn/example/trunk@102 349b9182-4a13-0410-896f-e5e9767dd1b3 --- index.php | 2 +- setup.php | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/index.php b/index.php index 47e1197..ed42a00 100755 --- a/index.php +++ b/index.php @@ -39,7 +39,7 @@ define('GLPI_ROOT', '../..'); include (GLPI_ROOT . "/inc/includes.php"); if ($_SESSION["glpiactiveprofile"]["interface"] == "central"){ - commonHeader("TITRE", $_SERVER['PHP_SELF'],"plugins","example"); + commonHeader("TITRE", $_SERVER['PHP_SELF'],"plugins","example","optionname"); } else { helpHeader("TITRE", $_SERVER['PHP_SELF']); } diff --git a/setup.php b/setup.php index 047630b..fcf42f1 100755 --- a/setup.php +++ b/setup.php @@ -62,10 +62,14 @@ function plugin_init_example() { // Display a menu entry ? if (plugin_example_haveTypeRight(PLUGIN_EXAMPLE_TYPE,'r')) { // Right set in change_profile hook $PLUGIN_HOOKS['menu_entry']['example'] = true; - $PLUGIN_HOOKS['submenu_entry']['example']['add'] = 'example.form.php'; - $PLUGIN_HOOKS['submenu_entry']['example']["".$LANG["] = 'index.php'; - $PLUGIN_HOOKS['submenu_entry']['example'][$LANG['plugin_example']["test"]] = 'index.php'; - $PLUGIN_HOOKS['submenu_entry']['example']['config'] = 'index.php'; + + $PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['title']="Search"; + $PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['page']='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']["".$LANG["] = 'index.php'; + $PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links'][$LANG['plugin_example']["test"]] = 'index.php'; $PLUGIN_HOOKS["helpdesk_menu_entry"]['example'] = true; }