Your IP : 216.73.216.240


Current Path : /home/juvelize/www/components/com_ffgate/
Upload File :
Current File : /home/juvelize/www/components/com_ffgate/ffgate.php

<?php
/**
 * @package    FFGate
 * @author     Yves Hoppe <yves@compojoom.com>
 * @date       26.11.13
 *
 * @copyright  Copyright (C) 2008 - 2013 compojoom.com - Yves Hoppe. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE
 * @since      1.0.0
 */

defined('_JEXEC') or die('Restricted access');

if (!defined('DS'))
{
	define('DS', DIRECTORY_SEPARATOR);
}

require_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/defines.php';

JLoader::register('FFGateHelperSettings', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/settings.php');
JLoader::register('FFGateHelperBasic', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/basic.php');

// Loading Facebook API
require_once JPATH_COMPONENT_ADMINISTRATOR . '/include/fbsdk/src/facebook.php';

// Thank you for this black magic Nickolas :)
// Magic: merge the eventlist translation with the current translation
$jlang = JFactory::getLanguage();
$jlang->load('com_ffgate', JPATH_ADMINISTRATOR, 'en-GB', true);
$jlang->load('com_ffgate', JPATH_ADMINISTRATOR, $jlang->getDefault(), true);
$jlang->load('com_ffgate', JPATH_ADMINISTRATOR, null, true);
$jlang->load('com_ffgate', JPATH_SITE, 'en-GB', true);
$jlang->load('com_ffgate', JPATH_SITE, $jlang->getDefault(), true);
$jlang->load('com_ffgate', JPATH_SITE, null, true);

$input = JFactory::getApplication()->input;

JTable::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_ffgate/tables');

// Get the view and controller from the request, or set to eventlist if they weren't set
$input->set('controller', $input->get('view', 'site')); // Black magic: Get controller based on the selected view

// Require specific controller if requested
if ($controller = $input->get('controller'))
{
	$path = JPATH_COMPONENT . '/controllers/' . $controller . '.php';

	if (file_exists($path))
	{
		require_once $path;
	}
	else
	{
		$controller = '';
	}
}

if ($controller == '')
{
	require_once JPATH_COMPONENT . '/controllers/site.php';
	$controller = 'site';
}

// Create the controller
$classname = 'FFGateController' . $controller;
$controller = new $classname;
$controller->execute($input->get('task'));
$controller->redirect();