Esempio n. 1
0
 function display($tpl = null)
 {
     $option = JRequest::getCMD('option');
     $mainframe = JFactory::getApplication();
     $app =& JFactory::getApplication();
     $helper = new comZonalesHelper();
     // url de retorno según sección del menu actual
     $menu =& JSite::getMenu();
     $item = $menu->getActive();
     $return = $item ? $item->link . '&Itemid=' . $item->id : 'index.php';
     // si debe retornarse una respuesta mediante ajax
     $this->ajax = JRequest::getBool('ajax');
     $this->task = JRequest::getBool('ajax') ? 'setZonalAjax' : 'setZonal';
     $zName = $helper->getZonal();
     $this->zonal = is_object($zName) ? $zName->name : $zName;
     // parametros - alto y ancho
     $zonalesParams =& JFactory::getApplication('site')->getParams('com_zonales');
     $this->width = $zonalesParams->get('width_mapa_flash', '');
     $this->height = $zonalesParams->get('height_mapa_flash', '');
     $this->flashfile = $zonalesParams->get('flash_file', '');
     $this->assignRef('j2f', $helper->getZif2SifMap());
     $this->assignRef('template', $app->getTemplate());
     $this->assignRef('return', $return);
     parent::display($tpl);
 }
<?php

// no direct access
defined('_JEXEC') or die('Restricted access');
require_once JPATH_BASE . DS . 'components' . DS . 'com_zonales' . DS . 'helper.php';
// parametros
$height = $params->get('height');
$width = $params->get('width');
$wmode = $params->get('wmode', false);
// template
$app =& JFactory::getApplication();
$template = $app->getTemplate();
$helper = new comZonalesHelper();
$j2f = $helper->getZif2SifMap();
require JModuleHelper::getLayoutPath('mod_mapainicio');