/** * Build a select list with a specific ordering * * @param integer $value The scalar value * @param integer $id The id for an existing item in the list * @param string $query The query * @param integer $neworder 1 if new and first, -1 if new and last, * 0 or null if existing item * * @return string Html for the ordered list * * @since 11.1 * * @see JHtmlList::ordering * @deprecated 12.1 Use JHtml::_('list.ordering') instead */ public static function specificordering($value, $id, $query, $neworder = 0) { if (is_object($value)) { $value = $value->ordering; } if ($id) { $neworder = 0; } else { if ($neworder) { $neworder = 1; } else { $neworder = -1; } } return JHtmlList::ordering('ordering', $query, '', $value, $neworder); }
/** * Display method * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void */ function display($tpl = null) { $objISUtils = JSNISFactory::getObj('classes.jsn_is_utils'); $objJSNTheme = JSNISFactory::getObj('classes.jsn_is_themes'); $this->_document = JFactory::getDocument(); $lists = array(); $format = JRequest::getVar('view_format', 'temporary'); $showlist_id = JRequest::getInt('showlist_id'); $showcaseTheme = JRequest::getVar('theme', 'showcasethemeclassic'); $model = $this->getModel(); $items = $this->get('data'); $session = JFactory::getSession(); $overallWidthDimensionValue = '%'; $showcaseThemeSession = $session->get('showcaseThemeSession'); $session->clear('showcaseThemeSession'); // GENERAL TAB BEGIN if ($showcaseThemeSession) { $publishShowcase = $showcaseThemeSession['published']; } else { if ($items->published != '') { $publishShowcase = $items->published; } else { $publishShowcase = 1; } } $lists['published'] = JHTML::_('jsnselect.booleanlist', 'published', '', $publishShowcase); $query = 'SELECT ordering AS value, showcase_title AS text FROM #__imageshow_showcase ORDER BY ordering'; $lists['ordering'] = JHtmlList::ordering('ordering', $query, '', $items->showcase_id); //$lists['ordering'] = JHTML::_('list.specificordering', $items, $items->showcase_id, $query ); $generalImagesOrder = array('0' => array('value' => 'forward', 'text' => JText::_('SHOWCASE_GENERAL_FORWARD')), '1' => array('value' => 'backward', 'text' => JText::_('SHOWCASE_GENERAL_BACKWARD')), '2' => array('value' => 'random', 'text' => JText::_('SHOWCASE_GENERAL_RANDOM'))); $dimension = array('0' => array('value' => 'px', 'text' => JText::_('px')), '1' => array('value' => '%', 'text' => JText::_('%'))); // GENERAL TAB END $generalData = array(); if (!empty($showcaseThemeSession)) { $generalData['generalTitle'] = $showcaseThemeSession['showcase_title']; $generalData['generalWidth'] = $showcaseThemeSession['general_overall_width'] . $showcaseThemeSession['overall_width_dimension']; $generalData['generalHeight'] = $showcaseThemeSession['general_overall_height']; } else { if ($items->general_overall_width) { $generalData['generalTitle'] = htmlspecialchars($items->showcase_title); $generalData['generalWidth'] = $items->general_overall_width; $generalData['generalHeight'] = $items->general_overall_height; } else { $generalData['generalTitle'] = ''; $generalData['generalWidth'] = '100%'; $generalData['generalHeight'] = '450'; } } $overallWith = $generalData['generalWidth']; $posPercentageOverallWidth = strpos($overallWith, '%'); if ($posPercentageOverallWidth) { $overallWith = substr($overallWith, 0, $posPercentageOverallWidth + 1); $overallWidthDimensionValue = "%"; } else { $overallWith = (int) $overallWith; $overallWidthDimensionValue = "px"; } $lists['overallWidthDimension'] = JHTML::_('select.genericList', $dimension, 'overall_width_dimension', 'class="overall-width-dimension" style="width: 50px;" onchange="checkOverallWidth();" ' . '', 'value', 'text', $overallWidthDimensionValue); $remoteTheme = $objJSNTheme->compareSources(); $needInstallList = $objJSNTheme->getNeedInstallList($remoteTheme); $localTheme = $objJSNTheme->compareLocalSources(); $needUpdateList = $objJSNTheme->getNeedUpdateList($localTheme); $canAutoDownload = true; $objJSNUtils = JSNISFactory::getObj('classes.jsn_is_utils'); if (!$objJSNUtils->checkEnvironmentDownload()) { $canAutoDownload = false; } $this->assignRef('canAutoDownload', $canAutoDownload); $this->assignRef('needUpdateList', $needUpdateList); $this->assignRef('needInstallList', $needInstallList); $this->assignRef('generalData', $generalData); $this->assignRef('lists', $lists); $this->assignRef('items', $items); $this->_addAssets(); $this->addToolbar(); if (!$this->_checkAction()) { JFactory::getApplication()->redirect('index.php?option=com_imageshow&controller=showcase', JText::_('JLIB_APPLICATION_ERROR_EDIT_NOT_PERMITTED'), 'error'); return false; } parent::display($tpl); }
function display($tpl = null) { VmConfig::loadJLang('com_virtuemart_shoppers', TRUE); // Load the helper(s) $this->loadHelper('html'); $layoutName = JRequest::getWord('layout'); $model = VmModel::getModel(); // The list of fields which can't be toggled //$lists['coreFields']= array( 'name','username', 'email', 'password', 'password2' ); $lists['coreFields'] = $model->getCoreFields(); if ($layoutName == 'edit') { $editor = JFactory::getEditor(); $userField = $model->getUserfield(); $this->SetViewTitle('USERFIELD', $userField->name); $this->userFieldPlugin = ''; if ($userField->virtuemart_userfield_id < 1) { // Insert new userfield $this->assignRef('ordering', JText::_('COM_VIRTUEMART_NEW_ITEMS_PLACE')); $userFieldValues = array(); $attribs = ''; $lists['type'] = JHTML::_('select.genericlist', $this->_getTypes(), 'type', $attribs, 'type', 'text', $userField->type); } else { // Update existing userfield // Ordering dropdown $qry = 'SELECT ordering AS value, name AS text' . ' FROM #__virtuemart_userfields' . ' ORDER BY ordering'; // $ordering = JHTML::_('list.specificordering', $userField, $userField->virtuemart_userfield_id, $qry); $ordering = JHtmlList::ordering('ordering', $qry, '', $userField->virtuemart_userfield_id, 0); $this->assignRef('ordering', $ordering); $userFieldValues = $model->getUserfieldValues(); $lists['type'] = $this->_getTypes($userField->type) . '<input id="type" type="hidden" name="type" value="' . $userField->type . '" />'; if (strpos($userField->type, 'plugin') !== false) { $this->userFieldPlugin = self::renderUserfieldPlugin(substr($userField->type, 6), $userField); } } JToolBarHelper::divider(); JToolBarHelper::save(); JToolBarHelper::apply(); JToolBarHelper::cancel(); $notoggle = in_array($userField->name, $lists['coreFields']) ? 'class="readonly"' : ''; // Vendor selection if (Vmconfig::get('multix', 'none') !== 'none') { $lists['vendors'] = ShopFunctions::renderVendorList($userField->virtuemart_vendor_id); } // $vendor_model = VmModel::getModel('vendor'); // $vendor_list = $vendor_model->getVendors(); // $lists['vendors'] = JHTML::_('select.genericlist', $vendor_list, 'virtuemart_vendor_id', '', 'virtuemart_vendor_id', 'vendor_name', $userField->virtuemart_vendor_id); // Shopper groups for EU VAT Id $shoppergroup_model = VmModel::getModel('shoppergroup'); $shoppergroup_list = $shoppergroup_model->getShopperGroups(true); array_unshift($shoppergroup_list, '0'); $lists['shoppergroups'] = JHTML::_('select.genericlist', $shoppergroup_list, 'virtuemart_shoppergroup_id', '', 'virtuemart_shoppergroup_id', 'shopper_group_name', $model->_params->get('virtuemart_shoppergroup_id')); // Minimum age select $ages = array(); for ($i = 13; $i <= 25; $i++) { $ages[] = array('key' => $i, 'value' => $i . ' ' . JText::_('COM_VIRTUEMART_YEAR_S')); } $lists['minimum_age'] = JHTML::_('select.genericlist', $ages, 'minimum_age', '', 'key', 'value', $model->_params->get('minimum_age', 18)); // Web address types $webaddress_types = array(array('key' => 0, 'value' => JText::_('COM_VIRTUEMART_USERFIELDS_URL_ONLY')), array('key' => 2, 'value' => JText::_('COM_VIRTUEMART_USERFIELDS_HYPERTEXT_URL'))); $lists['webaddresstypes'] = JHTML::_('select.genericlist', $webaddress_types, 'webaddresstype', '', 'key', 'value', $model->_params->get('webaddresstype')); // Userfield values if (($n = count($userFieldValues)) < 1) { $lists['userfield_values'] = '<tr>' . '<td><input type="text" value="" name="vValues[0]" /></td>' . '<td><input type="text" size="50" value="" name="vNames[0]" /></td>' . '</tr>'; $i = 1; } else { $lists['userfield_values'] = ''; $lang = JFactory::getLanguage(); for ($i = 0; $i < $n; $i++) { $translate = $lang->hasKey($userFieldValues[$i]->fieldtitle) ? " (" . JText::_($userFieldValues[$i]->fieldtitle) . ")" : ""; $lists['userfield_values'] .= '<tr>' . '<td><input type="text" value="' . $userFieldValues[$i]->fieldvalue . '" name="vValues[' . $i . ']" /></td>' . '<td><input type="text" size="50" value="' . $userFieldValues[$i]->fieldtitle . '" name="vNames[' . $i . ']" />' . $translate . '<input type="button" class="button deleteRow" value=" - " /></td>' . '</tr>'; } } $this->assignRef('valueCount', --$i); // vmdebug('$userField->shipment',$userField); // Toggles $lists['required'] = VmHTML::row('booleanlist', 'COM_VIRTUEMART_FIELDMANAGER_REQUIRED', 'required', $userField->required, $notoggle); $lists['published'] = VmHTML::row('booleanlist', 'COM_VIRTUEMART_PUBLISHED', 'published', $userField->published, $notoggle); $lists['registration'] = VmHTML::row('booleanlist', 'COM_VIRTUEMART_FIELDMANAGER_SHOW_ON_REGISTRATION', 'registration', $userField->registration, $notoggle); $lists['shipment'] = VmHTML::row('booleanlist', 'COM_VIRTUEMART_FIELDMANAGER_SHOW_ON_SHIPPING', 'shipment', $userField->shipment, $notoggle); $lists['account'] = VmHTML::row('booleanlist', 'COM_VIRTUEMART_FIELDMANAGER_SHOW_ON_ACCOUNT', 'account', $userField->account, $notoggle); $lists['readonly'] = VmHTML::row('booleanlist', 'COM_VIRTUEMART_USERFIELDS_READONLY', 'readonly', $userField->readonly, $notoggle); $this->lists = $lists; $this->userField = $userField; $this->userFieldValues = $userFieldValues; $this->editor = $editor; } else { if (JRequest::getWord('format', '') === 'raw') { $tpl = 'results'; } else { JToolBarHelper::title(JText::_('COM_VIRTUEMART_MANAGE_USER_FIELDS')); JToolBarHelper::custom('toggle.registration.1', 'publish', '', 'COM_VIRTUEMART_FIELDMANAGER_SHOW_REGISTRATION'); JToolBarHelper::custom('toggle.registration.0', 'unpublish', '', 'COM_VIRTUEMART_FIELDMANAGER_HIDE_REGISTRATION'); JToolBarHelper::custom('toggle.shipment.1', 'publish', '', 'COM_VIRTUEMART_FIELDMANAGER_SHOW_SHIPPING'); JToolBarHelper::custom('toggle.shipment.0', 'unpublish', '', 'COM_VIRTUEMART_FIELDMANAGER_HIDE_SHIPPING'); JToolBarHelper::custom('toggle.account.1', 'publish', '', 'COM_VIRTUEMART_FIELDMANAGER_SHOW_ACCOUNT'); JToolBarHelper::custom('toggle.account.0', 'unpublish', '', 'COM_VIRTUEMART_FIELDMANAGER_HIDE_ACCOUNT'); JToolBarHelper::divider(); // JToolBarHelper::deleteList(); JToolBarHelper::custom('toggle.required.1', 'publish', '', 'COM_VIRTUEMART_FIELDMANAGER_REQUIRE'); JToolBarHelper::custom('toggle.required.0', 'unpublish', '', 'COM_VIRTUEMART_FIELDMANAGER_UNREQUIRE'); $this->addStandardDefaultViewCommands(); } $this->addStandardDefaultViewLists($model, 'ordering', 'ASC'); $this->userfieldsList = $model->getUserfieldsList(); $this->pagination = $model->getPagination(); } $this->lists['coreFields'] = $lists['coreFields']; parent::display($tpl); if ($tpl === 'results') { echo $this->AjaxScripts(); } }
/** * Display method * * @param string $tpl The name of the template file to parse; automatically searches through the template paths. * * @return void */ public function display($tpl = null) { $images = array(); $catid = 0; $tmpjs = ''; $albumID = ''; $lists = array(); $countImage = 0; $canAutoDownload = true; $this->_document = JFactory::getDocument(); $objJSNUtils = JSNISFactory::getObj('classes.jsn_is_utils'); $objJSNImages = JSNISFactory::getObj('classes.jsn_is_images'); $objJSNJSLanguages = JSNISFactory::getObj('classes.jsn_is_jslanguages'); $objImages = JSNISFactory::getObj('classes.jsn_is_images'); $objJSNMsg = JSNISFactory::getObj('classes.jsn_is_message'); $model = $this->getModel(); $items = $this->get('data'); // Get messages $msgs = ''; $msgs = $objJSNMsg->getList('SHOWLISTS'); $msgs = count($msgs) ? JSNUtilsMessage::showMessages($msgs) : ''; if (isset($items->image_source_name) && $items->image_source_name != '') { $imageSource = JSNISFactory::getSource($items->image_source_name, $items->image_source_type, $items->showlist_id); $cat = $objImages->getAllCatShowlist($items->showlist_id); if (!empty($cat)) { $catid = $cat[0]; $config = array('album' => $catid); $sync = $imageSource->getShowlistMode(); if ($sync == 'sync') { $images = $imageSource->loadImages($config); } else { $images = $imageSource->loadImages($config); } } if ($imageSource->getShowlistMode() == 'sync') { $rmcat = 'JSNISImageGrid.removecatSelected();'; } else { $rmcat = ''; } $totalimage = count($images); if ($totalimage) { $imageInfo = (array) @$images->images[0]; $albumID = @$imageInfo['album_extid']; } $jscode = "\n\t\t\t\tvar JSNISImageGrid;\n\t\t\t\tvar initImageGrid = false;\n\t\t\t\tvar baseUrl = '" . JURI::root() . "';\n\t\t\t\tvar VERSION_EDITION_NOTICE = \"" . JText::_('VERSION_EDITION_NOTICE') . "\";\n\t\t\t(function(\$){\n\t\t\t\tfunction jsnisOpenTree(child)\n\t\t\t\t{\n\t\t\t\t\tvar parent = child.parent().parent();\n\n\t\t\t\t\tif (parent.attr('id') == 'jsn-jtree-categories' || parent.attr('id') == undefined) return;\n\n\t\t\t\t\tif (parent.hasClass('secondchild'))\n\t\t\t\t\t{\n\t\t\t\t\t\tparent.parent().parent().removeClass('jsn-jtree-close').addClass('jsn-jtree-open');\n\t\t\t\t\t\tparent.removeClass('jsn-jtree-close').addClass('jsn-jtree-open');\n\t\t\t\t\t\tparent.find('>ul').css('display','block');\n\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tparent.removeClass('jsn-jtree-close').addClass('jsn-jtree-open');\n\t\t\t\t\t\tparent.find('>ul').css('display','block');\n\t\t\t\t\t\tjsnisOpenTree(parent);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfunction jsnisReshowTree(tree)\n\t\t\t\t{\n\t\t\t\t\ttree.children('li').each(function(){\n\n\t\t\t\t\t\tif (\$(this).children('ul').length)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (\$(this).hasClass('catselected'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tjsnisOpenTree(\$(this));\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tvar treeChild = \$(this).children('ul');\n\t\t\t\t\t\t\tjsnisReshowTree(treeChild);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (\$(this).hasClass('catselected'))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tjsnisOpenTree(\$(this));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t}\n\t\t\t\t\$('#dialogbox:ui-dialog').dialog('destroy');\n\t\t\t\t\$('#dialogbox2:ui-dialog').dialog('destroy');\n\t\t\t\t\$(document).ready(function ()\n\t\t\t\t{\n\t\t\t\t\t\$('#jsn_is_showlist_tabs').tabs({\n\t\t\t\t\t\tactivate: function(event, ui)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(ui.newPanel.attr('id') == 'tab-showlist-images' && !initImageGrid)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tJSNISImageGrid = \$.JSNISImageGridGetInstaces({\n\t\t\t\t\t\t\t\t\tshowListID : '" . $items->showlist_id . "',\n\t\t\t\t\t\t\t\t\tsourceName : '" . $items->image_source_name . "',\n\t\t\t\t\t\t\t\t\tsourceType : '" . $items->image_source_type . "',\n\t\t\t\t\t\t\t\t\tselectMode : '" . $imageSource->getShowlistMode() . "',\n\t\t\t\t\t\t\t\t\tpagination\t : '" . $imageSource->_source['sourceDefine']->pagination . "',\n\t\t\t\t\t\t\t\t\tlayoutHeight : 500,\n\t\t\t\t\t\t\t\t\tlayoutWidth : '100%'\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t" . $rmcat . "\n\t\t\t\t\t\t\t\t" . $tmpjs . "\n\t\t\t\t\t\t\t\tJSNISImageGrid.initialize();\n\t\t\t\t\t\t\t\tif(!\$('.media-item').length && !\$('.jtree-selected', \$('#images')).length)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tJSNISImageGrid.cookie.set('rate_of_west', 58);\n\t\t\t\t\t\t\t\t\tJSNISImageGrid.UILayout.sizePane('west', '58%');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\$('#jsn-jtree-categories').children('ul').each(function(){\n\t\t\t\t\t\t\t\t\t\$(this).children('li').each(function(){\n\t\t\t\t\t\t\t\t\t\t\$(this).children('ul').each(function(){\n\t\t\t\t\t\t\t\t\t\t\t\$(this).children('li').each(function(){\n\t\t\t\t\t\t\t\t\t\t\t\t\$(this).find('ul').css('display','none');\n\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\t\$('#jsn-jtree-categories').children('ul').each(function(){\n\t\t\t\t\t\t\t\t\tjsnisReshowTree(\$(this));\n\t\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t\tinitImageGrid = true;\n\t\t\t\t\t\t\t\tJSNISImageGrid.overrideSaveEvent();\n\t\t\t\t\t\t\t\tJSNISImageShow.getScriptCheckThumb(" . $items->showlist_id . ");\n\t\t\t\t\t\t\t\t\$(window).trigger('resize');\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t})((typeof JoomlaShine != 'undefined' && typeof JoomlaShine.jQuery != 'undefined') ? JoomlaShine.jQuery : jQuery);"; $this->_document->addScriptDeclaration($objJSNJSLanguages->loadLang()); $this->_document->addScriptDeclaration($jscode); $showlistMode = $imageSource->getShowlistMode(); $this->assignRef('selectMode', $showlistMode); } else { $jscode = "var baseUrl = '" . JURI::root() . "'"; $this->_document->addScriptDeclaration($jscode); } if ($items->showlist_id && $items->showlist_id != '') { if ($objJSNImages->checkImageLimition($items->showlist_id)) { $msg = JText::_('SHOWLIST_YOU_HAVE_REACHED_THE_LIMITATION_OF_10_IMAGES_IN_FREE_EDITION'); JError::raiseNotice(100, $msg); } $countImage = $objJSNImages->countImagesShowList($items->showlist_id); $countImage = $countImage[0]; } $authorizationCombo = array('0' => array('value' => '0', 'text' => JText::_('SHOWLIST_NO_MESSAGE')), '1' => array('value' => '1', 'text' => JText::_('SHOWLIST_JOOMLA_ARTICLE'))); $imagesLoadingOrder = array('0' => array('value' => 'forward', 'text' => JText::_('SHOWLIST_GENERAL_FORWARD')), '1' => array('value' => 'backward', 'text' => JText::_('SHOWLIST_GENERAL_BACKWARD')), '2' => array('value' => 'random', 'text' => JText::_('SHOWLIST_GENERAL_RANDOM'))); $showExifData = array('0' => array('value' => 'no', 'text' => JText::_('SHOWLIST_SHOW_EXIF_DATA_NO')), '1' => array('value' => 'title', 'text' => JText::_('SHOWLIST_SHOW_EXIF_DATA_TITLE')), '2' => array('value' => 'description', 'text' => JText::_('SHOWLIST_SHOW_EXIF_DATA_DESCRIPTION'))); $lists['imagesLoadingOrder'] = JHTML::_('select.genericList', $imagesLoadingOrder, 'image_loading_order', 'class="inputbox" ' . '', 'value', 'text', $items->image_loading_order); $lists['showExifData'] = JHTML::_('select.genericList', $showExifData, 'show_exif_data', 'class="inputbox" ' . '', 'value', 'text', $items->show_exif_data); $lists['authorizationCombo'] = JHTML::_('select.genericList', $authorizationCombo, 'authorization_status', 'class="inputbox" onchange="JSNISImageShow.ShowListCheckAuthorizationContent();"' . '', 'value', 'text', $items->authorization_status); $lists['published'] = JHTML::_('jsnselect.booleanlist', 'published', '', $items->published != '' ? $items->published : 1); $lists['overrideTitle'] = JHTML::_('jsnselect.booleanlist', 'override_title', '', $items->override_title); $lists['overrideDesc'] = JHTML::_('jsnselect.booleanlist', 'override_description', '', $items->override_description); $lists['overrideLink'] = JHTML::_('jsnselect.booleanlist', 'override_link', '', $items->override_link); $query = 'SELECT ordering AS value, showlist_title AS text' . ' FROM #__imageshow_showlist' . ' ORDER BY ordering'; $lists['ordering'] = JHtmlList::ordering('ordering', $query, '', $items->showlist_id); if (!$objJSNUtils->checkEnvironmentDownload()) { $canAutoDownload = false; } $image_model = $this->getModel(); $categories = $model->getTreeMenu(); $articlesCatgories = $model->getTreeArticle(); $this->assign('categories', $categories); $this->assign('articles_catgories', $articlesCatgories); $this->assignRef('canAutoDownload', $canAutoDownload); $this->assignRef('lists', $lists); $this->assignRef('items', $items); $this->assignRef('imageSource', $imageSource); $this->assignRef('countImage', $countImage); $this->assignRef('images', $images); $this->assignRef('catSelected', $catid); $this->assignRef('albumID', $albumID); $this->assignRef('totalImage', $totalimage); $this->assignRef('msgs', $msgs); $this->_addAssets(); $this->addToolbar(); if (!$this->_checkAction()) { JFactory::getApplication()->redirect('index.php?option=com_imageshow&controller=showlist', JText::_('JLIB_APPLICATION_ERROR_EDIT_NOT_PERMITTED'), 'error'); return false; } parent::display($tpl); }
function getOrdering($item) { $query = 'SELECT ordering AS value, title AS text' . ' FROM #__jav_forums' . ' ORDER BY ordering'; if (version_compare(JVERSION, '3.0', 'ge')) { $neworder = 0; if (is_object($item)) { $item = $item->ordering; } if (isset($item->id)) { $neworder = 0; } else { if ($neworder) { $neworder = 1; } else { $neworder = -1; } } return JHtmlList::ordering('ordering', $query, '', $item, $neworder); } else { return JHTML::_('list.specificordering', $item, $item->id, $query); } }