Server IP : 180.180.241.3 / Your IP : 216.73.216.252 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /AppServ/www/news/tmp/install_5333cea8259e5/admin/views/sitemap/tmpl/ |
Upload File : |
<?php /** * @version $Id$ * @copyright Copyright (C) 2007 - 2009 Joomla! Vargas. All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE.txt * @author Guillermo Vargas (guille@vargas.co.cr) */ // No direct access defined('_JEXEC') or die; require_once(JPATH_COMPONENT_SITE.'/displayer.php'); class XmapNavigatorDisplayer extends XmapDisplayer { function __construct(&$config, &$sitemap) { $this->_list=array(); $this->view='navigator'; parent::__construct( $config, $sitemap); } function printNode( &$node ) { if (!isset($node->selectable )) { $node->selectable=true; } // For extentions that doesn't set this property as this is new in Xmap 1.2.3 if (!isset($node->expandible )) { $node->expandible = true; } if ( empty($this->_list[$node->uid]) ) { // Avoid duplicated items $this->_list[$node->uid] = $node; } return false; } function &expandLink(&$parent) { $items = &JSite::getMenu(); $extensions = &$this->_extensions; $rows = null; if (strpos($parent->link,'-menu-') === 0 ) { $menutype = str_replace('-menu-','',$parent->link); // Get Menu Items $rows = $items->getItems('menutype', $menutype); } elseif ($parent->id) { $rows = $items->getItems('parent_id', $parent->id); } if ( $rows ) { foreach ($rows as $item) { if ($item->parent_id == $parent->id) { $node = new stdclass; $node->name = $item->title; $node->id = $item->id; $node->uid = 'itemid'.$item->id; $node->link = $item->link; $node->expandible = true; $node->selectable=true; // Prepare the node link XmapHelper::prepareMenuItem($node); if ( $item->home ) { $node->link = JURI::root(); } elseif (substr($item->link,0,9) == 'index.php' && $item->type != 'url' ) { if ($item->type == 'menulink') {// For Joomla 1.5 SEF compatibility $params = new JParameter($item->params); $node->link = 'index.php?Itemid=' . $params->get('menu_item'); } elseif ( strpos($item->link,'Itemid=') === FALSE ){ $node->link = 'index.php?Itemid=' . $node->id; } } elseif ($item->type == 'separator') { $node->selectable=false; } $this->printNode($node); // Add to the internal list } } } if ($parent->id) { $option = null; if ( preg_match('#^/?index.php.*option=(com_[^&]+)#',$parent->link,$matches) ) { $option = $matches[1]; } $Itemid = JRequest::getInt('Itemid'); if (!$option && $Itemid) { $item = $items->getItem($Itemid); $link_query = parse_url( $item->link ); parse_str( html_entity_decode($link_query['query']), $link_vars); $option = JArrayHelper::getValue($link_vars,'option',''); if ( $option ) { $parent->link = $item->link; } } if ( $option ) { if ( !empty($extensions[$option]) ) { $parent->uid = $option; $className = 'xmap_'.$option; $result = call_user_func_array(array($className, 'getTree'),array(&$this,&$parent,$extensions[$option]->params)); } } } return $this->_list;; } function &getParam($arr, $name, $def) { $var = JArrayHelper::getValue( $arr, $name, $def, '' ); return $var; } }