Ejemplo n.º 1
0
 public static function getList(&$params)
 {
     $list = parent::getList($params);
     // array with submenu wrapper widths
     if (!isset(self::$subwidth[$params->get('menu')])) {
         self::$subwidth[$params->get('menu')] = array();
         $first = false;
         $parent = null;
         $hasSubtitles = false;
         $startLevel = $params->get('startLevel');
         foreach ($list as $item) {
             if ($parent || $item->params->get('djmegamenu-column_break', 0)) {
                 if ($parent) {
                     $parent->params->def('djmegamenu-first_column_width', $item->params->get('djmegamenu-column_width', $params->get('column_width')));
                     $parent = null;
                 }
                 // calculate width of the sum
                 if (!isset(self::$subwidth[$params->get('menu')][$item->parent_id])) {
                     self::$subwidth[$params->get('menu')][$item->parent_id] = 0;
                 }
                 self::$subwidth[$params->get('menu')][$item->parent_id] += $item->params->get('djmegamenu-column_width', $params->get('column_width'));
                 // count number of columns for this submenu
                 if (!isset(self::$subcols[$params->get('menu')][$item->parent_id])) {
                     self::$subcols[$params->get('menu')][$item->parent_id] = 1;
                 } else {
                     self::$subcols[$params->get('menu')][$item->parent_id]++;
                 }
             }
             if ($item->deeper) {
                 $first = true;
                 $parent = $item;
             }
             // load module if position set
             if ($position = $item->params->get('djmegamenu-module_pos')) {
                 $item->modules = self::loadModules($position, $item->params->get('djmegamenu-module_style', 'xhtml'));
             }
             $subtitle = htmlspecialchars($item->params->get('djmegamenu-subtitle'));
             if (empty($subtitle) && $params->get('usenote')) {
                 $subtitle = htmlspecialchars($item->note);
             }
             if ($item->menu_image && !$item->params->get('menu_text', 1)) {
                 $subtitle = null;
             }
             $item->params->set('djmegamenu-subtitle', $subtitle);
             if ($item->level == $startLevel && !empty($subtitle)) {
                 $hasSubtitles = true;
             }
             if ($item->parent) {
                 self::$expand[$params->get('menu')][$item->id] = $item->params->get('djmegamenu-expand', $params->get('expand', 'dropdown'));
             }
         }
         $params->def('hasSubtitles', $hasSubtitles);
     }
     return $list;
 }
Ejemplo n.º 2
0
<?php

/**
 * @package		Joomla.Site
 * @subpackage	mod_menu
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */
// no direct access
defined('_JEXEC') or die;
// Include the syndicate functions only once
require_once dirname(__FILE__) . '/helper.php';
$list = modMenuHelper::getList($params);
$app = JFactory::getApplication();
$menu = $app->getMenu();
$active = $menu->getActive();
$active_id = isset($active) ? $active->id : $menu->getDefault()->id;
$path = isset($active) ? $active->tree : array();
$showAll = $params->get('showAllChildren');
$class_sfx = htmlspecialchars($params->get('class_sfx'));
if (count($list)) {
    require JModuleHelper::getLayoutPath('mod_menu', $params->get('layout', 'default'));
}
Ejemplo n.º 3
0
<?php

/**
 * @package     Square One
 * @link        www.squareonecms.org
 * @copyright   Copyright 2011 Square One and Open Source Matters. All Rights Reserved.
 */
// no direct access
defined('_JEXEC') or die;
// Include the syndicate functions only once
require_once dirname(__FILE__) . '/helper.php';
$disabled = JRequest::getInt('hidemainmenu') ? true : false;
$list = modMenuHelper::getList($disabled);
$menu = JMenu::getInstance('administrator');
$active = $menu->getActive();
$active_id = isset($active) ? $active->id : $menu->getDefault()->id;
if (count($list)) {
    require JModuleHelper::getLayoutPath('mod_menu', 'default');
}
Ejemplo n.º 4
0
 public static function renderMenu($params)
 {
     include_once JPATH_SITE . '/modules/mod_menu/helper.php';
     $app = JFactory::getApplication();
     $menu = $app->getMenu();
     $list = modMenuHelper::getList($params);
     $active = $menu->getActive();
     //$active		= modMenuHelper::getActive($params);
     //$active_id 	= $active->id;
     //$path		= $active->tree;
     $active_id = isset($active) ? $active->id : $menu->getDefault()->id;
     $path = isset($active) ? $active->tree : array();
     $animation = $params->get('animation');
     $delay = $params->get('delay');
     $speed = $params->get('speed');
     $mobilemenu = (bool) $params->get('mobilemenu', 1);
     $isresponsive = (bool) $params->get('responsive', 1);
     $autoarrows = 'true';
     if (count($list)) {
         require dirname(__FILE__) . '/lib/menu.php';
     }
 }
Ejemplo n.º 5
0
$twofactorauth = false;
$tfa = JPluginHelper::getPlugin('twofactorauth');
if (is_array($tfa)) {
    foreach ($tfa as $plg) {
        $plgParams = new JRegistry($plg->params);
        $section = (int) $plgParams->get('section', 0);
        if ($twofactorauth = $section == 1 || $section == 3) {
            break;
        }
    }
}
// init user menu
if (!$guest && ($usermenu = $params->get('usermenu', 0))) {
    require_once JPATH_SITE . '/modules/mod_menu/helper.php';
    $menuparams = new JObject(array('menutype' => $usermenu, 'startLevel' => 0, 'endLevel' => 0, 'showAllChildren' => 1));
    $menulist = modMenuHelper::getList($menuparams);
}
// Load template
include dirname(__FILE__) . "/themes/{$theme}/tmpls/tmpl25.php";
// Init Texts for JS
if (!function_exists('ialText')) {
    function ialText($txt)
    {
        return htmlspecialchars(JText::_($txt), ENT_COMPAT, 'UTF-8');
    }
}
?>
<form name="ialText" style="display:none">
  <input type="hidden" name="COM_USERS_REGISTER_REQUIRED" value="<?php 
echo ialText('COM_USERS_REGISTER_REQUIRED');
?>