function display($tpl = null) { $db = JFactory::getDBO(); if ($field = JRequest::getVar('field')) { if (strpos($field, 'plugin') !== false) { if (JVM_VERSION === 1) { $table = '#__plugins'; //$ext_id = 'id'; } else { $table = '#__extensions'; //$ext_id = 'extension_id'; } $field = substr($field, 6); $q = 'SELECT `params`,`element` FROM `' . $table . '` WHERE `element` = "' . $field . '"'; $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, $this->plugin->element, 'plugin', 'vmuserfield'); $lang = JFactory::getLanguage(); $filename = 'plg_vmuserfield_' . $this->plugin->element; if (VmConfig::get('enableEnglish', 1)) { $lang->load($filename, JPATH_ADMINISTRATOR, 'en-GB', true); } $lang->load($filename, JPATH_ADMINISTRATOR, $lang->getDefault(), true); $lang->load($filename, JPATH_ADMINISTRATOR, null, true); echo $parameters->render(); //echo '<input type="hidden" value="'.$this->plugin->element.'" name="custom_value">'; jExit(); } } jExit(); }
function display($tpl = null) { $db = JFactory::getDBO(); if ($field = JRequest::getVar('field')) { if (strpos($field, 'plugin') !== false) { if (JVM_VERSION === 1) { $table = '#__plugins'; //$ext_id = 'id'; } else { $table = '#__extensions'; //$ext_id = 'extension_id'; } $field = substr($field, 6); $q = 'SELECT `params`,`element` FROM `' . $table . '` WHERE `element` = "' . $field . '"'; $db->setQuery($q); $this->plugin = $db->loadObject(); $this->loadHelper('parameterparser'); $parameters = new vmParameters($this->plugin, $this->plugin->element, 'plugin', 'vmuserfield'); $lang = JFactory::getLanguage(); $filename = 'plg_vmuserfield_' . $this->plugin->element; $lang->load($filename, JPATH_ADMINISTRATOR); echo $parameters->render(); //echo '<input type="hidden" value="'.$this->plugin->element.'" name="custom_value">'; jExit(); } } jExit(); }
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(); }
function renderUserfieldPlugin($element, $params) { $db = JFactory::getDBO(); if (JVM_VERSION === 1) { $table = '#__plugins'; $jelement = 'element'; } else { $table = '#__extensions'; $jelement = 'element'; } $q = 'SELECT `params`,`element` FROM `' . $table . '` WHERE `' . $jelement . '` = "' . $element . '"'; $db->setQuery($q); $this->plugin = $db->loadObject(); $this->loadHelper('parameterparser'); $parameters = new vmParameters($params, $this->plugin->element, 'plugin', 'vmuserfield'); $lang = JFactory::getLanguage(); $filename = 'plg_vmuserfield_' . $this->plugin->element; $lang->load($filename, JPATH_ADMINISTRATOR); return $parameters->render(); }
<?php /** * * Description * * @package VirtueMart * @subpackage Paymentmethod * @author Max Milbers * @link http://www.virtuemart.net * @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved. * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php * VirtueMart is free software. This version may have been modified pursuant * to the GNU General Public License, and as distributed it includes or * is derivative of works licensed under the GNU General Public License or * other free or open source software licenses. * @version $Id: edit_config.php 6043 2012-05-21 21:40:56Z Milbo $ */ // Check to ensure this file is included in Joomla! defined('_JEXEC') or die('Restricted access'); if ($this->payment->payment_jplugin_id) { //$parameters = new vmParameters($this->paym->payment_params, JPATH_PLUGINS.DS.'vmpayment'.DS.basename($this->paym->payment_element).'.xml', 'plugin' ); $parameters = new vmParameters($this->payment, $this->payment->payment_element, 'plugin', 'vmpayment'); echo $rendered = $parameters->render(); } else { echo JText::_('COM_VIRTUEMART_SELECT_PAYMENT_METHOD'); }
$title = ' <img src="' . VM_THEMEURL . 'images/administration/header/icon-48-config.png" align="middle" border="0" alt="' . $VM_LANG->_('VM_ADMIN_CFG_THEME_SETTINGS') . '" /> '; $title .= $VM_LANG->_('VM_ADMIN_CFG_THEME_SETTINGS'); //First create the object and let it print a form heading $formObj = new formFactory($title); //Then Start the form $formObj->startForm(); $ps_html->writableIndicator($themepath . '/theme.config.php', 'text-align:left;width:78%;'); vmCommonHTML::loadExtjs(); ?> <fieldset style="width: 80%"> <legend><?php echo $VM_LANG->_('VM_ADMIN_CFG_THEME_PARAMETERS'); ?> </legend> <table class="adminform"> <tr> <td> <?php echo $params->render(); ?> </td> </tr> </table> </fieldset> <?php // Add necessary hidden fields $formObj->hiddenField('ajax_request', $only_page); // Close the form $formObj->finishForm('writeThemeConfig', 'store.index', $option);