コード例 #1
0
ファイル: ksencore.php プロジェクト: JexyRu/Ksenmart
 public function onLoadKsen($ext_name_local, array $hFolders = array(), array $ignoreHelpers = array(), array $config = array())
 {
     global $ext_name, $ext_name_com, $ext_prefix;
     $ext_name = $ext_name_local;
     if (strripos($ext_name_local, '.') !== false) {
         list($ext_name, $ext_prefix) = explode('.', $ext_name_local);
     }
     $ext_name_com = 'com_' . $ext_name;
     $document = JFactory::getDocument();
     $version = new JVersion();
     $this->input = JFactory::getApplication()->input;
     $option = $this->input->get('option', null, 'string');
     $extension = $this->input->get('extension', $ext_name_com, 'string');
     include_once dirname(__FILE__) . '/core/defines.php';
     include_once KSC_ADMIN_PATH_CORE_HELPERS . 'helper.php';
     KSLoader::loadCoreHelpers($hFolders, $ignoreHelpers);
     if (!isset($config['admin'])) {
         $config['admin'] = false;
     }
     JHtml::_('behavior.keepalive');
     if ($version->RELEASE < 3.0) {
     } else {
         JHtml::_('jquery.framework');
         JHtml::_('jquery.ui');
         JHtml::_('bootstrap.framework');
     }
     if ($config['admin']) {
         KSSystem::addCSS(array('style', 'prog-style', 'nprogress', 'ui-lightness/jquery-ui-1.8.20.custom'));
         if ($version->RELEASE >= 3.0) {
             JHtml::_('jquery.ui', array('sortable'));
             JHtml::_('bootstrap.framework');
             JHtml::_('behavior.framework');
         } else {
             $document->addScript('http://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js');
         }
         KSSystem::addJS(array('common', 'style', 'nprogress', 'list', 'listmodule'));
     }
     if ($this->params->get('angularJS', 1) && $config['angularJS']) {
     }
     $script = '
         var KS = {
             extension: \'' . $extension . '\',
             option: \'' . $ext_name_com . '\'
         };
     ';
     $document->addScriptDeclaration($script);
     KSSystem::loadPlugins();
     KSSystem::import('libraries.ksdb');
 }
コード例 #2
0
ファイル: head.php プロジェクト: JexyRu/Ksenmart
 public static function AddHeadTags()
 {
     if (self::$_headAdded == true) {
         return;
     }
     $session = JFactory::getSession();
     $document = JFactory::getDocument();
     JDispatcher::getInstance()->trigger('onLoadKsen', array('ksenmart.KSM', array('common'), array(), array('angularJS' => 0)));
     KSLoader::loadLocalHelpers(array('common'));
     $params = JComponentHelper::getParams('com_ksenmart');
     $document->addScript(JURI::base() . 'administrator/components/com_ksenmart/js/jquery.custom.min.js');
     $document->addScript(JURI::base() . 'components/com_ksenmart/js/common.js');
     $document->addStyleSheet(JURI::base() . 'components/com_ksenmart/css/common.css');
     if ($params->get('include_css', 1)) {
         $document->addStyleSheet(JURI::base() . 'components/com_ksenmart/css/template.css');
     }
     $js = "\n        var URI_ROOT='" . JURI::root() . "';\n        var km_cart_link='" . JRoute::_('index.php?option=com_ksenmart&view=cart&Itemid=' . KSSystem::getShopItemid()) . "';\n        var shopItemid='" . KSSystem::getShopItemid() . "';\n        var order_type='ordering';\n        var order_dir='asc';    \n        var limit=" . $params->get('site_product_limit', 30) . ";\n        var limitstart=0;   \n        var use_pagination=" . $params->get('site_use_pagination', 0) . ";\n        var order_process=" . $params->get('order_process', 0) . ";\n        var cat_id=" . JRequest::getInt('id', 0) . ";\n        var user_id=" . JFactory::getUser()->id . ";\n        var page=1;\n        var session_id='" . $session->getId() . "';\n        ";
     $document->addScriptDeclaration($js);
     self::$_headAdded = true;
     KSSystem::loadPlugins();
 }
コード例 #3
0
<?php

/**
 * @copyright   Copyright (C) 2013. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */
defined('_JEXEC') or die;
JDispatcher::getInstance()->trigger('onLoadKsen', array('ksenmart.KSM', array('common'), array(), array('angularJS' => 0)));
KSLoader::loadLocalHelpers(array('common'));
if (!class_exists('KsenmartHtmlHelper')) {
    include JPATH_ROOT . '/components/com_ksenmart/helpers/head.php';
    KsenmartHtmlHelper::AddHeadTags();
}
$group = $params->get('group', 0);
require_once dirname(__FILE__) . '/helper.php';
$modKsenmartManufacturersHelper = new modKsenmartManufacturersHelper();
$manufacturers = $modKsenmartManufacturersHelper->getManufacturers($group);
$layout = $params->get('layout', 'default');
if ($group) {
    $layout .= '_group';
}
if (count($manufacturers)) {
    require JModuleHelper::getLayoutPath('mod_km_manufacturers', $layout);
}