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


PHP vmPlugin::loadJLang方法代码示例

本文整理汇总了PHP中vmPlugin::loadJLang方法的典型用法代码示例。如果您正苦于以下问题:PHP vmPlugin::loadJLang方法的具体用法?PHP vmPlugin::loadJLang怎么用?PHP vmPlugin::loadJLang使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在vmPlugin的用法示例。


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

示例1: display

	function display($tpl = null) {
			$db = JFactory::getDBO();
		if ( $virtuemart_media_id = vRequest::getInt('virtuemart_media_id') ) {
			//$db = JFactory::getDBO();
			$query='SELECT `file_url`,`file_title` FROM `#__virtuemart_medias` where `virtuemart_media_id`='.$virtuemart_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 json_encode($json);
			} else {
				$json->msg =  '<b>'.vmText::_('COM_VIRTUEMART_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 = VmModel::getModel('custom');
			$this->custom = $customModel -> getCustom();

			// Get the payment XML.
			$formFile	= JPath::clean( VMPATH_ROOT .DS. 'plugins' .DS. 'vmcustom' .DS . $this->jCustom->element . DS . $this->jCustom->element . '.xml');
			if (file_exists($formFile)){
				VmConfig::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 = VmModel::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:kosmosby,项目名称:medicine-prof,代码行数:58,代码来源:view.json.php

示例2: display

 function display($tpl = null)
 {
     $db = JFactory::getDBO();
     if ($field = vRequest::getVar('field')) {
         if (strpos($field, 'plugin') !== false) {
             JForm::addFieldPath(JPATH_VM_ADMINISTRATOR . DS . 'fields');
             $table = '#__extensions';
             $field = substr($field, 6);
             $q = 'SELECT `params`,`element`,`type` FROM `' . $table . '` WHERE `element` = "' . $field . '"';
             $db->setQuery($q);
             $this->userField = $db->loadObject();
             //$this->userField->element = substr($this->userField->type, 6);
             if (!class_exists('vmPlugin')) {
                 require JPATH_VM_PLUGINS . DS . 'vmplugin.php';
             }
             vmPlugin::loadJLang('plg_vmuserfield_' . $this->userField->element, 'vmuserfield', $this->userField->element);
             $path = JPATH_ROOT . DS . 'plugins' . DS . 'vmuserfield' . DS . $this->userField->element . DS . $this->userField->element . '.xml';
             // Get the payment XML.
             $formFile = JPath::clean($path);
             if (file_exists($formFile)) {
                 if (!class_exists('VmConfig')) {
                     require JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_virtuemart' . DS . 'helpers' . DS . 'config.php';
                 }
                 if (!class_exists('VmTable')) {
                     require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'vmtable.php';
                 }
                 $this->userField->form = JForm::getInstance($this->userField->element, $formFile, array(), false, '//vmconfig | //config[not(//vmconfig)]');
                 $this->userField->params = new stdClass();
                 $varsToPush = vmPlugin::getVarsToPushByXML($formFile, 'customForm');
                 /*
                 					$this->userField->params->userfield_params = $this->userField->params;
                 					VmTable::bindParameterable($this->userField->params,'userfield_params',$varsToPush);*/
                 if (empty($this->userField->userfield_params)) {
                     $this->userField->userfield_params = '';
                 }
                 $this->userField->params->userfield_params = $this->userField->userfield_params;
                 VmTable::bindParameterable($this->userField->params, 'userfield_params', $varsToPush);
                 $this->userField->form->bind($this->userField);
             } else {
                 $this->userField->form = false;
                 vmdebug('renderUserfieldPlugin could not find xml for ' . $this->userField->type . ' at ' . $path);
             }
             //vmdebug('renderUserfieldPlugin ',$this->userField->form);
             if ($this->userField->form) {
                 $form = $this->userField->form;
                 ob_start();
                 include JPATH_VM_ADMINISTRATOR . DS . 'fields' . DS . 'formrenderer.php';
                 $body = ob_get_contents();
                 ob_end_clean();
                 echo $body;
             }
         }
     }
     jExit();
 }
开发者ID:lenard112,项目名称:cms,代码行数:55,代码来源:view.json.php

示例3: display

 function display($tpl = null)
 {
     $db = JFactory::getDBO();
     if ($virtuemart_media_id = JRequest::getInt('virtuemart_media_id')) {
         //$db = JFactory::getDBO();
         $query = 'SELECT `file_url`,`file_title` FROM `#__virtuemart_medias` where `virtuemart_media_id`=' . $virtuemart_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 json_encode($json);
         } else {
             $json->msg = '<b>' . JText::_('COM_VIRTUEMART_NO_IMAGE_SET') . '</b>';
             echo json_encode($json);
         }
     } elseif ($custom_jplugin_id = JRequest::getInt('custom_jplugin_id')) {
         if (JVM_VERSION === 1) {
             $table = '#__plugins';
             $ext_id = 'id';
         } else {
             $table = '#__extensions';
             $ext_id = 'extension_id';
         }
         $q = 'SELECT `params`,`element` FROM `' . $table . '` WHERE `' . $ext_id . '` = "' . $custom_jplugin_id . '"';
         $db->setQuery($q);
         $this->plugin = $db->loadObject();
         if (!class_exists('vmParameters')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'parameterparser.php';
         }
         $parameters = new vmParameters($this->plugin->params, $this->plugin->element, 'plugin', 'vmcustom');
         if (!class_exists('vmPlugin')) {
             require JPATH_VM_ADMINISTRATOR . DS . 'plugins' . DS . 'vmplugin.php';
         }
         $filename = 'plg_vmcustom_' . $this->plugin->element;
         vmPlugin::loadJLang($filename, 'vmcustom', $this->plugin->element);
         echo $parameters->render();
         echo '<input type="hidden" value="' . $this->plugin->element . '" name="custom_value">';
         jExit();
     }
     jExit();
 }
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:42,代码来源:view.json.php

示例4: renderInstalledCustomPlugins

 function renderInstalledCustomPlugins($selected)
 {
     $db = JFactory::getDBO();
     $table = '#__extensions';
     $enable = 'enabled';
     $ext_id = 'extension_id';
     //$q = 'SELECT * FROM `'.$table.'` WHERE `folder` = "vmcustom" AND `'.$enable.'`="1" ';
     $q = 'SELECT * FROM `' . $table . '` WHERE `folder` = "vmcustom" ';
     $db->setQuery($q);
     $results = $db->loadAssocList($ext_id);
     if (!class_exists('vmPlugin')) {
         require VMPATH_ADMIN . DS . 'plugins' . DS . 'vmplugin.php';
     }
     foreach ($results as $result) {
         //$filename = 'plg_' .strtolower ( $result['name']).'.sys';
         //$lang->load($filename, JPATH_ADMINISTRATOR);
         $filename = 'plg_' . strtolower($result['name']) . '.sys';
         vmPlugin::loadJLang($filename, 'vmcustom', $result['name']);
     }
     return VmHTML::select('custom_jplugin_id', $results, $selected, "", $ext_id, 'name');
     //return JHtml::_('select.genericlist', $result, 'custom_jplugin_id', null, $ext_id, 'name', $selected);
 }
开发者ID:naka211,项目名称:studiekorrektur,代码行数:22,代码来源:view.html.php


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