29 foreach ($decorators as $decorator) {
41 foreach ($menus as $key =>
$menu) {
43 foreach ($decorators as $decorator) {
44 $decorator->hasAccess(
$menu, $hasAccess);
56 foreach ($menus as $key =>
$menu) {
57 foreach ($decorators as $decorator) {
58 $decorator->decorateMenu(
$menu);
63 foreach ($decorators as $decorator) {
64 $decorator->end($menus);
68 $block = $builder->render();
79 if (isset($skin_info[
'css'])) {
80 $css = array_merge($css, $skin_info[
'css']);
83 if (isset($skin_info[
'js'])) {
84 $js = array_merge($js, $skin_info[
'js']);
87 if (
$helper->getConfig(
'assign_method') ==
'xoopstpl') {
89 foreach ($css as
$file) {
90 $tpl_vars .=
"\n" .
'<link rel="stylesheet" type="text/css" media="all" href="' . $file .
'" />';
93 foreach ($js as $file) {
94 $tpl_vars .=
"\n" .
'<script type="text/javascript" src="' . $file .
'"></script>';
97 if (isset($skin_info[
'header'])) {
98 $tpl_vars .=
"\n" . $skin_info[
'header'];
101 $xoops->tpl()->assign(
'xoops_module_header', $tpl_vars . @
$xoops->tpl()->getTemplateVars(
"xoops_module_header"));
103 foreach ($css as
$file) {
104 $xoops->theme()->addStylesheet($file);
107 foreach ($js as $file) {
108 $xoops->theme()->addScript($file);
111 if (isset($skin_info[
'header'])) {
112 $xoops->tpl()->assign(
'xoops_footer', @
$xoops->tpl()->getTemplateVars(
"xoops_footer") .
"\n" . $skin_info[
'header']);
117 $blockTpl->assign(
'block', $block);
118 $blockTpl->assign(
'config', $skin_info[
'config']);
119 $blockTpl->assign(
'skinurl', $skin_info[
'url']);
120 $blockTpl->assign(
'skinpath', $skin_info[
'path']);
122 $block[
'content'] = $blockTpl->fetch($skin_info[
'template']);
125 $xoops->tpl()->assign(
'xoops_menu_' .
$options[4], $block[
'content']);
135 if (!
$options[4] || (isset($_GET[
'op']) && $_GET[
'op'] ==
'clone')) {
140 $helper->loadLanguage(
'admin');
148 if (count($menus) == 0) {
156 $element->addOptionArray($menus);
158 $form->addElement($element);
161 $temp_skins = XoopsLists::getDirListAsArray(\
XoopsBaseConfig::get(
'root-path') .
"/modules/menus/skins/",
"");
162 $skins_options = array();
163 foreach ($temp_skins as $skin) {
165 $skins_options[$skin] = $skin;
169 $element->addOptionArray($skins_options);
171 $form->addElement($element);
176 $form->addElement($element);
179 $display_options = array(
184 $element->addOptionArray($display_options);
186 $form->addElement($element);
191 $form->addElement($element);
193 return $form->render();
212 $menu->setVar(
'id', 1);
213 $menu->setVar(
'pid', 0);
217 $menu->setVar(
'image',
'icon-home');
218 $menus[] =
$menu->getValues();
223 $menu->setVar(
'id', $i);
224 $menu->setVar(
'pid', 0);
228 $menu->setVar(
'image',
'icon-tags');
229 $menus[] =
$menu->getValues();
230 if (
$xoops->isModule() &&
$xoops->module->getVar(
'dirname') ==
$modules[
$i]->getVar(
'dirname') && $plugin = \Xoops\Module\Plugin::getPlugin(
$modules[$i]->getVar(
'dirname'),
'menus')) {
231 $sublinks = $plugin->subMenus();
233 foreach ($sublinks as $sublink) {
236 $menu->setVar(
'pid', $i);
237 $menu->setVar(
'title', $sublink[
'name']);
238 $menu->setVar(
'alt_title', $sublink[
'name']);
240 $menus[] =
$menu->getValues();
247 $block = $builder->render();
249 $skin_info =
$helper->getSkinInfo(
'mainmenu',
false);
251 $blockTpl->assign(
'block', $block);
252 $blockTpl->assign(
'config', $skin_info[
'config']);
253 $blockTpl->assign(
'skinurl', $skin_info[
'url']);
254 $blockTpl->assign(
'skinpath', $skin_info[
'path']);
256 $block[
'content'] = $blockTpl->fetch($skin_info[
'template']);
const _MB_MENUS_SELECT_MENU_DSC
if(!isset($xoops->paths[$path_type])) if($path_type== 'var') $file
const _MB_MENUS_DISPLAY_METHOD_BLOCK
const _MB_MENUS_DISPLAY_METHOD_TEMPLATE
const _MB_MENUS_UNIQUEID_DSC
const _MB_MENUS_SELECT_SKIN_DSC
const _MB_MENUS_DISPLAY_METHOD_DSC
const _MB_MENUS_USE_THEME_SKIN_DSC
const _MB_MENUS_SELECT_SKIN
const _MB_MENUS_DISPLAY_METHOD
const _MB_MENUS_SELECT_MENU
const _MB_MENUS_USE_THEME_SKIN