@@ -4,26 +4,26 @@ |
||
4 | 4 | // E-Mail: [email protected] |
5 | 5 | |
6 | 6 | // Module Info |
7 | -define('_MI_MENUS_NAME',"Menus"); |
|
8 | -define('_MI_MENUS_DSC',"Menus for your site"); |
|
7 | +define('_MI_MENUS_NAME', "Menus"); |
|
8 | +define('_MI_MENUS_DSC', "Menus for your site"); |
|
9 | 9 | |
10 | 10 | // Blocks |
11 | -define('_MI_MENUS_BLK1',"Menu block"); |
|
12 | -define('_MI_MENUS_BLK1_DSC',""); |
|
13 | -define('_MI_MENUS_BLK2',"Main Menu"); |
|
14 | -define('_MI_MENUS_BLK2_DSC',"Shows the main navigation menu of the site"); |
|
11 | +define('_MI_MENUS_BLK1', "Menu block"); |
|
12 | +define('_MI_MENUS_BLK1_DSC', ""); |
|
13 | +define('_MI_MENUS_BLK2', "Main Menu"); |
|
14 | +define('_MI_MENUS_BLK2_DSC', "Shows the main navigation menu of the site"); |
|
15 | 15 | |
16 | 16 | // Admin menu |
17 | -define('_MI_MENUS_MENUSMANAGER',"Menus manager"); |
|
18 | -define('_MI_MENUS_MENUMANAGER',"Links manager"); |
|
19 | -define('_MI_MENUS_ABOUT',"About"); |
|
17 | +define('_MI_MENUS_MENUSMANAGER', "Menus manager"); |
|
18 | +define('_MI_MENUS_MENUMANAGER', "Links manager"); |
|
19 | +define('_MI_MENUS_ABOUT', "About"); |
|
20 | 20 | |
21 | 21 | //Configs |
22 | -define('_MI_MENUS_CONF_ASSIGN_METHOD',"Assign method"); |
|
23 | -define('_MI_MENUS_CONF_ASSIGN_METHOD_DSC',"Method for assigning css and js to header"); |
|
24 | -define('_MI_MENUS_CONF_ASSIGN_METHOD_XOOPSTPL',"XoopsTpl"); |
|
25 | -define('_MI_MENUS_CONF_ASSIGN_METHOD_XOTHEME',"XoTheme"); |
|
22 | +define('_MI_MENUS_CONF_ASSIGN_METHOD', "Assign method"); |
|
23 | +define('_MI_MENUS_CONF_ASSIGN_METHOD_DSC', "Method for assigning css and js to header"); |
|
24 | +define('_MI_MENUS_CONF_ASSIGN_METHOD_XOOPSTPL', "XoopsTpl"); |
|
25 | +define('_MI_MENUS_CONF_ASSIGN_METHOD_XOTHEME', "XoTheme"); |
|
26 | 26 | |
27 | 27 | //1.4 |
28 | -define('_MI_MENUS_ADMMENU0','Home'); |
|
28 | +define('_MI_MENUS_ADMMENU0', 'Home'); |
|
29 | 29 |
@@ -3,36 +3,36 @@ |
||
3 | 3 | // URL: http://www.xuups.com |
4 | 4 | // E-Mail: [email protected] |
5 | 5 | |
6 | -define('_AM_MENUS_MENU_TITLE',"Title"); |
|
7 | -define('_AM_MENUS_MENU_ALTTITLE',"Alt title"); |
|
8 | -define('_AM_MENUS_MENU_LINK',"Link"); |
|
9 | -define('_AM_MENUS_MENU_PARENT',"Parent menu"); |
|
10 | -define('_AM_MENUS_MENU_VISIBLE',"Visible"); |
|
11 | -define('_AM_MENUS_MENU_TARGET',"Target"); |
|
12 | -define('_AM_MENUS_MENU_GROUPS',"Groups"); |
|
13 | -define('_AM_MENUS_MENU_GROUPS_HELP',"Choose groups which can view this link"); |
|
14 | -define('_AM_MENUS_MENU_HOOKS',"Hooks"); |
|
15 | -define('_AM_MENUS_MENU_IMAGE',"Image"); |
|
16 | -define('_AM_MENUS_MENU_CSS',"Css"); |
|
6 | +define('_AM_MENUS_MENU_TITLE', "Title"); |
|
7 | +define('_AM_MENUS_MENU_ALTTITLE', "Alt title"); |
|
8 | +define('_AM_MENUS_MENU_LINK', "Link"); |
|
9 | +define('_AM_MENUS_MENU_PARENT', "Parent menu"); |
|
10 | +define('_AM_MENUS_MENU_VISIBLE', "Visible"); |
|
11 | +define('_AM_MENUS_MENU_TARGET', "Target"); |
|
12 | +define('_AM_MENUS_MENU_GROUPS', "Groups"); |
|
13 | +define('_AM_MENUS_MENU_GROUPS_HELP', "Choose groups which can view this link"); |
|
14 | +define('_AM_MENUS_MENU_HOOKS', "Hooks"); |
|
15 | +define('_AM_MENUS_MENU_IMAGE', "Image"); |
|
16 | +define('_AM_MENUS_MENU_CSS', "Css"); |
|
17 | 17 | |
18 | -define('_AM_MENUS_MENU_ACCESS_FILTER',"Access filter"); |
|
18 | +define('_AM_MENUS_MENU_ACCESS_FILTER', "Access filter"); |
|
19 | 19 | |
20 | -define('_AM_MENUS_ADD_MENUS',"Add a menu"); |
|
21 | -define('_AM_MENUS_LIST_MENUS',"List of menus"); |
|
22 | -define('_AM_MENUS_EDIT_MENUS',"Edit a menu"); |
|
23 | -define('_AM_MENUS_SAVE',"Menu saved"); |
|
20 | +define('_AM_MENUS_ADD_MENUS', "Add a menu"); |
|
21 | +define('_AM_MENUS_LIST_MENUS', "List of menus"); |
|
22 | +define('_AM_MENUS_EDIT_MENUS', "Edit a menu"); |
|
23 | +define('_AM_MENUS_SAVE', "Menu saved"); |
|
24 | 24 | |
25 | -define('_AM_MENUS_MENU_TARG_SELF',"Self"); |
|
26 | -define('_AM_MENUS_MENU_TARG_BLANK',"Blank"); |
|
27 | -define('_AM_MENUS_MENU_TARG_PARENT',"Parent"); |
|
28 | -define('_AM_MENUS_MENU_TARG_TOP',"Top"); |
|
25 | +define('_AM_MENUS_MENU_TARG_SELF', "Self"); |
|
26 | +define('_AM_MENUS_MENU_TARG_BLANK', "Blank"); |
|
27 | +define('_AM_MENUS_MENU_TARG_PARENT', "Parent"); |
|
28 | +define('_AM_MENUS_MENU_TARG_TOP', "Top"); |
|
29 | 29 | |
30 | -define('_AM_MENUS_ACTION_GOTO_MENU',"Go to Menu"); |
|
31 | -define('_AM_MENUS_ACTION_TOGGLE',"Toggle visibility"); |
|
32 | -define('_AM_MENUS_ACTION_UP',"Move menu up"); |
|
33 | -define('_AM_MENUS_ACTION_DOWN',"Move menu down"); |
|
30 | +define('_AM_MENUS_ACTION_GOTO_MENU', "Go to Menu"); |
|
31 | +define('_AM_MENUS_ACTION_TOGGLE', "Toggle visibility"); |
|
32 | +define('_AM_MENUS_ACTION_UP', "Move menu up"); |
|
33 | +define('_AM_MENUS_ACTION_DOWN', "Move menu down"); |
|
34 | 34 | |
35 | -define('_AM_MENUS_MSG_SUCCESS',"Done!"); |
|
36 | -define("_AM_MENUS_MSG_SUREDEL","Are you sure you want to delete this menu?"); |
|
37 | -define('_AM_MENUS_MSG_NOTFOUND',"No entries found!"); |
|
38 | -define('_AM_MENUS_MSG_NOMENUS',"Please create a menu first!"); |
|
35 | +define('_AM_MENUS_MSG_SUCCESS', "Done!"); |
|
36 | +define("_AM_MENUS_MSG_SUREDEL", "Are you sure you want to delete this menu?"); |
|
37 | +define('_AM_MENUS_MSG_NOTFOUND', "No entries found!"); |
|
38 | +define('_AM_MENUS_MSG_NOMENUS', "Please create a menu first!"); |
@@ -89,18 +89,18 @@ discard block |
||
89 | 89 | if ($helper->getConfig('assign_method') === 'xoopstpl') { |
90 | 90 | $tpl_vars = ''; |
91 | 91 | foreach ($css as $file) { |
92 | - $tpl_vars .= "\n" . '<link rel="stylesheet" type="text/css" media="all" href="' . $file . '" />'; |
|
92 | + $tpl_vars .= "\n".'<link rel="stylesheet" type="text/css" media="all" href="'.$file.'" />'; |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | foreach ($js as $file) { |
96 | - $tpl_vars .= "\n" . '<script type="text/javascript" src="' . $file . '"></script>'; |
|
96 | + $tpl_vars .= "\n".'<script type="text/javascript" src="'.$file.'"></script>'; |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | if (isset($skin_info['header'])) { |
100 | - $tpl_vars .= "\n" . $skin_info['header']; |
|
100 | + $tpl_vars .= "\n".$skin_info['header']; |
|
101 | 101 | } |
102 | 102 | |
103 | - $xoops->tpl()->assign('xoops_module_header', $tpl_vars . @$xoops->tpl()->getTemplateVars("xoops_module_header")); |
|
103 | + $xoops->tpl()->assign('xoops_module_header', $tpl_vars.@$xoops->tpl()->getTemplateVars("xoops_module_header")); |
|
104 | 104 | } else { |
105 | 105 | foreach ($css as $file) { |
106 | 106 | $xoops->theme()->addStylesheet($file); |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | } |
112 | 112 | |
113 | 113 | if (isset($skin_info['header'])) { |
114 | - $xoops->tpl()->assign('xoops_footer', @$xoops->tpl()->getTemplateVars("xoops_footer") . "\n" . $skin_info['header']); |
|
114 | + $xoops->tpl()->assign('xoops_footer', @$xoops->tpl()->getTemplateVars("xoops_footer")."\n".$skin_info['header']); |
|
115 | 115 | } |
116 | 116 | } |
117 | 117 | |
@@ -124,7 +124,7 @@ discard block |
||
124 | 124 | $block['content'] = $blockTpl->fetch($skin_info['template']); |
125 | 125 | |
126 | 126 | if ($options[3] === 'template') { |
127 | - $xoops->tpl()->assign('xoops_menu_' . $options[4], $block['content']); |
|
127 | + $xoops->tpl()->assign('xoops_menu_'.$options[4], $block['content']); |
|
128 | 128 | $block = array(); |
129 | 129 | } |
130 | 130 | |
@@ -148,7 +148,7 @@ discard block |
||
148 | 148 | unset($criteria); |
149 | 149 | |
150 | 150 | if (count($menus) == 0) { |
151 | - $form = "<a href='" . $helper->url('admin/admin_menus.php') . "'>" . _AM_MENUS_MSG_NOMENUS . "</a>"; |
|
151 | + $form = "<a href='".$helper->url('admin/admin_menus.php')."'>"._AM_MENUS_MSG_NOMENUS."</a>"; |
|
152 | 152 | return $form; |
153 | 153 | } |
154 | 154 | |
@@ -160,10 +160,10 @@ discard block |
||
160 | 160 | $form->addElement($element); |
161 | 161 | |
162 | 162 | //Skin |
163 | - $temp_skins = XoopsLists::getDirListAsArray(\XoopsBaseConfig::get('root-path') . "/modules/menus/skins/", ""); |
|
163 | + $temp_skins = XoopsLists::getDirListAsArray(\XoopsBaseConfig::get('root-path')."/modules/menus/skins/", ""); |
|
164 | 164 | $skins_options = array(); |
165 | 165 | foreach ($temp_skins as $skin) { |
166 | - if (XoopsLoad::fileExists($helper->path('skins/' . $skin . '/skin_version.php'))) { |
|
166 | + if (XoopsLoad::fileExists($helper->path('skins/'.$skin.'/skin_version.php'))) { |
|
167 | 167 | $skins_options[$skin] = $skin; |
168 | 168 | } |
169 | 169 | } |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | $menu->setVar('pid', 0); |
227 | 227 | $menu->setVar('title', $modules[$i]->getVar('name')); |
228 | 228 | $menu->setVar('alt_title', $modules[$i]->getVar('name')); |
229 | - $menu->setVar('link', \XoopsBaseConfig::get('url') . '/modules/' . $modules[$i]->getVar('dirname')); |
|
229 | + $menu->setVar('link', \XoopsBaseConfig::get('url').'/modules/'.$modules[$i]->getVar('dirname')); |
|
230 | 230 | $menu->setVar('image', 'icon-tags'); |
231 | 231 | $menus[] = $menu->getValues(); |
232 | 232 | if ($xoops->isModule() && $xoops->module->getVar('dirname') == $modules[$i]->getVar('dirname') && $plugin = \Xoops\Module\Plugin::getPlugin($modules[$i]->getVar('dirname'), 'menus')) { |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | $menu->setVar('pid', $i); |
239 | 239 | $menu->setVar('title', $sublink['name']); |
240 | 240 | $menu->setVar('alt_title', $sublink['name']); |
241 | - $menu->setVar('link', \XoopsBaseConfig::get('url') . '/modules/' . $modules[$i]->getVar('dirname') . '/'. $sublink['url']); |
|
241 | + $menu->setVar('link', \XoopsBaseConfig::get('url').'/modules/'.$modules[$i]->getVar('dirname').'/'.$sublink['url']); |
|
242 | 242 | $menus[] = $menu->getValues(); |
243 | 243 | $j--; |
244 | 244 | } |
@@ -56,7 +56,7 @@ |
||
56 | 56 | |
57 | 57 | if ($validator === 'smarty') { |
58 | 58 | if (isset($xoops->tpl()->_tpl_vars[$value])) { |
59 | - $string = str_replace($expression, $xoops->tpl()->_tpl_vars[$value], $string); |
|
59 | + $string = str_replace($expression, $xoops->tpl()->_tpl_vars[$value], $string); |
|
60 | 60 | } |
61 | 61 | } |
62 | 62 |
@@ -76,7 +76,7 @@ |
||
76 | 76 | $menu[$decoration] = self::_doDecoration($menu[$decoration]); |
77 | 77 | if ($decoration === 'link') { |
78 | 78 | if (!preg_match('/mailto:/i', $menu['link']) && !preg_match('#://#i', $menu['link'])) { |
79 | - $menu['link'] = \XoopsBaseConfig::get('url') . '/' . $menu['link']; //Do not do this in other decorators |
|
79 | + $menu['link'] = \XoopsBaseConfig::get('url').'/'.$menu['link']; //Do not do this in other decorators |
|
80 | 80 | } |
81 | 81 | } |
82 | 82 | } |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | $dirnames = XoopsLists::getDirListAsArray($helper->path('decorators/'), ''); |
48 | 48 | foreach ($dirnames as $dirname) { |
49 | 49 | if (XoopsLoad::loadFile($helper->path("decorators/{$dirname}/decorator.php"))) { |
50 | - $className = 'Menus' . ucfirst($dirname) . 'Decorator'; |
|
50 | + $className = 'Menus'.ucfirst($dirname).'Decorator'; |
|
51 | 51 | $class = new $className($dirname); |
52 | 52 | if ($class instanceof MenusDecoratorAbstract && $class instanceof MenusDecoratorInterface) { |
53 | 53 | $decorators[$dirname] = $class; |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | { |
77 | 77 | $helper = Menus::getInstance(); |
78 | 78 | |
79 | - $language = XoopsLocale::getLegacyLanguage(); |
|
79 | + $language = XoopsLocale::getLegacyLanguage(); |
|
80 | 80 | $path = $helper->path("decorators/{$name}/language"); |
81 | 81 | if (!$ret = XoopsLoad::loadFile("{$path}/{$language}/decorator.php")) { |
82 | 82 | $ret = XoopsLoad::loadFile("{$path}/english/decorator.php"); |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | $error = false; |
64 | 64 | $path = ''; |
65 | 65 | if ($skin_from_theme) { |
66 | - $path = "themes/" . $this->xoops()->getConfig('theme_set') . "/menu"; |
|
66 | + $path = "themes/".$this->xoops()->getConfig('theme_set')."/menu"; |
|
67 | 67 | if (!XoopsLoad::fileExists($this->xoops()->path("{$path}/skin_version.php"))) { |
68 | 68 | $error = true; |
69 | 69 | } |
@@ -78,7 +78,7 @@ discard block |
||
78 | 78 | |
79 | 79 | if (XoopsLoad::fileExists($file)) { |
80 | 80 | include $file; |
81 | - $info =& $skinversion; |
|
81 | + $info = & $skinversion; |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | $info['path'] = $this->xoops()->path($path); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | if (!isset($info['template'])) { |
88 | 88 | $info['template'] = $this->xoops()->path("modules/menus/templates/block.tpl"); |
89 | 89 | } else { |
90 | - $info['template'] = $this->xoops()->path("{$path}/" . $info['template']); |
|
90 | + $info['template'] = $this->xoops()->path("{$path}/".$info['template']); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | if (!isset($info['prefix'])) { |
@@ -133,11 +133,11 @@ |
||
133 | 133 | { |
134 | 134 | //get the currentpage |
135 | 135 | $sel = array(); |
136 | - $query_string = $_SERVER['QUERY_STRING'] ? '?' . $_SERVER['QUERY_STRING'] : ''; |
|
137 | - $self = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] . $query_string; |
|
136 | + $query_string = $_SERVER['QUERY_STRING'] ? '?'.$_SERVER['QUERY_STRING'] : ''; |
|
137 | + $self = 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'].$query_string; |
|
138 | 138 | |
139 | 139 | //set a default page in case we don't get matches |
140 | - $default = \XoopsBaseConfig::get('url') . "/index.php"; |
|
140 | + $default = \XoopsBaseConfig::get('url')."/index.php"; |
|
141 | 141 | |
142 | 142 | //get all matching links |
143 | 143 | foreach ($this->output as $idx => $menu) { |
@@ -23,9 +23,9 @@ |
||
23 | 23 | $skinversion['css'] = 'css/superfish.css'; |
24 | 24 | |
25 | 25 | $skinversion['js'] = array('../../js/jquery-1.3.2.min.js', |
26 | - '../../js/hoverIntent.js', |
|
27 | - '../../js/superfish.js' |
|
28 | - ); |
|
26 | + '../../js/hoverIntent.js', |
|
27 | + '../../js/superfish.js' |
|
28 | + ); |
|
29 | 29 | |
30 | 30 | $header = "\n" . '<script type="text/javascript">'; |
31 | 31 | $header .= "\n" . ' var $sf = jQuery.noConflict()'; |
@@ -27,15 +27,15 @@ |
||
27 | 27 | '../../js/superfish.js' |
28 | 28 | ); |
29 | 29 | |
30 | -$header = "\n" . '<script type="text/javascript">'; |
|
31 | -$header .= "\n" . ' var $sf = jQuery.noConflict()'; |
|
32 | -$header .= "\n" . ' $sf(function(){'; |
|
33 | -$header .= "\n" . ' $sf(\'ul.sf-menu\').superfish({'; |
|
34 | -$header .= "\n" . ' delay: 1000,'; |
|
35 | -$header .= "\n" . ' animation: {opacity:\'show\',height:\'show\'},'; |
|
36 | -$header .= "\n" . ' speed: \'fast\''; |
|
37 | -$header .= "\n" . ' });'; |
|
38 | -$header .= "\n" . ' });'; |
|
39 | -$header .= "\n" . '</script>'; |
|
30 | +$header = "\n".'<script type="text/javascript">'; |
|
31 | +$header .= "\n".' var $sf = jQuery.noConflict()'; |
|
32 | +$header .= "\n".' $sf(function(){'; |
|
33 | +$header .= "\n".' $sf(\'ul.sf-menu\').superfish({'; |
|
34 | +$header .= "\n".' delay: 1000,'; |
|
35 | +$header .= "\n".' animation: {opacity:\'show\',height:\'show\'},'; |
|
36 | +$header .= "\n".' speed: \'fast\''; |
|
37 | +$header .= "\n".' });'; |
|
38 | +$header .= "\n".' });'; |
|
39 | +$header .= "\n".'</script>'; |
|
40 | 40 | |
41 | 41 | $skinversion['header'] = $header; |