/** * Get input * @return null|string */ public function getInput() { JBZoo::init(); $zoo = App::getInstance('zoo'); $zoo->system->language->load('com_jbzoo', $zoo->path->path('applications:jbuniversal'), null, true); $zoo->system->language->load('com_jbzoostd', $zoo->path->path('applications:jbuniversal'), null, true); $zoo->jbassets->admin(); return null; }
/** * Register controller path, only for frontend */ private function _init() { JBZoo::init(); if ($this->app->jbenv->isSite()) { $this->app->jbassets->setAppCSS($this->alias); $this->app->jbassets->setAppJS($this->alias); } else { $this->checkUpdates(); } }
/** * @param \Joomla\Registry\Registry $params $params * @param stdClass $module */ public function __construct($params, $module) { JBZoo::init(); $this->app = App::getInstance('zoo'); // vars $this->_params = $params; $this->_module = $module; $this->_moduleType = $this->_module->module; $this->_itemLayout = $this->_params->get('item_layout', 'default'); $this->_moduleLayout = $this->_params->get('layout', 'default'); // helpers $this->_jbhtml = $this->app->jbhtml; $this->_jbrequest = $this->app->jbrequest; $this->_jbassets = $this->app->jbassets; $this->app->jbdebug->mark($this->_module->module . '::init'); }
/** * Init Zoo && JBZoo Framework * @return bool|null */ protected function _initFramework() { if (!isset($_SERVER['REQUEST_TIME_FLOAT'])) { // hack for performance test $_SERVER['REQUEST_TIME_FLOAT'] = microtime(true); } if (!$this->_getExtCompatibility()) { return false; } $compEnabled = JComponentHelper::getComponent('com_zoo', true)->enabled; if (!$compEnabled) { return null; } $mainConfig = JPATH_ADMINISTRATOR . '/components/com_zoo/config.php'; if (!JFile::exists($mainConfig)) { return null; } require_once $mainConfig; if (!class_exists('App')) { return null; } $zoo = App::getInstance('zoo'); $zoo->event->dispatcher->connect('zoo:initApp', array('plgSystemJBZoo', 'initApp')); // hack for replace inited application if ($id = $zoo->request->getInt('changeapp')) { $zoo->system->application->setUserState('com_zooapplication', $id); } $jbzooBootstrap = JPATH_ROOT . '/media/zoo/applications/' . JBZOO_APP_GROUP . '/framework/jbzoo.php'; if (JFile::exists($jbzooBootstrap)) { require_once $jbzooBootstrap; JBZoo::init(); $this->_jbzooSystemPlg = JBZooSystemPlugin::getInstance(); if ($zoo->jbrequest->isAjax() || $zoo->jbrequest->is('task', 'emailPreview')) { header('Content-Type:text/html; charset=utf-8', true); // fix apache default charset } return true; } }
/** * Event onAfterInitialise Joomla * @return mixed */ public function onAfterInitialise() { $componentEnabled = JComponentHelper::getComponent('com_zoo', true)->enabled; if (!$componentEnabled) { return; } $mainConfig = JPATH_ADMINISTRATOR . '/components/com_zoo/config.php'; if (!JFile::exists($mainConfig)) { return; } require_once $mainConfig; if (!class_exists('App')) { return; } $zoo = App::getInstance('zoo'); if ($id = $zoo->request->getInt('changeapp')) { $zoo->system->application->setUserState('com_zooapplication', $id); } $jbzooBootstrap = JPATH_ROOT . '/media/zoo/applications/jbuniversal/framework/jbzoo.php'; if (JFile::exists($jbzooBootstrap)) { require_once $jbzooBootstrap; JBZoo::init(); } }
/** * Init JBZoo Framework */ protected function _loadJBZoo() { define('JBZOO_APP_GROUP', 'jbuniversal'); // include Zoo & JBZoo require_once JPATH_BASE . '/administrator/components/com_zoo/config.php'; require_once JPATH_BASE . '/media/zoo/applications/jbuniversal/framework/jbzoo.php'; \JBZoo::init(); $this->app = \App::getInstance('zoo'); $lang = \JFactory::getLanguage(); $lang->setDefault('ru-RU'); $lang->load('com_jbzoo', $this->app->path->path('jbapp:'), 'ru-RU', true); }
* @license http://www.gnu.org/licenses/gpl.html GNU/GPL */ define('_JEXEC', 1); define('JPATH_BASE', realpath(dirname(__FILE__) . '/../../../../../../..')); !defined('JBZOO_APP_GROUP') && define('JBZOO_APP_GROUP', 'jbuniversal'); !defined('DIRECTORY_SEPERATOR') && define('DIRECTORY_SEPERATOR', '/'); !defined('DS') && define('DS', DIRECTORY_SEPARATOR); error_reporting(E_ALL | E_STRICT); /* Required files */ require_once JPATH_BASE . '/includes/defines.php'; require_once JPATH_BASE . '/includes/framework.php'; JFactory::getApplication('site')->initialise(); require_once JPATH_BASE . '/administrator/components/com_zoo/config.php'; require_once JPATH_BASE . '/media/zoo/applications/jbuniversal/framework/jbzoo.php'; require 'UploadHandler.php'; JBZoo::init(); $zoo = App::getInstance('zoo'); if (isset($_REQUEST['elementId'])) { $elementId = trim(strip_tags($_REQUEST['elementId'])); $element = $zoo->jbentity->getItemTypesData(); $params = $element[$elementId]; $uploadDirectory = trim(trim($params['upload_directory']), '\\/'); $watermark_path = trim(trim($params['watermark_path']), '\\/'); $site_url = str_replace('media/zoo/applications/jbuniversal/elements/jbgalleryimage/upload/', '', JURI::root()); $thumb = array('thumbnail' => array('crop' => $params['thumb_crop'], 'max_width' => $params['thumb_width'], 'max_height' => $params['thumb_height'])); $options = array('upload_dir' => JPATH_BASE . '/' . $uploadDirectory . '/', 'upload_url' => $site_url . $uploadDirectory . '/', 'user_dirs' => true, 'param_name' => $elementId . '-files', 'image_versions' => $thumb, 'watermark_enable' => $params['watermark_enable'], 'watermark_path' => JPATH_BASE . '/' . $watermark_path, 'upload_by_user' => $params['upload_by_user'], 'upload_by_date' => $params['upload_by_date']); class CustomUploadHandler extends UploadHandler { protected function get_user_id() { return $this->handle_form_data();
/** * Init JBZoo Framework */ protected function _loadJBZoo() { define('JBZOO_APP_GROUP', 'jbuniversal'); // include Zoo & JBZoo require_once JPATH_BASE . '/administrator/components/com_zoo/config.php'; require_once JPATH_BASE . '/media/zoo/applications/jbuniversal/framework/jbzoo.php'; \JBZoo::init(); $this->app = \App::getInstance('zoo'); }