Exemple #1
0
// include JomSocial files
if (!JFile::exists(JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'defines.community.php')) {
    $mainframe = JFactory::getApplication();
    $option = JRequest::getVar('option', '', 'GET');
    if ($option == 'com_xipt') {
        $mainframe->redirect("index.php", XiptText::_("PLEASE_INSTALL_JOMSOCIAL"));
    }
    return false;
}
// auto load community classes
XiptLoader::addAutoLoadFile('CFactory', JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php');
XiptLoader::addAutoLoadFile('CAssets', JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php');
XiptLoader::addAutoLoadFile('CConfig', JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php');
XiptLoader::addAutoLoadFile('CApplications', JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php');
XiptLoader::addAutoLoadFile('CUser', JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php');
XiptLoader::addAutoLoadFile('CRoute', JPATH_ROOT . DS . 'components' . DS . 'com_community' . DS . 'libraries' . DS . 'core.php');
// Aotoloading for Jom social 2.0 [ Zend Plugin ]
$paths = explode(PATH_SEPARATOR, get_include_path());
if (!in_array(JPATH_ROOT . DS . 'plugins' . DS . 'system', $paths)) {
    set_include_path('.' . PATH_SEPARATOR . JPATH_ROOT . DS . 'plugins' . DS . 'system' . PATH_SEPARATOR . get_include_path());
}
if (JFile::exists(JPATH_ROOT . DS . 'plugins' . DS . 'system' . DS . 'Zend/Loader/Autoloader.php')) {
    //check if zend plugin is enalble.
    $zend = JPluginHelper::getPlugin('system', 'zend');
    if (!empty($zend) && !class_exists('Zend_Loader')) {
        // Only include the zend loader if it has not been loaded first
        include_once JPATH_ROOT . DS . 'plugins' . DS . 'system' . DS . 'Zend/Loader/Autoloader.php';
        // register auto-loader
        $loader = Zend_Loader_Autoloader::getInstance();
    }
}
Exemple #2
0
<?php

/**
* @Copyright Ready Bytes Software Labs Pvt. Ltd. (C) 2010- author-Team Joomlaxi
* @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
**/
// no direct access
if (!defined('_JEXEC')) {
    die('Restricted access');
}
if (defined('DEFINE_ADMIN_INCLUDES')) {
    return;
}
define('DEFINE_ADMIN_INCLUDES', 'DEFINE_ADMIN_INCLUDES');
//	This is file for BACKEND only, should be included in starting file only.
jimport('joomla.filesystem.file');
jimport('joomla.filesystem.folder');
require_once JPATH_ROOT . DS . 'components' . DS . 'com_xipt' . DS . 'includes.php';
XiptLoader::addAutoLoadViews(XIPT_ADMIN_PATH_VIEWS, JRequest::getCmd('format', 'html'), 'Xipt');
XiptLoader::addAutoLoadFolder(XIPT_ADMIN_PATH_CONTROLLERS, 'Controller', 'Xipt');
// include JomSocial files
if (!JFolder::exists(JPATH_ROOT . DS . 'components' . DS . 'com_community')) {
    $option = JRequest::getVar('option', '');
    if ($option == 'com_xipt') {
        JFactory::getApplication()->redirect("index.php", XiptText::_("PLEASE_INSTALL_JOMSOCIAL"));
    }
    return false;
}