/** * * init globals */ public static function init() { $urlRoot = JURI::root(); if (JURI::getInstance()->isSSL() == true) { $urlRoot = str_replace("http://", "https://", $urlRoot); } //set global vars self::$urlBase = $urlRoot; self::$urlAssets = $urlRoot . "administrator/components/" . self::COMPONENT_NAME . "/assets/"; self::$urlAssetsMedia = $urlRoot . "media/" . self::COMPONENT_NAME . "/assets/"; self::$urlAssetsArrows = self::$urlAssets . "arrows/"; self::$urlAssetsBullets = self::$urlAssets . "bullets/"; self::$urlDefaultSlideImage = self::$urlAssetsMedia . "images/slide_image.jpg"; self::$pathComponent = JPATH_ADMINISTRATOR . "/components/" . self::COMPONENT_NAME . "/"; self::$pathAssets = self::$pathComponent . "assets/"; self::$pathAssetsMedia = JPATH_ROOT . "/media/" . self::COMPONENT_NAME . "/assets/"; self::$pathAssetsArrows = self::$pathAssets . "arrows/"; self::$pathAssetsBullets = self::$pathAssets . "bullets/"; self::$pathViews = self::$pathComponent . "views/"; self::$pathItemPlugin = self::$pathAssetsMedia . "rs-plugin/"; self::$urlItemPlugin = self::$urlAssetsMedia . "rs-plugin/"; self::$pathCaptionsCss = self::$pathItemPlugin . "css/captions.css"; self::$urlCaptionsCss = self::$urlItemPlugin . "css/captions.css"; self::$pathCaptionsCssOriginal = self::$pathItemPlugin . "css/captions-original.css"; self::$urlCaptionsCssOriginal = self::$urlItemPlugin . "css/captions-original.css"; }
/** * * include all the files needed */ protected function requireFramework() { $currentDir = dirname(__FILE__); $pathBase = $currentDir . "/../../"; $pathBase = realpath($pathBase) . "/"; $pathHelpers = $pathBase . "helpers/"; require_once $pathHelpers . "helper.class.php"; require_once $pathHelpers . "globals.class.php"; require_once $pathBase . "/unitejoomla/includes.php"; GlobalsUniteRev::init(); }
<?php /** * @package Unite Revolution Slider for Joomla 1.7-2.5 * @version 1.0.0 * @author UniteCMS.net * @copyright (C) 2012- Unite CMS * @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html **/ // no direct access defined('_JEXEC') or die('Restricted access'); $currentDir = dirname(__FILE__) . "/"; require_once $currentDir . "helpers/globals.class.php"; require_once $currentDir . "helpers/helper.class.php"; require_once $currentDir . "helpers/helper_operations.class.php"; require_once $currentDir . "helpers/output.class.php"; require_once $currentDir . "helpers/actions.class.php"; require_once $currentDir . "unitejoomla/includes.php"; $currentDir = dirname(__FILE__) . "/"; if ($isJoomla3) { require_once $currentDir . "models/slider_joomla3.php"; require_once $currentDir . "models/item_joomla3.php"; } else { //joomla 2.5 require_once $currentDir . "models/slider_joomla2.php"; require_once $currentDir . "models/item_joomla2.php"; } //init the globals GlobalsUniteRev::init(); GlobalsUniteRev::$version = "2.2.8"; UniteFunctionJoomlaRev::$componentName = GlobalsUniteRev::COMPONENT_NAME;