diff --git a/index.php b/index.php index c7c4891..2f19dc7 100755 --- a/index.php +++ b/index.php @@ -39,7 +39,11 @@ define('GLPI_ROOT', '../..'); include (GLPI_ROOT . "/inc/includes.php"); -commonHeader("TITRE",$_SERVER['PHP_SELF'],"plugins"); +if ($_SESSION["glpiactiveprofile"]["interface"] == "central") + commonHeader("TITRE", $_SERVER['PHP_SELF'],"plugins"); + else + helpHeader("TITRE", $_SERVER['PHP_SELF']); + echo "This is the plugin index file"; diff --git a/setup.php b/setup.php index 4c400e2..61ffabb 100755 --- a/setup.php +++ b/setup.php @@ -41,6 +41,7 @@ function plugin_init_example() { // Display a menu entry ? $PLUGIN_HOOKS['menu_entry']['example'] = true; + $PLUGIN_HOOKS["helpdesk_menu_entry"]['example'] = true; // Setup/Update functions $PLUGIN_HOOKS['setup']['example'] = "plugin_setup_example"; // Config function @@ -60,6 +61,8 @@ function plugin_init_example() { $PLUGIN_HOOKS['central_action']['example'] = 'plugin_central_action_example'; // Cron action $PLUGIN_HOOKS['cron']['example'] = DAY_TIMESTAMP; + //redirect + $PLUGIN_HOOKS['redirect_page']['example']="example.form.php"; }