aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/add_index/main.admin.inc.php
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2007-01-09 11:38:54 +0000
committerrvelices <rv-github@modusoptimus.com>2007-01-09 11:38:54 +0000
commitb910549db2dc6e5b62750ac6faa68ea406d7b142 (patch)
treecb0e93aac7fc6d54adedc8230a8e7d16f4a20fb7 /plugins/add_index/main.admin.inc.php
parentc841c568f6d6f098fc097b7d8ee06c8602aa03d4 (diff)
Plugins: new way of adding links and content to administration pages...
git-svn-id: http://piwigo.org/svn/trunk@1705 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'plugins/add_index/main.admin.inc.php')
-rw-r--r--plugins/add_index/main.admin.inc.php24
1 files changed, 13 insertions, 11 deletions
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&amp;page_type=plugin&amp;plugin_id=add_index&amp;overwrite'
+ 'URL' => get_admin_plugin_menu_link($this->my_id, 'admin/main_page').'&amp;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&amp;page_type=plugin&amp;plugin_id=add_index&amp;site_id='.$site_id,
+ 'U_HREF' => get_admin_plugin_menu_link($this->my_id, 'admin/main_page').'&amp;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