public function render_item($match){
		$return = '';
		ob_start();
		$chronoconnectivity5_setup = function() use($match){
			$mainframe = \JFactory::getApplication();
			parse_str($match, $params);
			foreach($params as $pk => $pv){
				\GCore\Libs\Request::set($pk, $pv);
			}
			$params_keys = array_keys($params);
			$ccname = $params_keys[0];
			$connection = GCore\Libs\Request::data('ccname', '');
			$act = GCore\Libs\Request::data('act', '');
			if(!empty($act)){
				if($ccname != $connection){
					$act = '';
				}
			}
			return array('ccname' => $ccname);
		};

		$output = new JoomlaGCLoader('front', 'chronoconnectivity5', 'chronoconnectivity', $chronoconnectivity5_setup, array('controller' => 'lists', 'action' => ''));
		$return = ob_get_clean();
		return $return;
	}
Example #2
0
/**
* COMPONENT FILE HEADER
**/
/* @copyright:ChronoEngine.com @license:GPLv2 */
defined('_JEXEC') or die('Restricted access');
defined("GCORE_SITE") or define("GCORE_SITE", "front");
jimport('cegcore.joomla_gcloader');
if (!class_exists('JoomlaGCLoader')) {
    JError::raiseWarning(100, "Please download the CEGCore framework from www.chronoengine.com then install it using the 'Extensions Manager'");
    return;
}
$chronoforms5_setup = function () {
    $mainframe = \JFactory::getApplication();
    $chronoform = GCore\Libs\Request::data('chronoform', '');
    $event = GCore\Libs\Request::data('event', '');
    $params = $mainframe->getPageParameters('com_chronoforms5');
    $formname = $params->get('chronoform', '');
    if (!empty($formname)) {
        if (!empty($event)) {
            if ($formname == $chronoform) {
                return array('chronoform' => $params->get('chronoform'), 'event' => $event);
            }
        }
        return array('chronoform' => $params->get('chronoform'), 'event' => $params->get('event') ? $params->get('event') : 'load');
    }
    /*if(empty($chronoform)){
    		$params = $mainframe->getPageParameters('com_chronoforms5');
    		GCore\Libs\Request::set('chronoform', $params->get('chronoform'));
    		if(empty($event)){
    			GCore\Libs\Request::set('event', $params->get('event'));
<?php
/**
* COMPONENT FILE HEADER
**/
/* @copyright:ChronoEngine.com @license:GPLv2 */defined('_JEXEC') or die('Restricted access');
defined("GCORE_SITE") or define("GCORE_SITE", "front");
jimport('cegcore.joomla_gcloader');
if(!class_exists('JoomlaGCLoader')){
	JError::raiseWarning(100, "Please download the CEGCore framework from www.chronoengine.com then install it using the 'Extensions Manager'");
	return;
}

$chronoconnectivity5_setup = function(){
	$mainframe = \JFactory::getApplication();
	$ccname = GCore\Libs\Request::data('ccname', '');
	$params = $mainframe->getPageParameters('com_chronoconnectivity5');
	$connection = $params->get('ccname', '');
	$controller = GCore\Libs\Request::data('cont', 'lists');
	
	if(!empty($connection)){
		return array('ccname' => $params->get('ccname'), 'controller' => $controller);
	}else{
		return array('controller' => $controller);
	}
};

$output = new JoomlaGCLoader('front', 'chronoconnectivity5', 'chronoconnectivity', $chronoconnectivity5_setup);