Пример #1
0
 /**
  * Intialize class vars.
  *
  * @return   void
  *
  * @since   1.5
  */
 public static function initializeVars()
 {
     // Get assets loader plugin
     $plugin = JPluginHelper::getPlugin('system', 'tjassetsloader');
     // If the plugin is enabled
     if ($plugin) {
         // Get plugin params
         $pluginParams = new JRegistry($plugin->params);
         self::$fix_js = $pluginParams->get('fix_js');
         self::$headtag_position = $pluginParams->get('headtag_position');
         self::$force_js_load = $pluginParams->get('force_js_load');
     }
     jimport('joomla.filesystem.file');
     if (self::$load_com_emailbeautifier_assets) {
         // Check if EB is installed
         if (JFile::exists(JPATH_ROOT . '/components/com_emailbeautifier/emailbeautifier.php')) {
             if (JComponentHelper::isEnabled('com_emailbeautifier', true)) {
                 self::$com_emailbeautifier_installed = 1;
                 self::$tj_extensions[] = 'com_emailbeautifier';
             }
         }
     }
     if (self::$load_com_invitex_assets) {
         // Check if invitex is installed
         if (JFile::exists(JPATH_ROOT . '/components/com_invitex/invitex.php')) {
             if (JComponentHelper::isEnabled('com_invitex', true)) {
                 self::$com_invitex_installed = 1;
                 self::$tj_extensions[] = 'com_invitex';
             }
         }
     }
     if (self::$load_com_jbolo_assets) {
         // Check if JBOLO is installed
         if (JFile::exists(JPATH_ROOT . '/components/com_jbolo/jbolo.php')) {
             if (JComponentHelper::isEnabled('com_jbolo', true)) {
                 self::$com_jbolo_installed = 1;
                 self::$tj_extensions[] = 'com_jbolo';
                 // Load jboloFrontendHelper
                 $jboloHelperPath = JPATH_SITE . "/components/com_jbolo/helpers/helper.php";
                 self::$jboloFrontendHelper = self::TjloadClass($jboloHelperPath, 'jboloFrontendHelper');
             }
         }
     }
     if (self::$load_com_jgive_assets) {
         // Check if jgive is installed
         if (JFile::exists(JPATH_ROOT . '/components/com_jgive/jgive.php')) {
             if (JComponentHelper::isEnabled('com_jgive', true)) {
                 self::$com_jgive_installed = 1;
                 self::$tj_extensions[] = 'com_jgive';
             }
         }
     }
     if (self::$load_com_jlike_assets) {
         // Check if JLike is installed
         if (JFile::exists(JPATH_ROOT . '/components/com_jlike/jlike.php')) {
             if (JComponentHelper::isEnabled('com_jlike', true)) {
                 self::$com_jlike_installed = 1;
                 self::$tj_extensions[] = 'com_jlike';
             }
         }
     }
     if (self::$load_com_jmailalerts_assets) {
         // Check if jmailalerts is installed
         if (JFile::exists(JPATH_ROOT . '/components/com_jmailalerts/jmailalerts.php')) {
             if (JComponentHelper::isEnabled('com_jmailalerts', true)) {
                 self::$com_jmailalerts_installed = 1;
                 self::$tj_extensions[] = 'com_jmailalerts';
             }
         }
     }
     if (self::$load_com_jticketing_assets) {
         // Check if jticketing is installed
         if (JFile::exists(JPATH_ROOT . '/components/com_jticketing/jticketing.php')) {
             if (JComponentHelper::isEnabled('com_jticketing', true)) {
                 self::$com_jticketing_installed = 1;
                 self::$tj_extensions[] = 'com_jticketing';
             }
         }
     }
     if (self::$load_com_quick2cart_assets) {
         // Check if quick2cart is installed
         if (JFile::exists(JPATH_ROOT . '/components/com_quick2cart/quick2cart.php')) {
             if (JComponentHelper::isEnabled('com_quick2cart', true)) {
                 if (self::$load_com_quick2cart_assets) {
                     self::$com_quick2cart_installed = 1;
                     self::$tj_extensions[] = 'com_quick2cart';
                 }
             }
         }
     }
     if (self::$load_com_socialads_assets) {
         // Check if com_socialads is installed
         if (JFile::exists(JPATH_ROOT . '/components/com_socialads/socialads.php')) {
             if (JComponentHelper::isEnabled('com_socialads', true)) {
                 self::$com_socialads_installed = 1;
                 self::$tj_extensions[] = 'com_socialads';
             }
         }
     }
     if (self::$load_com_tjfields_assets) {
         // Check if com_tjfields is installed
         if (JFile::exists(JPATH_ROOT . '/components/com_tjfields/tjfields.php')) {
             if (JComponentHelper::isEnabled('com_tjfields', true)) {
                 self::$com_tjfields_installed = 1;
                 self::$tj_extensions[] = 'com_tjfields';
             }
         }
     }
     if (self::$load_com_tjlms_assets) {
         // Check if com_tjlms is installed
         if (JFile::exists(JPATH_ROOT . '/components/com_tjlms/tjlms.php')) {
             if (JComponentHelper::isEnabled('com_tjlms', true)) {
                 self::$com_tjlms_installed = 1;
                 self::$tj_extensions[] = 'com_tjlms';
             }
         }
     }
     if (self::$load_com_tmt_assets) {
         // Check if com_tmt is installed
         if (JFile::exists(JPATH_ROOT . '/components/com_tmt/tmt.php')) {
             if (JComponentHelper::isEnabled('com_tmt', true)) {
                 self::$com_tmt_installed = 1;
                 self::$tj_extensions[] = 'com_tmt';
             }
         }
     }
 }