| Current Path : /home/w/u/e/wuectly/www/03cbe/ |
| Current File : /home/w/u/e/wuectly/www/03cbe/mod_menu.tar |
helper.php 0000604 00000003037 15245530250 0006534 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage mod_menu
*
* @copyright (C) 2007 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Helper for mod_menu
*
* @since 1.5
*/
abstract class ModMenuHelper
{
/**
* Get a list of the available menus.
*
* @return array An array of the available menus (from the menu types table).
*
* @since 1.6
*
* @deprecated 4.0
*/
public static function getMenus()
{
$db = JFactory::getDbo();
// Search for home menu and language if exists
$subQuery = $db->getQuery(true)
->select('b.menutype, b.home, b.language, l.image, l.sef, l.title_native')
->from('#__menu AS b')
->leftJoin('#__languages AS l ON l.lang_code = b.language')
->where('b.home != 0')
->where('(b.client_id = 0 OR b.client_id IS NULL)');
// Get all menu types with optional home menu and language
$query = $db->getQuery(true)
->select('a.id, a.asset_id, a.menutype, a.title, a.description, a.client_id')
->select('c.home, c.language, c.image, c.sef, c.title_native')
->from('#__menu_types AS a')
->leftJoin('(' . (string) $subQuery . ') c ON c.menutype = a.menutype')
->order('a.id');
$db->setQuery($query);
try
{
$result = $db->loadObjectList();
}
catch (RuntimeException $e)
{
$result = array();
JFactory::getApplication()->enqueueMessage(JText::sprintf('JERROR_LOADING_MENUS', $e->getMessage()), 'error');
}
return $result;
}
}
mod_menu.php 0000604 00000001632 15245530250 0007057 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage mod_menu
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\Registry\Registry;
// Include the module helper classes.
JLoader::register('MenusHelper', JPATH_ADMINISTRATOR . '/components/com_menus/helpers/menus.php');
JLoader::register('ModMenuHelper', __DIR__ . '/helper.php');
JLoader::register('JAdminCssMenu', __DIR__ . '/menu.php');
/** @var Registry $params */
$lang = JFactory::getLanguage();
$user = JFactory::getUser();
$input = JFactory::getApplication()->input;
$enabled = !$input->getBool('hidemainmenu');
$menu = new JAdminCssMenu($user);
$menu->load($params, $enabled);
// Render the module layout
require JModuleHelper::getLayoutPath('mod_menu', $params->get('layout', 'default'));
mod_menu.xml 0000604 00000006143 15245530250 0007072 0 ustar 00 <?xml version="1.0" encoding="utf-8"?>
<extension type="module" version="3.1" client="administrator" method="upgrade">
<name>mod_menu</name>
<author>Joomla! Project</author>
<creationDate>March 2006</creationDate>
<copyright>(C) 2006 Open Source Matters, Inc.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>3.0.0</version>
<description>MOD_MENU_XML_DESCRIPTION</description>
<files>
<filename module="mod_menu">mod_menu.php</filename>
<folder>preset</folder>
<folder>tmpl</folder>
<filename>helper.php</filename>
<filename>menu.php</filename>
</files>
<languages>
<language tag="en-GB">en-GB.mod_menu.ini</language>
<language tag="en-GB">en-GB.mod_menu.sys.ini</language>
</languages>
<help key="JHELP_EXTENSIONS_MODULE_MANAGER_ADMIN_MENU" />
<config>
<fields name="params">
<fieldset name="basic">
<field
name="menutype"
type="menu"
label="MOD_MENU_FIELD_MENUTYPE_LABEL"
description="MOD_MENU_FIELD_MENUTYPE_DESC"
clientid="1"
>
<option value="*">MOD_MENU_FIELD_MENUTYPE_OPTION_PREDEFINED</option>
</field>
<field
name="preset"
type="menuPreset"
label="MOD_MENU_FIELD_PRESET_LABEL"
description="MOD_MENU_FIELD_PRESET_DESC"
addfieldpath="administrator/components/com_menus/models/fields"
showon="menutype:*"
/>
<field
name="check"
type="radio"
label="MOD_MENU_FIELD_CHECK_LABEL"
description="MOD_MENU_FIELD_CHECK_DESC"
class="btn-group btn-group-yesno"
default="1"
filter="integer"
showon="menutype!:*"
>
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>
<field
name="shownew"
type="radio"
label="MOD_MENU_FIELD_SHOWNEW"
description="MOD_MENU_FIELD_SHOWNEW_DESC"
class="btn-group btn-group-yesno"
default="1"
filter="integer"
showon="menutype:*"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="showhelp"
type="radio"
label="MOD_MENU_FIELD_SHOWHELP"
description="MOD_MENU_FIELD_SHOWHELP_DESC"
class="btn-group btn-group-yesno"
default="1"
filter="integer"
showon="menutype:*"
>
<option value="0">JHIDE</option>
<option value="1">JSHOW</option>
</field>
<field
name="forum_url"
type="url"
label="MOD_MENU_FIELD_FORUMURL_LABEL"
description="MOD_MENU_FIELD_FORUMURL_DESC"
filter="url"
size="30"
default=""
showon="menutype:*"
validate="url"
/>
</fieldset>
<fieldset name="advanced">
<field
name="layout"
type="modulelayout"
label="JFIELD_ALT_LAYOUT_LABEL"
description="JFIELD_ALT_MODULE_LAYOUT_DESC"
validate="moduleLayout"
/>
<field
name="moduleclass_sfx"
type="textarea"
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC"
rows="3"
/>
</fieldset>
</fields>
</config>
</extension>
tmpl/default_component.php 0000604 00000002504 15245530250 0011735 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage mod_menu
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$attributes = array();
if ($item->anchor_title)
{
$attributes['title'] = $item->anchor_title;
}
if ($item->anchor_css)
{
$attributes['class'] = $item->anchor_css;
}
if ($item->anchor_rel)
{
$attributes['rel'] = $item->anchor_rel;
}
$linktype = $item->title;
if ($item->menu_image)
{
if ($item->menu_image_css)
{
$image_attributes['class'] = $item->menu_image_css;
$linktype = JHtml::_('image', $item->menu_image, $item->title, $image_attributes);
}
else
{
$linktype = JHtml::_('image', $item->menu_image, $item->title);
}
if ($item->params->get('menu_text', 1))
{
$linktype .= '<span class="image-title">' . $item->title . '</span>';
}
}
if ($item->browserNav == 1)
{
$attributes['target'] = '_blank';
}
elseif ($item->browserNav == 2)
{
$options = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes';
$attributes['onclick'] = "window.open(this.href, 'targetWindow', '" . $options . "'); return false;";
}
echo JHtml::_('link', JFilterOutput::ampReplace(htmlspecialchars($item->flink, ENT_COMPAT, 'UTF-8', false)), $linktype, $attributes);
tmpl/default_separator.php 0000604 00000001615 15245530250 0011735 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage mod_menu
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$title = $item->anchor_title ? ' title="' . $item->anchor_title . '"' : '';
$anchor_css = $item->anchor_css ?: '';
$linktype = $item->title;
if ($item->menu_image)
{
if ($item->menu_image_css)
{
$image_attributes['class'] = $item->menu_image_css;
$linktype = JHtml::_('image', $item->menu_image, $item->title, $image_attributes);
}
else
{
$linktype = JHtml::_('image', $item->menu_image, $item->title);
}
if ($item->params->get('menu_text', 1))
{
$linktype .= '<span class="image-title">' . $item->title . '</span>';
}
}
?>
<span class="separator <?php echo $anchor_css; ?>"<?php echo $title; ?>><?php echo $linktype; ?></span>
tmpl/default_heading.php 0000604 00000001616 15245530250 0011335 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage mod_menu
*
* @copyright (C) 2012 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$title = $item->anchor_title ? ' title="' . $item->anchor_title . '"' : '';
$anchor_css = $item->anchor_css ?: '';
$linktype = $item->title;
if ($item->menu_image)
{
if ($item->menu_image_css)
{
$image_attributes['class'] = $item->menu_image_css;
$linktype = JHtml::_('image', $item->menu_image, $item->title, $image_attributes);
}
else
{
$linktype = JHtml::_('image', $item->menu_image, $item->title);
}
if ($item->params->get('menu_text', 1))
{
$linktype .= '<span class="image-title">' . $item->title . '</span>';
}
}
?>
<span class="nav-header <?php echo $anchor_css; ?>"<?php echo $title; ?>><?php echo $linktype; ?></span>
tmpl/default_url.php 0000604 00000002742 15245530250 0010541 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage mod_menu
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$attributes = array();
if ($item->anchor_title)
{
$attributes['title'] = $item->anchor_title;
}
if ($item->anchor_css)
{
$attributes['class'] = $item->anchor_css;
}
if ($item->anchor_rel)
{
$attributes['rel'] = $item->anchor_rel;
}
$linktype = $item->title;
if ($item->menu_image)
{
if ($item->menu_image_css)
{
$image_attributes['class'] = $item->menu_image_css;
$linktype = JHtml::_('image', $item->menu_image, $item->title, $image_attributes);
}
else
{
$linktype = JHtml::_('image', $item->menu_image, $item->title);
}
if ($item->params->get('menu_text', 1))
{
$linktype .= '<span class="image-title">' . $item->title . '</span>';
}
}
if ($item->browserNav == 1)
{
$attributes['target'] = '_blank';
$attributes['rel'] = 'noopener noreferrer';
if ($item->anchor_rel == 'nofollow')
{
$attributes['rel'] .= ' nofollow';
}
}
elseif ($item->browserNav == 2)
{
$options = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,' . $params->get('window_open');
$attributes['onclick'] = "window.open(this.href, 'targetWindow', '" . $options . "'); return false;";
}
echo JHtml::_('link', JFilterOutput::ampReplace(htmlspecialchars($item->flink, ENT_COMPAT, 'UTF-8', false)), $linktype, $attributes);
tmpl/default.php 0000604 00000001773 15245530250 0007662 0 ustar 00 <?php
/**
* @package Joomla.Administrator
* @subpackage mod_menu
*
* @copyright (C) 2009 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
$doc = JFactory::getDocument();
$direction = $doc->direction == 'rtl' ? 'pull-right' : '';
$class = $enabled ? 'nav ' . $direction : 'nav disabled ' . $direction;
// Recurse through children of root node if they exist
$menuTree = $menu->getTree();
$root = $menuTree->reset();
if ($root->hasChildren())
{
echo '<ul id="menu" class="' . $class . '">' . "\n";
// WARNING: Do not use direct 'include' or 'require' as it is important to isolate the scope for each call
$menu->renderSubmenu(JModuleHelper::getLayoutPath('mod_menu', 'default_submenu'));
echo "</ul>\n";
echo '<ul id="nav-empty" class="dropdown-menu nav-empty hidden-phone"></ul>';
if ($css = $menuTree->getCss())
{
$doc->addStyleDeclaration(implode("\n", $css));
}
}
index.html 0000604 00000000037 15245606654 0006552 0 ustar 00 <!DOCTYPE html><title></title>
default_heading.php 0000604 00000000510 15245606654 0010365 0 ustar 00 <?php
/**
* @package Joomla.Site
* @subpackage mod_menu
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
?>
<span class="nav-header"><?php echo $item->title; ?></span>