/** * Overrides the input * Loads the lib_compojoom classes and language files in a form * * @return void */ protected function getInput() { // Load the compojoom framework require_once JPATH_LIBRARIES . '/compojoom/include.php'; $extension = (string) $this->element['component']; // Load language CompojoomLanguage::load($extension, JPATH_SITE); CompojoomLanguage::load($extension, JPATH_ADMINISTRATOR); CompojoomLanguage::load($extension . '.sys', JPATH_ADMINISTRATOR); }
/** * Constructor * * @param string $type - the installation type * @param JInstallerAdapterComponent $parent - the parent object of the JInstaller * @param string $extName - the extension name */ public function __construct($type, $parent, $extName) { $this->type = $type; $this->parent = $parent; // Load the library lang files if ($type == 'uninstall') { CompojoomLanguage::load('lib_compojoom', JPATH_ROOT); CompojoomLanguage::load('lib_compojoom.sys', JPATH_ROOT); // Now les us load the extension files CompojoomLanguage::load($extName, JPATH_ADMINISTRATOR); CompojoomLanguage::load($extName . '.sys', JPATH_ADMINISTRATOR); } else { CompojoomLanguage::load('lib_compojoom', $parent->getParent()->getPath('source') . '/libraries/compojoom'); CompojoomLanguage::load('lib_compojoom.sys', $parent->getParent()->getPath('source') . '/libraries/compojoom'); // Now les us load the extension files CompojoomLanguage::load($extName, $parent->getParent()->getPath('source') . '/administrator'); CompojoomLanguage::load($extName . '.sys', $parent->getParent()->getPath('source') . '/administrator'); } // Since Joomla translates the message before it has loaded the correct lang files // let us translate themessage again $manifest = $parent->getParent()->getManifest(); $parent->getParent()->set('message', JText::_((string) $manifest->description)); $this->addCss(); }
JLoader::register('MatukioHelperInput', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/input.php'); JLoader::register('MatukioHelperChart', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/util_chart.php'); JLoader::register('MatukioHelperTaxes', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/util_taxes.php'); JLoader::register('MatukioHelperFees', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/util_fees.php'); JLoader::register('MatukioHelperInvoice', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/invoice.php'); JLoader::register('MatukioHelperPDF', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/pdf.php'); JLoader::register('MatukioHelperRecurring', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/recurring.php'); JLoader::register('MatukioHelperUpcoming', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/upcoming.php'); JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . '/tables'); require_once JPATH_COMPONENT_ADMINISTRATOR . "/toolbar.matukio.php"; require_once JPATH_COMPONENT_ADMINISTRATOR . "/controller.php"; // Load Compojoom library require_once JPATH_LIBRARIES . '/compojoom/include.php'; // Load language CompojoomLanguage::load('com_matukio', JPATH_SITE); CompojoomLanguage::load('com_matukio', JPATH_ADMINISTRATOR); $input = JFactory::getApplication()->input; if ($input->get('view', '') == 'liveupdate') { require_once JPATH_COMPONENT_ADMINISTRATOR . '/liveupdate/liveupdate.php'; JToolBarHelper::preferences('com_matukio'); LiveUpdate::handleRequest(); return; } elseif ($input->get('view', '') == 'controlcenter') { require_once JPATH_COMPONENT_ADMINISTRATOR . '/controlcenter/controlcenter.php'; JToolBarHelper::preferences('com_matukio'); CompojoomControlCenter::handleRequest(); return; } elseif ($input->get('view', '') == 'information') { require_once JPATH_COMPONENT_ADMINISTRATOR . '/controlcenter/controlcenter.php'; JToolBarHelper::preferences('com_matukio'); CompojoomControlCenter::handleRequest('information');
* @copyright Copyright (C) 2008 - 2013 compojoom.com . All rights reserved. * @license GNU General Public License version 2 or later; see LICENSE */ defined('_JEXEC') or die('Restricted access'); // Access check. if (!JFactory::getUser()->authorise('core.manage', 'com_cmc')) { JFactory::getApplication()->enqueueMessage(JText::_('JERROR_ALERTNOAUTHOR'), 'error'); return false; } require_once JPATH_COMPONENT_ADMINISTRATOR . '/version.php'; // Load Compojoom library require_once JPATH_LIBRARIES . '/compojoom/include.php'; // Load language CompojoomLanguage::load('com_cmc', JPATH_SITE); CompojoomLanguage::load('com_cmc', JPATH_ADMINISTRATOR); CompojoomLanguage::load('com_cmc.sys', JPATH_ADMINISTRATOR); $input = JFactory::getApplication()->input; JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . '/tables'); require_once JPATH_COMPONENT . '/controller.php'; JLoader::register('MCAPI', JPATH_COMPONENT_ADMINISTRATOR . '/libraries/mailchimp/MCAPI.class.php'); JLoader::discover('cmcHelper', JPATH_COMPONENT_ADMINISTRATOR . '/helpers/'); /* * this part is a little crazy because of the redirects... * Show a warning only if we are in the cpanel view * Redirect only if we are not in the cpanel view */ if (!cmcHelperBasic::checkRequiredSettings() && $input->getCmd('task', '') !== 'update.updateinfo') { if ($input->getCmd('view', '') == 'cpanel') { JFactory::getApplication()->enqueueMessage(JText::_('COM_CMC_YOU_NEED_TO_PROVIDE_API_KEYS'), 'error'); } if ($input->getCmd('view', '') != 'cpanel') {