public function display($tpl = null)
 {
     $this->setTitle('Control Panel');
     $lang = JFactory::getLanguage();
     $alignment = $lang->isRTL() ? 'right' : 'left';
     $this->assignRef('alignment', $alignment);
     $icons = array();
     $icons[] = $this->icon('config', 'Configuration', 'config.png');
     $icons[] = $this->icon('stores', 'Store Conditions', 'store.png');
     $icons[] = $this->icon('products', 'Product Relations', 'product.png');
     $icons[] = $this->icon('connectors', 'Connectors', 'connect.png');
     $icons[] = $this->icon('users', 'Users', 'user.png');
     $icons[] = $this->icon('check', 'System Check', 'cpanel.png');
     $icons[] = $this->icon('logs', 'Logs', 'info.png');
     $icons[] = $this->icon('update', 'Update', 'install.png');
     $icons[] = $this->icon('cache', 'Empty Cache', 'trash.png');
     $icons[] = $this->icon('magento', 'Magento Admin', 'magento.png', '_blank');
     $icons[] = $this->icon('tutorials', 'Tutorials', 'tutorials.png', '_blank');
     $icons[] = $this->icon('forum', 'Forum', 'forum.png', '_blank');
     $this->assignRef('icons', $icons);
     //jimport('joomla.html.pane');
     //$pane = JPane::getInstance('sliders');
     //$this->assignRef('pane', $pane);
     $current_version = MageBridgeUpdateHelper::getComponentVersion();
     $this->assignRef('current_version', $current_version);
     $changelog_url = 'http://www.yireo.com/tutorials/magebridge/updates/975-magebridge-changelog';
     $this->assignRef('changelog_url', $changelog_url);
     $jed_url = 'http://extensions.joomla.org/extensions/bridges/e-commerce-bridges/9440';
     $this->assignRef('jed_url', $jed_url);
     $backend_feed = MagebridgeModelConfig::load('backend_feed');
     $this->assignRef('backend_feed', $backend_feed);
     if ($backend_feed == 1) {
         $this->ajax('index.php?option=com_magebridge&view=home&format=ajax&layout=feeds', 'latest_news');
         $this->ajax('index.php?option=com_magebridge&view=home&format=ajax&layout=promotion', 'promotion');
         $document = JFactory::getDocument();
         if (JURI::getInstance()->isSSL() == true) {
             $document->addStylesheet('https://fonts.googleapis.com/css?family=Just+Me+Again+Down+Here');
         } else {
             $document->addStylesheet('http://fonts.googleapis.com/css?family=Just+Me+Again+Down+Here');
         }
     }
     parent::display($tpl);
 }
 /**
  * Method to do all bridge-based checks
  *
  * @package MageBridge
  * @access public
  * @return null
  */
 public function doBridgeChecks()
 {
     $register = MageBridgeModelRegister::getInstance();
     $bridge = MageBridgeModelBridge::getInstance();
     // First add all the things we need to the bridge
     $version_id = $register->add('version');
     // Build the bridge
     $bridge->build();
     $magebridge_version_magento = $register->getDataById($version_id);
     $magebridge_version_joomla = MageBridgeUpdateHelper::getComponentVersion();
     if (empty($magebridge_version_magento)) {
         $this->addResult('bridge', 'Bridge version', self::CHECK_WARNING, JText::_('CHECK_BRIDGE_NO_VERSION'));
     } else {
         $result = version_compare($magebridge_version_magento, $magebridge_version_joomla, '=') ? self::CHECK_OK : self::CHECK_ERROR;
         $this->addResult('bridge', 'Bridge version', $result, JText::sprintf('CHECK_BRIDGE_VERSION', $magebridge_version_magento, $magebridge_version_joomla));
     }
     $result = MageBridgeModelConfig::load('modify_url') == 1 ? self::CHECK_OK : self::CHECK_WARNING;
     $this->addResult('bridge', 'Modify URLs', $result, JText::_('CHECK_BRIDGE_MODIFY_URL'));
     $result = MageBridgeModelConfig::load('link_to_magento') == 0 ? self::CHECK_OK : self::CHECK_WARNING;
     $this->addResult('bridge', 'Link to Magento', $result, JText::_('CHECK_BRIDGE_LINK_TO_MAGENTO'));
     //$result = (defined('MAGEBRIDGE_MODULEHELPER_OVERRIDE') == true) ? self::CHECK_OK : self::CHECK_WARNING;
     //$this->addResult('bridge', 'Modulehelper override', $result, JText::_('CHECK_BRIDGE_MODULEHELPER_OVERRIDE'));
     return;
 }
Exemple #3
0
 /**
  * Method to get a User-Agent string for MageBridge
  *
  * @return string
  */
 public function getUserAgentBySystem()
 {
     $user_agent = 'MageBridge ' . MageBridgeUpdateHelper::getComponentVersion();
     $user_agent .= ' (Joomla! ' . MageBridgeHelper::getJoomlaVersion() . ')';
     return $user_agent;
 }