diff --git a/admin/index.php b/admin/index.php
index 65f1d06..d7d7574 100755
--- a/admin/index.php
+++ b/admin/index.php
@@ -128,12 +128,10 @@ if(
is_array($plugin_run_result = Plugins::getInstance()->run('before_display_template_admin_page', get_defined_vars())) ? extract($plugin_run_result) : null; //run hook
-
- //prevent indexing this page by bots
header('HTTP/1.0 401 Unauthorized');
if (ig('_ajax_') || ig('check_msgs'))
{
- echo_ajax(401, 'Unauthorized');
+ echo_ajax(401, $lang['HV_NOT_PRVLG_ACCESS']);
}
else
{
diff --git a/plugins/menu_toggle/admin_menus_toggle.html b/plugins/menu_toggle/admin_menus_toggle.html
index 37b2713..4d13b30 100644
--- a/plugins/menu_toggle/admin_menus_toggle.html
+++ b/plugins/menu_toggle/admin_menus_toggle.html
@@ -36,13 +36,14 @@ function toggleMenuItem(name, menu, hide, current) {
- {lang.R_CPINDEX}
+ - {lang.R_CONFIGS}
- {olang.R_MENUS_TOGGLE}
{olang.MENU_TOGGLE_EXP}
-
+
{olang.MENU_TOGGLE_TOP_MENU}
diff --git a/plugins/menu_toggle/init.php b/plugins/menu_toggle/init.php
index 3e26a04..24a4598 100644
--- a/plugins/menu_toggle/init.php
+++ b/plugins/menu_toggle/init.php
@@ -125,13 +125,38 @@ $kleeja_plugin['menu_toggle']['uninstall'] = function ($plg_id) {
# Plugin functions
$kleeja_plugin['menu_toggle']['functions'] = array(
//add to admin menu
+ 'require_admin_page_end_a_configs' => function($args) {
+ global $olang;
+ $go_menu = $args['go_menu'];
+ $last_item = $go_menu['all'];
+ unset($go_menu['all']);
+ $go_menu['menus_toggle'] = array(
+ 'name' => $olang['R_MENUS_TOGGLE'],
+ 'link' => './?cp=menus_toggle',
+ 'goto' => 'menus_toggle',
+ 'current' => g('cp') == 'menus_toggle'
+ );
+
+ $go_menu['all'] = $last_item;
+
+ return compact('go_menu');
+ },
+
'begin_admin_page' => function ($args) {
$adm_extensions = $args['adm_extensions'];
- $ext_icons = $args['ext_icons'];
-
+ $ext_expt = $args['ext_expt'];
$adm_extensions[] = 'menus_toggle';
- $ext_icons['menus_toggle'] = 'list';
- return compact('adm_extensions', 'ext_icons');
+ $ext_expt[] = 'menus_toggle';
+ return compact('adm_extensions', 'ext_expt');
+ },
+
+ 'endforeach_ext_admin_page' => function($args) {
+ if(g('cp') == 'menus_toggle')
+ {
+ $adm_extensions_menu = $args['adm_extensions_menu'];
+ $adm_extensions_menu[1]['current'] = true;
+ return compact('adm_extensions_menu');
+ }
},
//add as admin page to reach when click on admin menu item we added.
diff --git a/plugins/menu_toggle/menus_toggle.php b/plugins/menu_toggle/menus_toggle.php
index 67b298d..337b0e8 100644
--- a/plugins/menu_toggle/menus_toggle.php
+++ b/plugins/menu_toggle/menus_toggle.php
@@ -38,6 +38,10 @@ $top_menu_items = array(
);
+$go_menu = array(
+ array('name' => $olang['R_MENUS_TOGGLE'], 'link' => './?cp=menus_toggle', 'goto' => 'menus_toggle', 'current' => g('cp') == 'menus_toggle')
+);
+
if(ig('toggle'))
{
if (! kleeja_check_form_key_get('adm_menus_toggle', 3600))