From b8f04bc80748752defe39e33e0b14d5e3ee1aa7e Mon Sep 17 00:00:00 2001 From: Alexandr Voronkin Date: Thu, 4 Nov 2010 08:00:20 +0300 Subject: [PATCH 1/4] Added variables $mm_url and $mm_path --- assets/plugins/managermanager/mm.inc.php | 8 ++++---- .../managermanager/widgets/!template/!template.php | 6 +++--- .../widgets/accessdenied/accessdenied.php | 4 ++-- .../plugins/managermanager/widgets/colors/colors.php | 6 +++--- assets/plugins/managermanager/widgets/tags/tags.php | 10 +++++----- plugin.txt | 9 +++++++-- 6 files changed, 24 insertions(+), 19 deletions(-) diff --git a/assets/plugins/managermanager/mm.inc.php b/assets/plugins/managermanager/mm.inc.php index afaedcc..25e0460 100644 --- a/assets/plugins/managermanager/mm.inc.php +++ b/assets/plugins/managermanager/mm.inc.php @@ -52,7 +52,7 @@ $ignore_first_chars = array('.', '_', '!'); // Include functions - we'll load all *.inc.php files in the "functions" folder -$function_dir = $modx->config['base_path'] . 'assets/plugins/managermanager/functions'; +$function_dir = $mm_path . 'functions'; if ($handle = opendir($function_dir)) { while (false !== ($file = readdir($handle))) { if (!in_array(substr($file, 0, 1), $ignore_first_chars) && $file != ".." && substr($file, -8) == '.inc.php') { @@ -66,7 +66,7 @@ // Include widgets // We look for a PHP file with the same name as the directory - e.g. // /widgets/widgetname/widgetname.php -$widget_dir = $modx->config['base_path'] . 'assets/plugins/managermanager/widgets'; +$widget_dir = $mm_path . 'widgets'; if ($handle = opendir($widget_dir)) { while (false !== ($file = readdir($handle))) { if (!in_array(substr($file, 0, 1), $ignore_first_chars) && $file != ".." && is_dir($widget_dir.'/'.$file)) { @@ -169,7 +169,7 @@ function make_changes($chunk) { global $modx; // Global modx object - $config_file = $modx->config['base_path'] . 'assets/plugins/managermanager/mm_rules.inc.php'; + $config_file = $mm_path . 'mm_rules.inc.php'; // See if there is any chunk output (e.g. it exists, and is not empty) $chunk_output = $modx->getChunk($chunk); @@ -358,7 +358,7 @@ function make_changes($chunk) { // Where would we get the config file from? - $config_file = $modx->config['base_path'] . 'assets/plugins/managermanager/mm_rules.inc.php'; + $config_file = $mm_path . 'mm_rules.inc.php'; // See if there is any chunk output (e.g. it exists, and is not empty) $chunk_output = $modx->getChunk($config_chunk); diff --git a/assets/plugins/managermanager/widgets/!template/!template.php b/assets/plugins/managermanager/widgets/!template/!template.php index 3c817a3..59ccf98 100644 --- a/assets/plugins/managermanager/widgets/!template/!template.php +++ b/assets/plugins/managermanager/widgets/!template/!template.php @@ -6,7 +6,7 @@ //--------------------------------------------------------------------------------- function mm_widget_template($fields, $other_param='defaultValue', $roles='', $templates='') { - global $modx, $content, $mm_fields; + global $modx, $content, $mm_fields, $mm_url; $e = &$modx->Event; if (useThisRule($roles, $templates)) { @@ -42,8 +42,8 @@ function mm_widget_template($fields, $other_param='defaultValue', $roles='', $te // We have functions to include JS or CSS external files you might need // The standard ModX API methods don't work here - $output .= includeJs('/assets/plugins/managermanager/widgets/template/javascript.js'); - $output .= includeCss('/assets/plugins/managermanager/widgets/template/styles.css'); + $output .= includeJs($mm_url . 'widgets/template/javascript.js'); + $output .= includeCss($mm_url . 'widgets/template/styles.css'); // Do something for each of the fields supplied diff --git a/assets/plugins/managermanager/widgets/accessdenied/accessdenied.php b/assets/plugins/managermanager/widgets/accessdenied/accessdenied.php index e668026..e66f147 100644 --- a/assets/plugins/managermanager/widgets/accessdenied/accessdenied.php +++ b/assets/plugins/managermanager/widgets/accessdenied/accessdenied.php @@ -8,7 +8,7 @@ //--------------------------------------------------------------------------------- function mm_widget_accessdenied($ids='', $message='', $roles='') { - global $modx, $content; + global $modx, $content, $mm_url; $e = &$modx->Event; if (empty($message)) $message='Access deniedAccess to current document closed for security reasons.'; @@ -23,7 +23,7 @@ function mm_widget_accessdenied($ids='', $message='', $roles='') { if (in_array($docid, $ids)) { - $output .= includeCss($modx->config['base_url'] . 'assets/plugins/managermanager/widgets/accessdenied/accessdenied.css'); + $output .= includeCss($mm_url . 'widgets/accessdenied/accessdenied.css'); $output .= ' $j("input, div, form[name=mutate]").remove(); // Remove all content from the page diff --git a/assets/plugins/managermanager/widgets/colors/colors.php b/assets/plugins/managermanager/widgets/colors/colors.php index 3a2b0e9..9419f5e 100644 --- a/assets/plugins/managermanager/widgets/colors/colors.php +++ b/assets/plugins/managermanager/widgets/colors/colors.php @@ -6,7 +6,7 @@ // Adds a color selection widget to the specified TVs //--------------------------------------------------------------------------------- function mm_widget_colors($fields, $default='#ffffff', $roles='', $templates='') { - global $modx, $content, $mm_fields; + global $modx, $content, $mm_fields, $mm_url; $e = &$modx->Event; if (useThisRule($roles, $templates)) { @@ -33,10 +33,10 @@ function mm_widget_colors($fields, $default='#ffffff', $roles='', $templates='') } // Insert some JS - $output .= includeJs($modx->config['base_url'] .'assets/plugins/managermanager/widgets/colors/farbtastic.js'); + $output .= includeJs($mm_url .'widgets/colors/farbtastic.js'); // Insert some CSS - $output .= includeCss($modx->config['base_url'] .'assets/plugins/managermanager/widgets/colors/farbtastic.css'); + $output .= includeCss($mm_url .'widgets/colors/farbtastic.css'); // Go through each of the fields supplied foreach ($fields as $tv) { diff --git a/assets/plugins/managermanager/widgets/tags/tags.php b/assets/plugins/managermanager/widgets/tags/tags.php index 5f844df..d9f0fd5 100644 --- a/assets/plugins/managermanager/widgets/tags/tags.php +++ b/assets/plugins/managermanager/widgets/tags/tags.php @@ -6,7 +6,7 @@ //--------------------------------------------------------------------------------- function mm_widget_tags($fields, $delimiter=',', $source='', $display_count=false, $roles='', $templates='') { - global $modx, $content, $mm_fields; + global $modx, $content, $mm_fields, $mm_url; $e = &$modx->Event; if (useThisRule($roles, $templates)) { @@ -43,9 +43,9 @@ function mm_widget_tags($fields, $delimiter=',', $source='', $display_count=fals // Insert some JS and a style sheet into the head - $output .= "// -------------- Tag widget include ------------- \n"; - $output .= includeJs($modx->config['base_url'] .'assets/plugins/managermanager/widgets/tags/tags.js'); - $output .= includeCss($modx->config['base_url'] .'assets/plugins/managermanager/widgets/tags/tags.css'); + $output .= "// -------------- Tag widget include ".$mm_url."------------- \n"; + $output .= includeJs($mm_url . 'widgets/tags/tags.js'); + $output .= includeCss($mm_url . 'widgets/tags/tags.css'); // Go through each of the fields supplied @@ -98,4 +98,4 @@ function mm_widget_tags($fields, $delimiter=',', $source='', $display_count=fals } $e->output($output . "\n"); } -?> \ No newline at end of file +?> diff --git a/plugin.txt b/plugin.txt index 0d96995..ef86f2d 100644 --- a/plugin.txt +++ b/plugin.txt @@ -37,5 +37,10 @@ $js_default_url_remote = 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jque //------------------------------------------------------- // Run the main code -$asset_path = $modx->config['base_path'] . 'assets/plugins/managermanager/mm.inc.php'; -include($asset_path); + +global $mm_url; + +isset($mm_url) ? : $mm_url = $modx->config['base_url'] . 'assets/plugins/managermanager/' ; +isset($mm_path) ? : $mm_path = $modx->config['base_path'] . 'assets/plugins/managermanager/'; + +include($mm_path.'mm.inc.php'); From c31b314cd4d8dc5e2a08f9e9fb29ab1f992ee2f6 Mon Sep 17 00:00:00 2001 From: Alexandr Voronkin Date: Fri, 5 Nov 2010 21:16:20 +0300 Subject: [PATCH 2/4] MM in top menu --- .../managermanager/functions/topmenu.inc.php | 111 ++++++++++++++++++ assets/plugins/managermanager/mm.inc.php | 91 +++++++++++++- plugin.txt | 8 +- 3 files changed, 204 insertions(+), 6 deletions(-) create mode 100644 assets/plugins/managermanager/functions/topmenu.inc.php diff --git a/assets/plugins/managermanager/functions/topmenu.inc.php b/assets/plugins/managermanager/functions/topmenu.inc.php new file mode 100644 index 0000000..993feaf --- /dev/null +++ b/assets/plugins/managermanager/functions/topmenu.inc.php @@ -0,0 +1,111 @@ +".$name."');\n"; + if($index) { + $output .= "tabs = \$j('#nav').children('li');\n"; + $output .= "tabs.eq(larry(".$index.", tabs.size())).before(tab);\n"; + + } + else { + $output .= "\$j('#nav').append(tab);\n"; + } + + echo ($output . "\n"); + } +} + + +function renameSubTab($tab, $newname, $roles='') { + global $mm_top_menu; + if (useThisRule($roles)) { + $output .= " // ----------- rename sub tab -------------- \n"; + $output .= "\$j(\"a[href='".$mm_top_menu[$tab]['href']."']\").html('".$newname."');\n"; + echo ($output . "\n"); + } +} + + +function hideSubTab($tabs, $roles='') { + global $mm_top_menu; + if (useThisRule($roles)) { + $output .= " // ----------- hide sub tab -------------- \n"; + $tabsArray = explode(',',$tabs); + foreach($tabsArray as $tab) { + $output .= "\$j(\"a[href='".$mm_top_menu[$tab]['href']."']:parent\").remove();\n"; + } + echo ($output . "\n"); + } +} + + +function renameModuleTab($moduleId, $newname, $roles='') { + if (useThisRule($roles)) { + $output .= " // ----------- Rename module tab -------------- \n"; + $output .= "\$j(\"a[href='index.php?a=112&id=".$moduleId."']\").html('".$newname."');\n"; + echo ($output . "\n"); + } +} + + +function addSubTab($name,$tab,$path='', $roles='') { + global $mm_top_menu; + if (useThisRule($roles)) { + $output .= " // ----------- add subtab -------------- \n"; + if(in_array($tab,array_keys($mm_top_menu))) { + $output.= "tab = \$j('".$mm_top_menu[$tab]['id']."');\n"; + } + else { + $output.= "tab = \$j('#limenu".$tab."');\n"; + } + $output.="subTab = \$j('
  • ".$name."
  • ');\n"; + $output .= "\$j(subTab).appendTo(tab.children('ul.subnav'));\n"; + echo ($output . "\n"); + } +} + +?> diff --git a/assets/plugins/managermanager/mm.inc.php b/assets/plugins/managermanager/mm.inc.php index 25e0460..122dce5 100644 --- a/assets/plugins/managermanager/mm.inc.php +++ b/assets/plugins/managermanager/mm.inc.php @@ -79,7 +79,7 @@ // Set variables -global $content,$default_template, $mm_current_page, $mm_fields; +global $content,$default_template, $mm_current_page, $mm_fields, $mm_top_menu; $mm_current_page = array(); $mm_current_page['template'] = isset($_POST['template']) ? $_POST['template'] : isset($content['template']) ? $content['template'] : $default_template; $mm_current_page['role'] = $_SESSION['mgrRole']; @@ -116,7 +116,40 @@ 'which_editor' => array('fieldtype'=>'select', 'fieldname'=>'which_editor','dbname'=>'', 'tv'=>false), 'resource_type' => array('fieldtype'=>'select', 'fieldname'=>'type', 'dbname'=>'isfolder', 'tv'=>false), 'weblink' => array('fieldtype'=>'input', 'fieldname'=>'ta', 'dbname'=>'content', 'tv'=>false) -); +); + +$mm_top_menu = array( + 'site'=>array('id'=>'#limenu3','href'=>'//#menu3'), + 'elements'=>array('id'=>'#limenu5','href'=>'//#menu5'), + 'modules'=>array('id'=>'#limenu9','href'=>'//#menu9'), + 'security'=>array('id'=>'#limenu2','href'=>'//#menu2'), + 'tools'=>array('id'=>'#limenu1-1','href'=>'menu1-1'), + 'reports'=>array('id'=>'#limenu1-2','href'=>'menu1-2'), + 'home'=>array('href'=>'index.php?a=2'), + 'preview'=>array('href'=>'../'), + 'clear cache'=>array('href'=>'index.php?a=26'), + 'search'=>array('href'=>'index.php?a=71'), + 'new resource'=>array('href'=>'index.php?a=4'), + 'new weblink'=>array('href'=>'index.php?a=72'), + 'manage elements'=>array('href'=>'index.php?a=76'), + 'manage files'=>array('href'=>'index.php?a=31'), + 'manage modules'=>array('href'=>'index.php?a=106'), + 'manager users'=>array('href'=>'index.php?a=75'), + 'web users'=>array('href'=>'index.php?a=99'), + 'roles'=>array('href'=>'index.php?a=86'), + 'manager permissions'=>array('href'=>'index.php?a=40'), + 'web permissions'=>array('href'=>'index.php?a=91'), + 'backup'=>array('href'=>'index.php?a=93'), + 'backup'=>array('href'=>'index.php?a=93'), + 'remove locks'=>array('href'=>'javascript:removeLocks();'), + 'import html'=>array('href'=>'index.php?a=95'), + 'export html'=>array('href'=>'index.php?a=83'), + 'configuration'=>array('href'=>'index.php?a=17'), + 'shedule'=>array('href'=>'index.php?a=70'), + 'system events'=>array('href'=>'index.php?a=114'), + 'manager actions'=>array('href'=>'index.php?a=13'), + 'system info'=>array('href'=>'index.php?a=53') +); // Add in TVs to the list of available fields @@ -451,8 +484,62 @@ function make_changes($chunk) { } break; +//MODx manager top menu +case 'OnManagerPageInit': + if($_REQUEST['f'] == 'menu') { + echo includeJs($js_url, 'html'); + echo ' + + + + + +'; + + } + break; } // end switch diff --git a/plugin.txt b/plugin.txt index ef86f2d..5d28111 100644 --- a/plugin.txt +++ b/plugin.txt @@ -7,8 +7,8 @@ * @category plugin * @version 0.3.9dev * @license http://www.gnu.org/copyleft/gpl.html GNU Public License (GPL) - * @internal @properties &config_chunk=Configuration Chunk;text;mm_demo_rules; &remove_deprecated_tv_types_pref=Remove deprecated TV types;list;yes,no;yes &which_jquery=jQuery source;list;local (assets/js),remote (google code),manual url (specify below);local (assets/js) &js_src_type=jQuery URL override;text; - * @internal @events OnDocFormRender,OnDocFormPrerender,OnPluginFormRender,OnTVFormRender + * @internal @properties &topmenu_config_chunk=Top Menu Configuration Chunk;text;topmenu_rules &config_chunk=Configuration Chunk;text;mm_demo_rules &remove_deprecated_tv_types_pref=Remove deprecated TV types;list;yes,no;yes &which_jquery=jQuery source;list;local (assets/js),remote (google code),manual url (specify below);local (assets/js) &js_src_type=jQuery URL override;text; + * @internal @events OnDocFormRender,OnDocFormPrerender,OnPluginFormRender,OnTVFormRender,OnManagerPageInit * @internal @modx_category Manager and Admin * @internal @legacy_names Image TV Preview, Show Image TVs */ @@ -40,7 +40,7 @@ $js_default_url_remote = 'http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jque global $mm_url; -isset($mm_url) ? : $mm_url = $modx->config['base_url'] . 'assets/plugins/managermanager/' ; -isset($mm_path) ? : $mm_path = $modx->config['base_path'] . 'assets/plugins/managermanager/'; +$mm_url = $modx->config['base_url'] . 'assets/plugins/managermanager/' ; +$mm_path = $modx->config['base_path'] . 'assets/plugins/managermanager/'; include($mm_path.'mm.inc.php'); From f46d818048615a2e09a3687728f66b531ed87ace Mon Sep 17 00:00:00 2001 From: Alexandr Voronkin Date: Sat, 6 Nov 2010 20:20:23 +0300 Subject: [PATCH 3/4] altered functions in topmenu.inc.php --- .../managermanager/functions/topmenu.inc.php | 147 ++++++++++++------ assets/plugins/managermanager/mm.inc.php | 34 +--- 2 files changed, 97 insertions(+), 84 deletions(-) diff --git a/assets/plugins/managermanager/functions/topmenu.inc.php b/assets/plugins/managermanager/functions/topmenu.inc.php index 993feaf..66345a8 100644 --- a/assets/plugins/managermanager/functions/topmenu.inc.php +++ b/assets/plugins/managermanager/functions/topmenu.inc.php @@ -1,35 +1,92 @@ array('id'=>'#limenu3','href'=>'#menu3'), + 'home'=>array('href'=>'index.php?a=2'), + 'preview'=>array('href'=>'../'), + 'clear cache'=>array('href'=>'index.php?a=26'), + 'search'=>array('href'=>'index.php?a=71'), + 'new resource'=>array('href'=>'index.php?a=4'), + 'new weblink'=>array('href'=>'index.php?a=72'), + + 'elements'=>array('id'=>'#limenu5','href'=>'#menu5'), + 'manage elements'=>array('href'=>'index.php?a=76'), + 'manage files'=>array('href'=>'index.php?a=31'), + 'manage metatags'=>array('href'=>'index.php?a=81'), + + 'modules'=>array('id'=>'#limenu9','href'=>'#menu9'), + 'manage modules'=>array('href'=>'index.php?a=106'), + + 'security'=>array('id'=>'#limenu2','href'=>'#menu2'), + 'manager users'=>array('href'=>'index.php?a=75'), + 'web users'=>array('href'=>'index.php?a=99'), + 'roles'=>array('href'=>'index.php?a=86'), + 'manager permissions'=>array('href'=>'index.php?a=40'), + 'web permissions'=>array('href'=>'index.php?a=91'), + + 'tools'=>array('id'=>'#limenu1-1','href'=>'#menu1-1'), + 'backup'=>array('href'=>'index.php?a=93'), + 'remove locks'=>array('href'=>'javascript:removeLocks();'), + 'import html'=>array('href'=>'index.php?a=95'), + 'export html'=>array('href'=>'index.php?a=83'), + 'configuration'=>array('href'=>'index.php?a=17'), + + 'reports'=>array('id'=>'#limenu1-2','href'=>'#menu1-2'), + 'shedule'=>array('href'=>'index.php?a=70'), + 'system events'=>array('href'=>'index.php?a=114'), + 'manager actions'=>array('href'=>'index.php?a=13'), + 'system info'=>array('href'=>'index.php?a=53') +); + + +function renameMenu($name, $newname, $roles='') { + $name = strtolower($name); global $mm_top_menu; if (useThisRule($roles)) { - $output .= " // ----------- rename top tab -------------- \n"; - $output .= "\$j('".$mm_top_menu[$tab]['id']."').children('a').html('".$newname."');\n"; + $output .= " // ----------- rename tab -------------- \n"; + if((int)$name > 0) { + //rename module tab + $output .= "\$j(\"a[href='index.php?a=112&id=".$name."']\").html('".$newname."');\n"; + } + else { + //rename tab + $output .= "\$j(\"a[href='".$mm_top_menu[$name]['href']."']\").html('".$newname."');\n"; + } echo ($output . "\n"); } } -function hideTab($tabs, $roles='') { +function hideMenu($names, $roles='') { + $name = strtolower($name); global $mm_top_menu; if (useThisRule($roles)) { - $output = " // ----------- hide top tab -------------- \n"; - $tabsArray = explode(',',$tabs); - foreach($tabsArray as $tabName) { - $output .= "\$j('".$mm_top_menu[$tabName]['id']."').remove();\n"; + $output .= " // ----------- hide tab -------------- \n"; + $tabsArray = explode(',',$names); + foreach($tabsArray as $name) { + if((int)$name > 0) { + //hide module tab + $output .= "\$j(\"a[href='index.php?a=112&id=".$name."']\").parent().remove();\n"; + } + else { + //hide tab + $output .= "\$j(\"a[href='".$mm_top_menu[$name]['href']."']\").parent().remove();\n"; + } } echo ($output . "\n"); } } - -function moveTab($tab, $index='', $roles='') { +function moveMenu($name, $index='', $roles='') { + $name = strtolower($name); global $mm_top_menu; (int)$index; if (useThisRule($roles)) { $output = " // ----------- move top tab -------------- \n"; if($index) { - $output .= "tab = \$j('".$mm_top_menu[$tab]['id']."');\n"; + $output .= "tab = \$j('".$mm_top_menu[$name]['id']."');\n"; $output .= "tabs = \$j('#nav').children('li');\n"; $output .= "tabs.eq(larry(".$index.", tabs.size())).before(tab);\n"; } @@ -41,10 +98,11 @@ function moveTab($tab, $index='', $roles='') { } -function addTab($name,$id,$index='', $roles='') { +function addMenu($name,$id,$index='', $roles='') { + global $mm_debug; (int)$index; if (useThisRule($roles)) { - $output .= " // ----------- add tab -------------- \n"; + $output .= " // ----------- add top tab -------------- \n"; $output.="tab = \$j('
  • ".$name."
    • ');\n"; if($index) { $output .= "tabs = \$j('#nav').children('li');\n"; @@ -59,53 +117,40 @@ function addTab($name,$id,$index='', $roles='') { } } - -function renameSubTab($tab, $newname, $roles='') { - global $mm_top_menu; +function addSubMenu($name,$parentTabId,$path='',$index='', $roles='') { + global $mm_top_menu,$mm_debug; + (int)$index; if (useThisRule($roles)) { - $output .= " // ----------- rename sub tab -------------- \n"; - $output .= "\$j(\"a[href='".$mm_top_menu[$tab]['href']."']\").html('".$newname."');\n"; + $output .= " // ----------- add subtab -------------- \n"; + if(in_array($parentTabId,array_keys($mm_top_menu))) { + $output.= "parentTab = \$j('".$mm_top_menu[$parentTabId]['id']."');\n"; + } + else { + $output.= "parentTab = \$j('#limenu".$parentTabId."');\n"; + } + $output.="tab = \$j('
    • ".$name."
    • ');\n"; + $output.="tabs = \$j(parentTab).children('ul').children('li');\n"; + if($mm_debug) { + $output .= "console.log(\"add subtab ".$name."\",tabs,tabs.length);\n"; + } + if($index) { + $output .= "tabs.eq(larry(".$index.", tabs.length)).after(tab);\n"; + } + else { + $output .= "\$j(tab).appendTo(parentTab.children('ul'));\n"; + } + echo ($output . "\n"); } } -function hideSubTab($tabs, $roles='') { - global $mm_top_menu; - if (useThisRule($roles)) { - $output .= " // ----------- hide sub tab -------------- \n"; - $tabsArray = explode(',',$tabs); - foreach($tabsArray as $tab) { - $output .= "\$j(\"a[href='".$mm_top_menu[$tab]['href']."']:parent\").remove();\n"; - } - echo ($output . "\n"); - } -} -function renameModuleTab($moduleId, $newname, $roles='') { - if (useThisRule($roles)) { - $output .= " // ----------- Rename module tab -------------- \n"; - $output .= "\$j(\"a[href='index.php?a=112&id=".$moduleId."']\").html('".$newname."');\n"; - echo ($output . "\n"); - } -} -function addSubTab($name,$tab,$path='', $roles='') { - global $mm_top_menu; - if (useThisRule($roles)) { - $output .= " // ----------- add subtab -------------- \n"; - if(in_array($tab,array_keys($mm_top_menu))) { - $output.= "tab = \$j('".$mm_top_menu[$tab]['id']."');\n"; - } - else { - $output.= "tab = \$j('#limenu".$tab."');\n"; - } - $output.="subTab = \$j('
    • ".$name."
    • ');\n"; - $output .= "\$j(subTab).appendTo(tab.children('ul.subnav'));\n"; - echo ($output . "\n"); - } -} + + + ?> diff --git a/assets/plugins/managermanager/mm.inc.php b/assets/plugins/managermanager/mm.inc.php index 122dce5..1a42eec 100644 --- a/assets/plugins/managermanager/mm.inc.php +++ b/assets/plugins/managermanager/mm.inc.php @@ -79,7 +79,7 @@ // Set variables -global $content,$default_template, $mm_current_page, $mm_fields, $mm_top_menu; +global $content,$default_template, $mm_current_page, $mm_fields; $mm_current_page = array(); $mm_current_page['template'] = isset($_POST['template']) ? $_POST['template'] : isset($content['template']) ? $content['template'] : $default_template; $mm_current_page['role'] = $_SESSION['mgrRole']; @@ -118,38 +118,6 @@ 'weblink' => array('fieldtype'=>'input', 'fieldname'=>'ta', 'dbname'=>'content', 'tv'=>false) ); -$mm_top_menu = array( - 'site'=>array('id'=>'#limenu3','href'=>'//#menu3'), - 'elements'=>array('id'=>'#limenu5','href'=>'//#menu5'), - 'modules'=>array('id'=>'#limenu9','href'=>'//#menu9'), - 'security'=>array('id'=>'#limenu2','href'=>'//#menu2'), - 'tools'=>array('id'=>'#limenu1-1','href'=>'menu1-1'), - 'reports'=>array('id'=>'#limenu1-2','href'=>'menu1-2'), - 'home'=>array('href'=>'index.php?a=2'), - 'preview'=>array('href'=>'../'), - 'clear cache'=>array('href'=>'index.php?a=26'), - 'search'=>array('href'=>'index.php?a=71'), - 'new resource'=>array('href'=>'index.php?a=4'), - 'new weblink'=>array('href'=>'index.php?a=72'), - 'manage elements'=>array('href'=>'index.php?a=76'), - 'manage files'=>array('href'=>'index.php?a=31'), - 'manage modules'=>array('href'=>'index.php?a=106'), - 'manager users'=>array('href'=>'index.php?a=75'), - 'web users'=>array('href'=>'index.php?a=99'), - 'roles'=>array('href'=>'index.php?a=86'), - 'manager permissions'=>array('href'=>'index.php?a=40'), - 'web permissions'=>array('href'=>'index.php?a=91'), - 'backup'=>array('href'=>'index.php?a=93'), - 'backup'=>array('href'=>'index.php?a=93'), - 'remove locks'=>array('href'=>'javascript:removeLocks();'), - 'import html'=>array('href'=>'index.php?a=95'), - 'export html'=>array('href'=>'index.php?a=83'), - 'configuration'=>array('href'=>'index.php?a=17'), - 'shedule'=>array('href'=>'index.php?a=70'), - 'system events'=>array('href'=>'index.php?a=114'), - 'manager actions'=>array('href'=>'index.php?a=13'), - 'system info'=>array('href'=>'index.php?a=53') -); // Add in TVs to the list of available fields From 901f718e233bc53548fb693748e8c0eb66811a9a Mon Sep 17 00:00:00 2001 From: Alexandr Voronkin Date: Sat, 6 Nov 2010 21:31:18 +0300 Subject: [PATCH 4/4] fix --- assets/plugins/managermanager/functions/topmenu.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/plugins/managermanager/functions/topmenu.inc.php b/assets/plugins/managermanager/functions/topmenu.inc.php index 66345a8..0ed8825 100644 --- a/assets/plugins/managermanager/functions/topmenu.inc.php +++ b/assets/plugins/managermanager/functions/topmenu.inc.php @@ -1,7 +1,7 @@ array('id'=>'#limenu3','href'=>'#menu3'), 'home'=>array('href'=>'index.php?a=2'),