diff options
Diffstat (limited to 'plugins/add_index')
-rw-r--r-- | plugins/add_index/admin/admin_menu.php | 4 | ||||
-rw-r--r-- | plugins/add_index/admin/admin_menu.tpl | 4 | ||||
-rw-r--r-- | plugins/add_index/main.admin.inc.php | 24 | ||||
-rw-r--r-- | plugins/add_index/main.inc.php | 1 |
4 files changed, 20 insertions, 13 deletions
diff --git a/plugins/add_index/admin/admin_menu.php b/plugins/add_index/admin/admin_menu.php index 2ab250119..62a12bab4 100644 --- a/plugins/add_index/admin/admin_menu.php +++ b/plugins/add_index/admin/admin_menu.php @@ -66,11 +66,11 @@ $template->assign_var('EVENT_TRACER_FILTERS', implode("\n", $this->my_config['fi $template->assign_var('EVENT_TRACER_SHOW_ARGS', $this->my_config['show_args'] ? 'checked="checked"' : '' );*/
$template->assign_var('filename', $conf['add_index_filename']);
$template->assign_var('source_directory_path', $conf['add_index_source_directory_path']);
-$template->assign_var('F_ACTION', $my_url);
+//$template->assign_var('F_ACTION', $my_url);
// +-----------------------------------------------------------------------+
// | Sending html code |
// +-----------------------------------------------------------------------+
-$template->assign_var_from_handle('PLUGIN_ADMIN_CONTENT', 'plugin_admin_content');
+$template->assign_var_from_handle('ADMIN_CONTENT', 'plugin_admin_content');
?>
\ No newline at end of file diff --git a/plugins/add_index/admin/admin_menu.tpl b/plugins/add_index/admin/admin_menu.tpl index b365e312f..22104d270 100644 --- a/plugins/add_index/admin/admin_menu.tpl +++ b/plugins/add_index/admin/admin_menu.tpl @@ -1,4 +1,8 @@ <!-- $Id: admin_menu.tpl Ruben ARNAUD -->
+<div class="titrePage">
+ <h2>{lang:Add_Index}</h2>
+</div>
+
<p>{lang:add_index_Description_1}</p>
<p>{lang:add_index_Description_2}</p>
diff --git a/plugins/add_index/main.admin.inc.php b/plugins/add_index/main.admin.inc.php index 24cfa1dc5..457ea760a 100644 --- a/plugins/add_index/main.admin.inc.php +++ b/plugins/add_index/main.admin.inc.php @@ -33,6 +33,7 @@ if ((!defined('PHPWG_ROOT_PATH')) or (!(defined('IN_ADMIN') and IN_ADMIN))) class AdminAddIndex extends AddIndex
{
+ var $my_id;
function load_params()
{
global $conf;
@@ -62,7 +63,7 @@ class AdminAddIndex extends AddIndex array
(
'CAPTION' => l10n('Advanced_Add_Index'),
- 'URL' => get_root_url().'admin.php?page=main_page&page_type=plugin&plugin_id=add_index&overwrite'
+ 'URL' => get_admin_plugin_menu_link($this->my_id, 'admin/main_page').'&overwrite'
));
return $advanced_features;
@@ -75,7 +76,7 @@ class AdminAddIndex extends AddIndex array_push($site_manager_plugin_links,
array
(
- 'U_HREF' => get_root_url().'admin.php?page=main_page&page_type=plugin&plugin_id=add_index&site_id='.$site_id,
+ 'U_HREF' => get_admin_plugin_menu_link($this->my_id, 'admin/main_page').'&site_id='.$site_id,
'U_CAPTION' => l10n('Manager_Add_Index'),
'U_HINT' => l10n('Add_Index')
));
@@ -84,20 +85,21 @@ class AdminAddIndex extends AddIndex return $site_manager_plugin_links;
}
- function plugin_admin_menu()
+ function plugin_admin_menu($menu)
{
- add_plugin_admin_menu(l10n('Menu_Add_Index'), array(&$this, 'do_plugin_admin_menu'));
+ array_push($menu,
+ array(
+ 'NAME' => l10n('Menu_Add_Index'),
+ 'URL' => get_admin_plugin_menu_link($this->my_id, 'admin/admin_menu')
+ )
+ );
+ return $menu;
}
-
- function do_plugin_admin_menu($my_url)
- {
- include_once(dirname(__FILE__).'/admin/'.'admin_menu.php');
- }
-
}
// Create object
$add_index = new AdminAddIndex();
+$add_index->my_id = $plugin['id'];
// Load Add Index parameters
$add_index->load_params();
@@ -106,6 +108,6 @@ $add_index->load_params(); add_event_handler('loading_lang', array(&$add_index, 'loading_lang'));
add_event_handler('get_admin_advanced_features_links', array(&$add_index, 'get_admin_advanced_features_links'));
add_event_handler('get_admins_site_links', array(&$add_index, 'get_admins_site_links'), EVENT_HANDLER_PRIORITY_NEUTRAL, 3);
-add_event_handler('plugin_admin_menu', array(&$add_index, 'plugin_admin_menu') );
+add_event_handler('get_admin_plugin_menu_links', array(&$add_index, 'plugin_admin_menu') );
?>
\ No newline at end of file diff --git a/plugins/add_index/main.inc.php b/plugins/add_index/main.inc.php index 1f6346486..07ade8e10 100644 --- a/plugins/add_index/main.inc.php +++ b/plugins/add_index/main.inc.php @@ -49,6 +49,7 @@ if (in_array(script_basename(), array('popuphelp', 'admin'))) include_once(dirname(__FILE__).'/'.'main.base.inc.php');
include_once(dirname(__FILE__).'/'.'main.normal.inc.php');
}
+ set_plugin_data($plugin['id'], $add_index);
}
?>
\ No newline at end of file |