예제 #1
0
    /**
     * @return void
     */
    public function initialize()
    {
        if (!(include_once MODX_CORE_PATH . 'components/minishop2/model/minishop2/minishop2.class.php')) {
            throw new Exception('You must install miniShop2 first');
        }
        $version = $this->modx->getVersionData();
        $modx23 = !empty($version) && version_compare($version['full_version'], '2.3.0', '>=');
        if (!$modx23) {
            $this->addCss(MODX_ASSETS_URL . 'components/msearch2/css/mgr/font-awesome.min.css');
        }
        $this->msDiscount = new msDiscount($this->modx);
        $this->miniShop2 = new miniShop2($this->modx);
        $this->addJavascript(MODX_MANAGER_URL . 'assets/modext/util/datetime.js');
        $this->addCss($this->msDiscount->config['cssUrl'] . 'mgr/main.css');
        $this->addJavascript($this->msDiscount->config['jsUrl'] . 'mgr/msdiscount.js');
        $this->addJavascript($this->miniShop2->config['jsUrl'] . 'mgr/minishop2.js');
        $this->addJavascript($this->miniShop2->config['jsUrl'] . 'mgr/misc/ms2.utils.js');
        $this->addJavascript($this->miniShop2->config['jsUrl'] . 'mgr/misc/ms2.combo.js');
        $this->addHtml('<script type="text/javascript">
			MODx.modx23 = ' . (int) $modx23 . ';
			miniShop2.config = ' . $this->modx->toJSON($this->miniShop2->config) . ';
			miniShop2.config.connector_url = "' . $this->miniShop2->config['connectorUrl'] . '";
			msDiscount.config = ' . $this->modx->toJSON($this->msDiscount->config) . ';
			msDiscount.config.connector_url = "' . $this->msDiscount->config['connectorUrl'] . '";
		</script>');
        parent::initialize();
    }
예제 #2
0
 /**
  * @return void
  */
 public function initialize()
 {
     $corePath = $this->modx->getOption('getqrcode_core_path', null, $this->modx->getOption('core_path') . 'components/getqrcode/');
     require_once $corePath . 'model/getqrcode/getqrcode.class.php';
     $this->getQRcode = new getQRcode($this->modx);
     parent::initialize();
 }
예제 #3
0
 function loadCustomCssJs()
 {
     parent::loadCustomCssJs();
     $assets_url = $this->getOption('assets_url');
     # $this->addJavascript( $assets_url . 'js/modxsite.js');
     #
     # $this->addHtml('<script type="text/javascript">
     #     ModxSite.config = '. $this->modx->toJSON($this->config).';
     # </script>');
     # $attrs = $this->modx->user->getAttributes(array(),'', true);
     # $policies = array();
     # if(!empty($attrs['modAccessContext']['mgr'])){
     #     foreach($attrs['modAccessContext']['mgr'] as $attr){
     #         foreach($attr['policy'] as $policy => $value){
     #             if(empty($policies[$policy])){
     #                 $policies[$policy] = $value;
     #             }
     #         }
     #     }
     # }
     # $this->modx->regClientStartupScript('<script type="text/javascript">
     #     Shop.policies = '. $this->modx->toJSON($policies).';
     # </script>', true);
     /*$this->addJavascript($this->getOption('assets_url').'js/shop.js'); 
      */
     return;
 }
예제 #4
0
 function __construct(modX &$modx, $config = array())
 {
     parent::__construct($modx, $config);
     $this->config['namespace_path'] = $this->translatePath($this->config['namespace_path']);
     $this->config['manager_url'] = $modx->getOption('composerconsole.manager_url', null, $modx->getOption('manager_url') . 'components/composerconsole/');
     $this->config['connector_url'] = $this->config['manager_url'] . 'connector.php';
 }
예제 #5
0
    /**
     * @return void
     */
    public function initialize()
    {
        $corePath = $this->modx->getOption('msgiftsrusynch_core_path', null, $this->modx->getOption('core_path') . 'components/msgiftsrusynch/');
        require_once $corePath . 'model/msgiftsrusynch/msgiftsrusynch.class.php';
        if (!(include_once MODX_CORE_PATH . 'components/minishop2/model/minishop2/minishop2.class.php')) {
            throw new Exception('You must install miniShop2 first');
        }
        $version = $this->modx->getVersionData();
        $modx23 = !empty($version) && version_compare($version['full_version'], '2.3.0', '>=');
        if (!$modx23) {
            $this->addCss(MODX_ASSETS_URL . 'components/msearch2/css/mgr/font-awesome.min.css');
        }
        $this->msGiftsRuSynch = new msGiftsRuSynch($this->modx);
        $this->miniShop2 = new miniShop2($this->modx);
        $this->addCss($this->msGiftsRuSynch->config['cssUrl'] . 'mgr/main.css');
        $this->addJavascript($this->msGiftsRuSynch->config['jsUrl'] . 'mgr/msgiftsrusynch.js');
        $this->addJavascript($this->miniShop2->config['jsUrl'] . 'mgr/minishop2.js');
        $this->addJavascript($this->miniShop2->config['jsUrl'] . 'mgr/misc/ms2.utils.js');
        $this->addJavascript($this->miniShop2->config['jsUrl'] . 'mgr/misc/ms2.combo.js');
        $this->addHtml('<script type="text/javascript">
			MODx.modx23 = ' . (int) $modx23 . ';
			miniShop2.config = ' . $this->modx->toJSON($this->miniShop2->config) . ';
			miniShop2.config.connector_url = "' . $this->miniShop2->config['connectorUrl'] . '";
			msGiftsRuSynch.config = ' . $this->modx->toJSON($this->msGiftsRuSynch->config) . ';
			msGiftsRuSynch.config.connector_url = "' . $this->msGiftsRuSynch->config['connectorUrl'] . '";
		</script>');
        parent::initialize();
    }
예제 #6
0
 function __construct(modX &$modx, $config = array())
 {
     parent::__construct($modx, $config);
     $this->config['namespace_assets_path'] = $modx->call('modNamespace', 'translatePath', array(&$modx, $this->config['namespace_assets_path']));
     #manager url still called "assets_url" for safe install
     $this->config['manager_url'] = $modx->getOption('console.manager_url', null, $modx->getOption('manager_url') . 'components/console/');
     $this->config['connector_url'] = $this->config['manager_url'] . 'connectors/';
 }
예제 #7
0
 public function initialize()
 {
     $path = $this->modx->getOption('cronmanager.core_path', null, $this->modx->getOption('core_path') . 'components/cronmanager/');
     $this->cronmanager = $this->modx->getService('cronmanager', 'model.cronmanager.CronManager', $path);
     $this->jsURL = $this->cronmanager->config['jsUrl'];
     $this->cssURL = $this->cronmanager->config['cssUrl'];
     $this->loadBase();
     parent::initialize();
 }
예제 #8
0
 function loadCustomCssJs()
 {
     parent::loadCustomCssJs();
     $this->addJavascript($this->getOption('assets_url') . 'js/modxsdk.js');
     $this->addHtml('<script type="text/javascript">
         modxSDK.config = ' . $this->modx->toJSON($this->config) . ';
     </script>');
     return;
 }
예제 #9
0
 /**
  * @return void
  */
 public function initialize()
 {
     $corePath = $this->modx->getOption('subdomainsfolder_core_path', null, $this->modx->getOption('core_path') . 'components/subdomainsfolder/');
     require_once $corePath . 'model/subdomainsfolder/subdomainsfolder.class.php';
     $this->SubdomainsFolder = new SubdomainsFolder($this->modx);
     $this->SubdomainsFolder->initialize($this->modx->context->key);
     $this->SubdomainsFolder->Tools->loadControllerFiles($this, array('css' => true, 'config' => true, 'tools' => true));
     parent::initialize();
 }
 public function __construct(modX &$modx, $config = array())
 {
     require_once $modx->getOption('repoman.core_path', '', MODX_CORE_PATH . 'components/repoman/') . 'vendor/autoload.php';
     $controller = isset($_REQUEST['action']) ? $_REQUEST['action'] : 'home';
     if (!in_array($controller, $this->valid_controllers)) {
         $_REQUEST['action'] = '404';
     }
     $assets_url = $modx->getOption('repoman.assets_url', '', MODX_ASSETS_URL . 'components/repoman/');
     $modx->regClientCSS($assets_url . 'style.css');
     parent::__construct($modx, $config);
 }
예제 #11
0
 public function initialize()
 {
     $this->bannery = new BannerY($this->modx);
     $this->addJavascript($this->bannery->config['jsUrl'] . 'mgr/bannery.js');
     $this->addHtml('<script type="text/javascript">
     Ext.onReady(function() {
         Bannery.config = ' . $this->modx->toJSON($this->bannery->config) . ';
     });
     </script>');
     return parent::initialize();
 }
예제 #12
0
 public function initialize()
 {
     $this->msRevaluation = new msRevaluation($this->modx);
     $this->addJavascript($this->msRevaluation->config['assets_url'] . 'js/mgr/msrevaluation.js');
     $this->addHtml('<script type="text/javascript">
         Ext.onReady(function() {
             msRevaluation.config = ' . $this->modx->toJSON($this->msRevaluation->config) . ';
         });
         </script>');
     return parent::initialize();
 }
예제 #13
0
 public function initialize()
 {
     $this->lingua = new Lingua($this->modx);
     $this->addCss($this->lingua->config['cssUrl'] . 'mgr.css');
     $this->addJavascript($this->lingua->config['jsUrl'] . 'mgr/lingua.js');
     $this->addHtml('<script type="text/javascript">
     Ext.onReady(function() {
         Lingua.config = ' . $this->modx->toJSON($this->lingua->config) . ';
     });
     </script>');
     return parent::initialize();
 }
예제 #14
0
    public function initialize()
    {
        $this->ms2Gallery = new ms2Gallery($this->modx);
        $this->modx->regClientCSS($this->ms2Gallery->config['cssUrl'] . 'mgr/main.css');
        $this->addJavaScript($this->ms2Gallery->config['jsUrl'] . 'mgr/ms2gallery.js');
        $this->addHtml(str_replace('		', '', '
		<script type="text/javascript">
			ms2Gallery.config = ' . $this->modx->toJSON($this->ms2Gallery->config) . ';
			ms2Gallery.config.connector_url = "' . $this->ms2Gallery->config['connectorUrl'] . '";
		</script>'));
        parent::initialize();
    }
예제 #15
0
 public function initialize()
 {
     $this->simplecrm = new SimpleCRM($this->modx);
     $this->addCss($this->simplecrm->config['cssUrl'] . 'mgr.css');
     $this->addJavascript($this->simplecrm->config['jsUrl'] . 'mgr/simplecrm.js');
     $this->addHtml('<script type="text/javascript">
      Ext.onReady(function() {
          SimpleCRM.config = ' . $this->modx->toJSON($this->simplecrm->config) . ';
      });
      </script>');
     return parent::initialize();
 }
예제 #16
0
 public function initialize()
 {
     $this->moneybird = new MoneyBird($this->modx);
     $this->addCss($this->moneybird->config['cssUrl'] . 'mgr.css');
     $this->addJavascript($this->moneybird->config['jsUrl'] . 'mgr/moneybird.js');
     $this->addHtml('<script type="text/javascript">
     Ext.onReady(function() {
         MoneyBird.config = ' . $this->modx->toJSON($this->moneybird->config) . ';
     });
     </script>');
     return parent::initialize();
 }
예제 #17
0
 public function initialize()
 {
     $this->fleetmanager = new Fleetmanager($this->modx);
     $this->addCss($this->fleetmanager->config['cssUrl'] . 'mgr.css');
     $this->addJavascript($this->fleetmanager->config['jsUrl'] . 'mgr/fleetmanager.js');
     $this->addHtml('<script type="text/javascript">
         Ext.onReady(function() {
             Fleetmanager.config = ' . $this->modx->toJSON($this->fleetmanager->config) . ';
         });
         </script>');
     return parent::initialize();
 }
예제 #18
0
 public function initialize()
 {
     $this->hits = new Hits($this->modx);
     //$this->addCss($this->hits->config['cssUrl'].'mgr.css');
     //$this->addJavascript($this->hits->config['jsUrl'].'mgr/hits.js');
     /*$this->addHtml('<script type="text/javascript">
       Ext.onReady(function() {
           Hits.config = '.$this->modx->toJSON($this->hits->config).';
       });
       </script>');*/
     return parent::initialize();
 }
예제 #19
0
 public function initialize()
 {
     $this->customurls = new CustomUrls($this->modx);
     //$this->addCss($this->customurls->config['cssUrl'].'mgr.css');
     $this->addJavascript($this->customurls->config['jsUrl'] . 'mgr/customurls.js');
     $this->addHtml('<script type="text/javascript">
     Ext.onReady(function() {
         CustomUrls.config = ' . $this->modx->toJSON($this->customurls->config) . ';
     });
     </script>');
     return parent::initialize();
 }
예제 #20
0
 public function initialize()
 {
     $this->ulogin = new uLogin($this->modx);
     //$this->addCss($this->ulogin->config['cssUrl'].'mgr.css');
     $this->addJavascript($this->ulogin->config['jsUrl'] . 'mgr/ulogin.js');
     $this->addHtml('<script type="text/javascript">
     Ext.onReady(function() {
         Ulogin.config = ' . $this->modx->toJSON($this->ulogin->config) . ';
     });
     </script>');
     return parent::initialize();
 }
예제 #21
0
 public function initialize()
 {
     $this->collections = new Collections($this->modx);
     $this->addCss($this->collections->config['cssUrl'] . 'mgr.css');
     $this->addJavascript($this->collections->config['jsUrl'] . 'mgr/collections.js');
     $this->addHtml('<script type="text/javascript">
     Ext.onReady(function() {
         Collections.config = ' . $this->modx->toJSON($this->collections->config) . ';
         Collections.config.connector_url = "' . $this->collections->config['connectorUrl'] . '";
     });
     </script>');
     return parent::initialize();
 }
예제 #22
0
 public function initialize()
 {
     $this->clientlexicon = new ClientLexicon($this->modx);
     $this->addCss($this->clientlexicon->getOption('cssUrl') . 'mgr.css');
     $this->addJavascript($this->clientlexicon->getOption('jsUrl') . 'mgr/clientlexicon.js');
     $this->addHtml('<script type="text/javascript">
     Ext.onReady(function() {
         ClientLexicon.config = ' . $this->modx->toJSON($this->clientlexicon->options) . ';
         ClientLexicon.config.connector_url = "' . $this->clientlexicon->getOption('connectorUrl') . '";
     });
     </script>');
     return parent::initialize();
 }
예제 #23
0
    public function initialize()
    {
        $this->miniPayment = new miniPayment($this->modx);
        $this->modx->regClientCSS($this->miniPayment->config['cssUrl'] . 'mgr.css');
        $this->modx->regClientStartupScript($this->miniPayment->config['jsUrl'] . 'mgr/minipayment.js');
        $this->modx->regClientStartupHTMLBlock('<script type="text/javascript">
		Ext.onReady(function() {
			miniPayment.config = ' . $this->modx->toJSON($this->miniPayment->config) . ';
			miniPayment.config.connector_url = "' . $this->miniPayment->config['connectorUrl'] . '";
		});
		</script>');
        return parent::initialize();
    }
예제 #24
0
    public function initialize()
    {
        $this->miniShop2 = new miniShop2($this->modx);
        $this->addCss($this->miniShop2->config['cssUrl'] . 'mgr/bootstrap.min.css');
        $this->addCss($this->miniShop2->config['cssUrl'] . 'mgr/main.css');
        $this->addJavaScript($this->miniShop2->config['jsUrl'] . 'mgr/minishop2.js');
        $this->addHtml(str_replace('		', '', '
		<script type="text/javascript">
			miniShop2.config = ' . $this->modx->toJSON($this->miniShop2->config) . ';
			miniShop2.config.connector_url = "' . $this->miniShop2->config['connectorUrl'] . '";
		</script>'));
        parent::initialize();
    }
예제 #25
0
 public function initialize()
 {
     $this->zapier = new Zapier($this->modx);
     $this->addCss($this->zapier->getOption('cssUrl') . 'mgr.css');
     $this->addJavascript($this->zapier->getOption('jsUrl') . 'mgr/zapier.js');
     $this->addHtml('<script type="text/javascript">
     Ext.onReady(function() {
         zapier.config = ' . $this->modx->toJSON($this->zapier->options) . ';
         zapier.config.connector_url = "' . $this->zapier->getOption('connectorUrl') . '";
     });
     </script>');
     parent::initialize();
 }
 public function initialize()
 {
     $this->setinputoptions = new SetInputOptions($this->modx);
     $this->addCss($this->setinputoptions->getOption('cssUrl') . 'mgr.css');
     $this->addJavascript($this->setinputoptions->getOption('jsUrl') . 'mgr/setinputoptions.js');
     $this->addHtml('<script type="text/javascript">
     Ext.onReady(function() {
         SetInputOptions.config = ' . $this->modx->toJSON($this->setinputoptions->options) . ';
         SetInputOptions.config.connector_url = "' . $this->setinputoptions->getOption('connectorUrl') . '";
     });
     </script>');
     return parent::initialize();
 }
예제 #27
0
 public function initialize()
 {
     $this->importusersx = new ImportUsersX($this->modx);
     $this->addCss($this->importusersx->config['cssUrl'] . 'mgr.css');
     //No needed for now
     $this->addJavascript($this->importusersx->config['jsUrl'] . 'mgr/importusersx.js');
     $this->addHtml('<script type="text/javascript">
     Ext.onReady(function() {
         importUsersX.config = ' . $this->modx->toJSON($this->importusersx->config) . ';
     });
     </script>');
     return parent::initialize();
 }
예제 #28
0
    public function initialize()
    {
        $this->mSklad = new mSklad($this->modx);
        $this->modx->regClientCSS($this->mSklad->config['cssUrl'] . 'mgr/main.css');
        $this->modx->regClientStartupScript($this->mSklad->config['jsUrl'] . 'mgr/msklad.js');
        $this->modx->regClientStartupHTMLBlock('<script type="text/javascript">
		Ext.onReady(function() {
			mSklad.config = ' . $this->modx->toJSON($this->mSklad->config) . ';
			mSklad.config.connector_url = "' . $this->mSklad->config['connectorUrl'] . '";
		});
		</script>');
        parent::initialize();
    }
예제 #29
0
 public function initialize()
 {
     $path = $this->modx->getOption('ebents.core_path', NULL, $this->modx->getOption('core_path') . 'components/ebents/') . 'model/ebents/';
     require_once $path . 'ebents.class.php';
     $this->ebents = new Ebents($this->modx);
     $this->addCss($this->ebents->config['cssUrl'] . 'mgr.css');
     $this->addJavascript($this->ebents->config['jsUrl'] . 'mgr/ebents.js');
     $this->addHtml('<script type="text/javascript">
     Ext.onReady(function() {
         Ebents.config = ' . $this->modx->toJSON($this->ebents->config) . ';
     });
     </script>');
     return parent::initialize();
 }
예제 #30
0
 public function initialize()
 {
     $this->migx = new MIGX($this->modx);
     $this->migx->config['cmptabs'] = $_REQUEST['configs'];
     $this->modx->migx =& $this->migx;
     $this->addCss($this->migx->config['cssUrl'] . 'mgr.css');
     $this->addJavascript($this->migx->config['jsUrl'] . 'mgr/migx.js');
     $this->addHtml('<script type="text/javascript">
     Ext.onReady(function() {
         Migx.config = ' . $this->modx->toJSON($this->migx->config) . ';
     });
     </script>');
     return parent::initialize();
 }