本文整理汇总了PHP中tsmConfig::loadJLang方法的典型用法代码示例。如果您正苦于以下问题:PHP tsmConfig::loadJLang方法的具体用法?PHP tsmConfig::loadJLang怎么用?PHP tsmConfig::loadJLang使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tsmConfig
的用法示例。
在下文中一共展示了tsmConfig::loadJLang方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: 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);
}
示例2: __construct
public function __construct()
{
parent::__construct();
$this->useSSL = tsmConfig::get('useSSL', 0);
$this->useXHTML = false;
tsmConfig::loadJLang('com_virtuemart_shoppers', TRUE);
}
示例3: 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);
}
示例4: 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;
}
示例5: 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);
}
示例6: 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;
}
示例7: 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();
}
示例8: 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;
}
示例9: 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;
}
示例10: getInput
/**
* Method to get the field input markup.
*
* @return string The field input markup.
*
* @since 11.1
*/
protected function getInput()
{
tsmConfig::loadConfig();
tsmConfig::loadJLang('com_tsmart');
$option = vRequest::getCmd('option');
if (!function_exists('curl_init') or !function_exists('curl_exec')) {
return tsmText::_('com_tsmart_PS_CURL_LIBRARY_NOT_INSTALLED');
} else {
$js = "\n jQuery(document).ready(function( \$ ) {\n \$( '#vmcurl' ) .closest('.control-group').hide();\n });\n ";
$doc = JFactory::getDocument();
$doc->addScriptDeclaration($js);
return '<span id="vmcurl"></span>';
}
}
示例11: display
/**
* Todo do we need that anylonger? that way.
* @see JController::display()
*/
public function display($cachable = false, $urlparams = false)
{
$format = vRequest::getCmd('format', 'html');
if ($format == 'pdf') {
$viewName = 'pdf';
} else {
$viewName = 'orders';
}
tsmConfig::loadJLang('com_virtuemart_orders', TRUE);
tsmConfig::loadJLang('com_virtuemart_shoppers', TRUE);
$view = $this->getView($viewName, $format);
// Display it all
$view->display();
}
示例12: __construct
/**
* constructs a VmModel
* setMainTable defines the maintable of the model
* @author Max Milbers
*/
function __construct()
{
parent::__construct('tsmart_userfield_id');
$this->setMainTable('userfields');
$this->setToggleName('required');
$this->setToggleName('cart');
$this->setToggleName('shipment');
$this->setToggleName('account');
// Instantiate the Helper class
self::$_cache_ordered = null;
self::$_cache_named = array();
$this->_selectedOrdering = 'ordering';
$this->_selectedOrderingDir = 'ASC';
tsmConfig::loadJLang('com_tsmart_shoppers', TRUE);
}
示例13: getOptions
protected function getOptions()
{
tsmConfig::loadJLang('com_tsmart_orders', TRUE);
$options = array();
$db = JFactory::getDBO();
$query = 'SELECT `order_status_code` AS value, `order_status_name` AS text
FROM `#__tsmart_orderstates`
WHERE `tsmart_vendor_id` = 1
ORDER BY `ordering` ASC ';
$db->setQuery($query);
$values = $db->loadObjectList();
foreach ($values as $value) {
$options[] = JHtml::_('select.option', $value->value, tsmText::_($value->text));
}
return $options;
}
示例14: getInput
function getInput()
{
defined('DS') or define('DS', DIRECTORY_SEPARATOR);
if (!class_exists('tsmConfig')) {
require JPATH_ROOT . DS . 'administrator' . DS . 'components' . DS . 'com_tsmart' . DS . 'helpers' . DS . 'config.php';
}
if (!class_exists('tmsModel')) {
require VMPATH_ADMIN . DS . 'helpers' . DS . 'tsmmodel.php';
}
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('Orderstatus');
$orderStatus = $model->getOrderStatusList(true);
foreach ($orderStatus as $orderState) {
$orderState->order_status_name = tsmText::_($orderState->order_status_name);
}
return JHtml::_('select.genericlist', $orderStatus, $this->name, 'class="inputbox" multiple="true" size="1"', 'order_status_code', 'order_status_name', $this->value, $this->id);
}
示例15: getInput
protected function getInput()
{
tsmConfig::loadConfig();
tsmConfig::loadJLang('com_tsmart');
if (!is_array($this->value)) {
$this->value = array($this->value);
}
$categorylist = ShopFunctions::categoryListTree($this->value);
$name = $this->name;
if ($this->multiple) {
$name = $this->name;
$this->multiple = ' multiple="multiple" ';
}
$html = '<select class="inputbox" name="' . $name . '" ' . $this->multiple . ' >';
if (!$this->multiple) {
$html .= '<option value="0">' . tsmText::_('com_tsmart_CATEGORY_FORM_TOP_LEVEL') . '</option>';
}
$html .= $categorylist;
$html .= "</select>";
return $html;
}