当前位置: 首页>>代码示例>>PHP>>正文


PHP tsmConfig类代码示例

本文整理汇总了PHP中tsmConfig的典型用法代码示例。如果您正苦于以下问题:PHP tsmConfig类的具体用法?PHP tsmConfig怎么用?PHP tsmConfig使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了tsmConfig类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getOptions

 protected function getOptions()
 {
     tsmConfig::loadConfig();
     // if VM is not installed
     if (!JFolder::exists(JPATH_ROOT . '/administrator/components/com_virtuemart') or !class_exists('ShopFunctions')) {
         // add the root item
         $option = new stdClass();
         $option->text = JText::_('MOD_SLIDESHOWCK_VIRTUEMART_NOTFOUND');
         $option->value = '0';
         $options[] = $option;
         // Merge any additional options in the XML definition.
         $options = array_merge(parent::getOptions(), $options);
         return $options;
     }
     $categorylist = ShopFunctions::categoryListTree();
     // $categorylist = 'testced';
     $categorylist = trim($categorylist, '</option>');
     $categorylist = explode("</option><option", $categorylist);
     // add the root item
     $option = new stdClass();
     $option->text = JText::_('MOD_SLIDESHOWCK_VIRTUEMART_ROOTNODE');
     $option->value = '0';
     $options[] = $option;
     foreach ($categorylist as $cat) {
         $option = new stdClass();
         $text = explode(">", $cat);
         $option->text = trim($text[1]);
         $option->value = strval(trim(trim(trim($text[0]), '"'), 'value="'));
         $options[] = $option;
     }
     // Merge any additional options in the XML definition.
     $options = array_merge(parent::getOptions(), $options);
     return $options;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:34,代码来源:ckvmcategory.php

示例2: display

 function display($tpl = null)
 {
     // Load the helper(s)
     if (!class_exists('VmHTML')) {
         require VMPATH_ADMIN . DS . 'helpers' . DS . 'html.php';
     }
     $model = tmsModel::getModel();
     $layoutName = $this->getLayout();
     $task = vRequest::getCmd('task', $layoutName);
     $this->assignRef('task', $task);
     if ($layoutName == 'edit') {
         //For shoppergroup specific price display
         tsmConfig::loadJLang('com_tsmart_config');
         tsmConfig::loadJLang('com_tsmart_shoppers', true);
         $shoppergroup = $model->getShopperGroup();
         $this->SetViewTitle('SHOPPERGROUP', $shoppergroup->shopper_group_name);
         if ($this->showVendors()) {
             $this->vendorList = ShopFunctions::renderVendorList($shoppergroup->tsmart_vendor_id);
         }
         $this->assignRef('shoppergroup', $shoppergroup);
         $this->addStandardEditViewCommands();
     } else {
         $this->SetViewTitle();
         $showVendors = $this->showVendors();
         $this->assignRef('showVendors', $showVendors);
         $this->addStandardDefaultViewCommands();
         $this->addStandardDefaultViewLists($model);
         $shoppergroups = $model->getShopperGroups(false, true);
         $this->assignRef('shoppergroups', $shoppergroups);
         $pagination = $model->getPagination();
         $this->assignRef('sgrppagination', $pagination);
     }
     parent::display($tpl);
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:34,代码来源:view.html.php

示例3: getInput

 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  * @since	1.6
  */
 function getInput()
 {
     $key = $this->element['key_field'] ? $this->element['key_field'] : 'value';
     $val = $this->element['value_field'] ? $this->element['value_field'] : $this->name;
     tsmConfig::loadConfig();
     return JHtml::_('select.genericlist', $this->_getProducts(), $this->name, 'class="inputbox"   ', 'value', 'text', $this->value, $this->id);
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:13,代码来源:product.php

示例4: getInput

 function getInput()
 {
     tsmConfig::loadConfig();
     tsmConfig::loadJLang('com_tsmart');
     $model = tmsModel::getModel('Manufacturer');
     $manufacturers = $model->getManufacturers(true, true, false);
     return JHtml::_('select.genericlist', $manufacturers, $this->name, 'class="inputbox"   ', 'value', 'text', $this->value, $this->id);
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:8,代码来源:vmmanufacturersmenu.php

示例5: mailAskquestion

 /**
  * Send the ask question email.
  * @author Kohl Patrick, Christopher Roussel
  */
 public function mailAskquestion()
 {
     vRequest::vmCheckToken();
     if (!class_exists('shopFunctionsF')) {
         require VMPATH_SITE . DS . 'helpers' . DS . 'shopfunctionsf.php';
     }
     $model = tmsModel::getModel('vendor');
     $mainframe = JFactory::getApplication();
     $vars = array();
     $min = tsmConfig::get('asks_minimum_comment_length', 50) + 1;
     $max = tsmConfig::get('asks_maximum_comment_length', 2000) - 1;
     $commentSize = vRequest::getString('comment');
     if (function_exists('mb_strlen')) {
         $commentSize = mb_strlen($commentSize);
     } else {
         $commentSize = strlen($commentSize);
     }
     $validMail = filter_var(vRequest::getVar('email'), FILTER_VALIDATE_EMAIL);
     $virtuemart_vendor_id = vRequest::getInt('virtuemart_vendor_id', 1);
     if (!class_exists('VirtueMartModelVendor')) {
         require VMPATH_ADMIN . DS . 'models' . DS . 'vendor.php';
     }
     $userId = VirtueMartModelVendor::getUserIdByVendorId($virtuemart_vendor_id);
     //$vendorUser = JFactory::getUser($userId);
     if ($commentSize < $min || $commentSize > $max || !$validMail) {
         $this->setRedirect(JRoute::_('index.php?option=com_virtuemart&view=vendor&task=contact&virtuemart_vendor_id=' . $virtuemart_vendor_id, FALSE), tsmText::_('COM_VIRTUEMART_COMMENT_NOT_VALID_JS'));
         return;
     }
     $user = JFactory::getUser();
     $fromMail = vRequest::getVar('email');
     //is sanitized then
     $fromName = vRequest::getVar('name', '');
     //is sanitized then
     $fromMail = str_replace(array('\'', '"', ',', '%', '*', '/', '\\', '?', '^', '`', '{', '}', '|', '~'), array(''), $fromMail);
     $fromName = str_replace(array('\'', '"', ',', '%', '*', '/', '\\', '?', '^', '`', '{', '}', '|', '~'), array(''), $fromName);
     if (!empty($user->id)) {
         if (empty($fromMail)) {
             $fromMail = $user->email;
         }
         if (empty($fromName)) {
             $fromName = $user->name;
         }
     }
     $vars['user'] = array('name' => $fromName, 'email' => $fromMail);
     $VendorEmail = $model->getVendorEmail($virtuemart_vendor_id);
     $vars['vendor'] = array('vendor_store_name' => $fromName);
     if (shopFunctionsF::renderMail('vendor', $VendorEmail, $vars, 'vendor')) {
         $string = 'COM_VIRTUEMART_MAIL_SEND_SUCCESSFULLY';
     } else {
         $string = 'COM_VIRTUEMART_MAIL_NOT_SEND_SUCCESSFULLY';
     }
     $mainframe->enqueueMessage(tsmText::_($string));
     // Display it all
     $view = $this->getView('vendor', 'html');
     $view->setLayout('mail_confirmed');
     $view->display();
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:61,代码来源:vendor.php

示例6: __construct

 /**
  * constructs a VmModel
  * setMainTable defines the maintable of the model
  *
  * @author Max Milbers
  */
 function __construct()
 {
     parent::__construct();
     //Todo multivendor nasty hack, to get vendor with id 1
     if (tsmConfig::get('multix', 'none') == 'none') {
         $this->setId(1);
     }
     $this->setMainTable('vendors');
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:15,代码来源:vendor.php

示例7: __construct

 function __construct()
 {
     parent::__construct();
     if (tsmConfig::get('shop_is_offline') == '1') {
         vRequest::setVar('layout', 'off_line');
     } else {
         vRequest::setVar('layout', 'default');
     }
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:9,代码来源:virtuemart.php

示例8: getInput

 /**
  * Method to get the field input markup. Use as name the view of the desired layout list + "layout".
  * For example <field name="categorylayout" for all layouts of hte category view.
  *
  * @author   Max Milbers
  * @return	string	The field input markup.
  * @since	2.0.24a
  */
 function getInput()
 {
     tsmConfig::loadJLang('com_tsmart');
     $view = substr($this->fieldname, 0, -6);
     $model = tmsModel::getModel('config');
     $vmLayoutList = $model->getFieldList('products');
     $html = JHtml::_('Select.genericlist', $vmLayoutList, $this->name, 'size=1 width=200', 'value', 'text', array($this->value));
     return $html;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:17,代码来源:vmproductsublayout.php

示例9: getInput

 function getInput()
 {
     tsmConfig::loadConfig();
     tsmConfig::loadJLang('com_tsmart');
     $key = $this->element['key_field'] ? $this->element['key_field'] : 'value';
     $val = $this->element['value_field'] ? $this->element['value_field'] : $this->name;
     $model = tmsModel::getModel('vendor');
     $vendors = $model->getVendors(true, true, false);
     return JHtml::_('select.genericlist', $vendors, $this->name, 'class="inputbox"  size="1"', 'tsmart_vendor_id', 'vendor_name', $this->value, $this->id);
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:10,代码来源:vendor.php

示例10: getInput

 /**
  * Method to get the field input markup for Access Control Lists.
  * This is an overload of the core Rules form field
  * It address the issue where several rules cannot be used in the same configuration file
  */
 protected function getInput()
 {
     tsmConfig::loadConfig();
     JHtml::_('behavior.tooltip');
     if (JVM_VERSION < 3) {
         return $this->vmRulesJ25();
     } else {
         return $this->vmRules();
     }
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:15,代码来源:vmrules.php

示例11: getInput

 /**
  * Method to get the field input markup.
  *
  * @return	string	The field input markup.
  * @since	1.6
  */
 protected function getInput()
 {
     tsmConfig::loadConfig();
     tsmConfig::loadJLang('com_tsmart');
     $categorylist = ShopFunctions::categoryListTree(array($this->value));
     $html = '<select class="inputbox"   name="' . $this->name . '" >';
     $html .= '<option value="0">' . tsmText::_('com_tsmart_CATEGORY_FORM_TOP_LEVEL') . '</option>';
     $html .= $categorylist;
     $html .= "</select>";
     return $html;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:17,代码来源:vmcategory.php

示例12: display

 function display($tpl = null)
 {
     $db = JFactory::getDBO();
     if ($tsmart_media_id = vRequest::getInt('tsmart_media_id')) {
         //$db = JFactory::getDBO();
         $query = 'SELECT `file_url`,`file_title` FROM `#__tsmart_medias` where `tsmart_media_id`=' . $tsmart_media_id;
         $db->setQuery($query);
         $json = $db->loadObject();
         if (isset($json->file_url)) {
             $json->file_url = JURI::root() . $json->file_url;
             $json->msg = 'OK';
             echo vmJsApi::safe_json_encode($json);
         } else {
             $json->msg = '<b>' . tsmText::_('com_tsmart_NO_IMAGE_SET') . '</b>';
             echo json_encode($json);
         }
     } elseif ($custom_jplugin_id = vRequest::getInt('custom_jplugin_id')) {
         $table = '#__extensions';
         $ext_id = 'extension_id';
         $q = 'SELECT `params`,`element` FROM `' . $table . '` WHERE `' . $ext_id . '` = "' . $custom_jplugin_id . '"';
         $db->setQuery($q);
         $this->jCustom = $db->loadObject();
         $customModel = tmsModel::getModel('custom');
         $this->custom = $customModel->getCustom();
         // Get the payment XML.
         $formFile = vRequest::filterPath(VMPATH_ROOT . DS . 'plugins' . DS . 'vmcustom' . DS . $this->jCustom->element . DS . $this->jCustom->element . '.xml');
         if (file_exists($formFile)) {
             tsmConfig::loadJLang('plg_vmpsplugin', false);
             if (!class_exists('vmPlugin')) {
                 require VMPATH_PLUGINLIBS . DS . 'vmplugin.php';
             }
             $filename = 'plg_vmcustom_' . $this->jCustom->element;
             vmPlugin::loadJLang($filename, 'vmcustom', $this->jCustom->element);
             $this->custom = tmsModel::getModel('custom')->getCustom();
             $varsToPush = vmPlugin::getVarsToPushByXML($formFile, 'customForm');
             $this->custom->form = JForm::getInstance($this->jCustom->element, $formFile, array(), false, '//vmconfig | //config[not(//vmconfig)]');
             $this->custom->params = new stdClass();
             foreach ($varsToPush as $k => $field) {
                 if (strpos($k, '_') != 0) {
                     $this->custom->params->{$k} = $field[0];
                 }
             }
             $this->custom->form->bind($this->custom->getProperties());
             $form = $this->custom->form;
             include VMPATH_ADMIN . DS . 'fields' . DS . 'formrenderer.php';
             echo '<input type="hidden" value="' . $this->jCustom->element . '" name="custom_value">';
         } else {
             $this->custom->form = null;
             //VmConfig::$echoDebug = 1;
             vmdebug('File does not exist ' . $formFile);
         }
     }
     jExit();
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:54,代码来源:view.json.php

示例13: getInput

 function getInput()
 {
     tsmConfig::loadConfig();
     $model = tmsModel::getModel('Manufacturer');
     $manufacturers = $model->getManufacturers(true, true, false);
     $emptyOption = JHtml::_('select.option', '', tsmText::_('com_tsmart_LIST_EMPTY_OPTION'), 'tsmart_manufacturer_id', 'mf_name');
     if (!empty($manufacturers) and is_array($manufacturers)) {
         array_unshift($manufacturers, $emptyOption);
     } else {
         $manufacturers = array($emptyOption);
     }
     return JHtml::_('select.genericlist', $manufacturers, $this->name, 'class="inputbox"  size="1"', 'tsmart_manufacturer_id', 'mf_name', $this->value, $this->id);
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:13,代码来源:manufacturer.php

示例14: getInput

 /**
  * Method to get the field input markup. Use as name the view of the desired layout list + "layout".
  * For example <field name="categorylayout" for all layouts of hte category view.
  *
  * @author   Max Milbers
  * @return	string	The field input markup.
  * @since	2.0.24a
  */
 function getInput()
 {
     tsmConfig::loadJLang('com_tsmart');
     $this->view = (string) $this->element['view'];
     if (empty($this->view)) {
         $view = substr($this->fieldname, 0, -6);
     } else {
         $view = $this->view;
     }
     $vmLayoutList = tsmartModelConfig::getLayoutList($view);
     $html = JHtml::_('Select.genericlist', $vmLayoutList, $this->name, 'size=1 width=200', 'value', 'text', array($this->value));
     return $html;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:21,代码来源:vmlayout.php

示例15: getOptions

 protected function getOptions()
 {
     tsmConfig::loadConfig();
     tsmConfig::loadJLang('com_tsmart', false);
     $cModel = tmsModel::getModel('currency');
     $values = $cModel->getVendorAcceptedCurrrenciesList();
     $options[] = JHtml::_('select.option', 0, tsmText::_('com_tsmart_DEFAULT_VENDOR_CURRENCY'));
     $options[] = JHtml::_('select.option', -1, tsmText::_('com_tsmart_SELECTED_MODULE_CURRENCY'));
     foreach ($values as $v) {
         $options[] = JHtml::_('select.option', $v->tsmart_currency_id, $v->currency_txt);
     }
     return $options;
 }
开发者ID:cuongnd,项目名称:etravelservice,代码行数:13,代码来源:vmacceptedcurrency.php


注:本文中的tsmConfig类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。