diff --git a/index.php b/front/example.php
similarity index 98%
rename from index.php
rename to front/example.php
index c38f8b7..5296eec 100755
--- a/index.php
+++ b/front/example.php
@@ -35,7 +35,7 @@
$NEEDED_ITEMS=array("search");
-define('GLPI_ROOT', '../..');
+define('GLPI_ROOT', '../../..');
include (GLPI_ROOT . "/inc/includes.php");
if ($_SESSION["glpiactiveprofile"]["interface"] == "central"){
diff --git a/hook.php b/hook.php
index 4285b4b..d6994a2 100644
--- a/hook.php
+++ b/hook.php
@@ -96,7 +96,7 @@ function plugin_example_giveItem($type,$ID,$data,$num){
switch ($table.'.'.$field){
case "glpi_plugin_example.name" :
- $out= "";
+ $out= "";
$out.= $data["ITEM_$num"];
if ($_SESSION["glpiis_ids_visible"]||empty($data["ITEM_$num"])) $out.= " (".$data["id"].")";
$out.= "";
diff --git a/setup.php b/setup.php
index 5f1d93c..d26360d 100755
--- a/setup.php
+++ b/setup.php
@@ -42,7 +42,7 @@ function plugin_init_example() {
'classname' => 'PluginExampleExample',
'tablename' => 'glpi_plugin_example_example',
'formpage' => 'front/example.form.php',
- 'searchpage' => 'index.php',
+ 'searchpage' => 'front/example.php',
'typename' => 'Example Type',
'deleted_tables' => false,
'template_tables' => false,
@@ -62,12 +62,12 @@ function plugin_init_example() {
// Display a menu entry ?
if (plugin_example_haveTypeRight('PluginExampleExample','r')) { // Right set in change_profile hook
- $PLUGIN_HOOKS['menu_entry']['example'] = true;
+ $PLUGIN_HOOKS['menu_entry']['example'] = 'front/example.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']='/plugins/example/index.php';
- $PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links']['add'] = '/plugins/example/example.form.php';
+ $PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['page']='/plugins/example/front/example.php';
+ $PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links']['search']='/plugins/example/front/example.php';
+ $PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links']['add'] = '/plugins/example/front/example.form.php';
$PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links']['config'] = '/plugins/example/index.php';
$PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links']["
"] = '/plugins/example/index.php';
$PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links'][$LANG['plugin_example']["test"]] = '/plugins/example/index.php';