AAAAcomponentlayouts.php000066600000005366151372620150010720 0ustar00setQuery($query); $template = $db->loadResult(); if ($view = $node->attributes('view') && $extn = $node->attributes('extension')) { $view = preg_replace('#\W#', '', $view); $extn = preg_replace('#\W#', '', $extn); $path1 = JPATH_SITE . '/components/' . $extn . '/views/' . $view . '/tmpl'; $path2 = JPATH_SITE . '/templates/' . $template . '/html/' . $extn . '/' . $view; $options[] = JHtml::_('select.option', '', JText::_('JOPTION_USE_MENU_REQUEST_SETTING')); } if ($path1 && $path2) { jimport('joomla.filesystem.file'); $path1 = JPath::clean($path1); $path2 = JPath::clean($path2); $files = JFolder::files($path1, '^[^_]*\.php$'); foreach ($files as $file) { $options[] = JHtml::_('select.option', JFile::stripExt($file)); } if (is_dir($path2) && $files = JFolder::files($path2, '^[^_]*\.php$')) { $options[] = JHtml::_('select.optgroup', JText::_('JOPTION_FROM_DEFAULT_TEMPLATE')); foreach ($files as $file) { $options[] = JHtml::_('select.option', JFile::stripExt($file)); } $options[] = JHtml::_('select.optgroup', JText::_('JOPTION_FROM_DEFAULT_TEMPLATE')); } } // Merge any additional options in the XML definition. $options = array_merge(parent::_getOptions($node), $options); return $options; } } usergroup.php000066600000003366151372620150007326 0ustar00attributes('size')) { $attribs .= 'size="' . $v . '"'; } if ($v = $node->attributes('class')) { $attribs .= 'class="' . $v . '"'; } else { $attribs .= 'class="inputbox"'; } if ($m = $node->attributes('multiple')) { $attribs .= 'multiple="multiple"'; $ctrl .= '[]'; //$value = implode('|',) } //array_unshift($editors, JHtml::_('select.option', '', '- '. JText::_('SELECT_EDITOR') .' -')); return JHtml::_('access.usergroup', $ctrl, $value, $attribs, false); } } spacer.php000066600000003452151372620150006544 0ustar00getQuery(true); $query->select('a.lang_code AS value, a.title AS text, a.title_native'); $query->from('#__languages AS a'); $query->where('a.published >= 0'); $query->order('a.title'); // Get the options. $db->setQuery($query); $options = $db->loadObjectList(); // Check for a database error. if ($db->getErrorNum()) { JError::raiseWarning(500, $db->getErrorMsg()); } // Merge any additional options in the XML definition. $options = array_merge(parent::_getOptions($node), $options); return $options; } } category.php000066600000003366151372620150007110 0ustar00attributes('extension'); $class = $node->attributes('class'); $filter = explode(',', $node->attributes('filter')); if (!isset($extension)) { // Alias for extension $extension = $node->attributes('scope'); if (!isset($extension)) { $extension = 'com_content'; } } if (!$class) { $class = "inputbox"; } if (count($filter) < 1) { $filter = null; } return JHtml::_( 'list.category', $control_name . '[' . $name . ']', $extension, $extension . '.view', $filter, (int) $value, $class, null, 1, $control_name . $name ); } } languages.php000066600000003364151372620150007237 0ustar00attributes('client'); $languages = JLanguageHelper::createLanguageList($value, constant('JPATH_' . strtoupper($client)), true); array_unshift($languages, JHtml::_('select.option', '', JText::_('JOPTION_SELECT_LANGUAGE'))); return JHtml::_( 'select.genericlist', $languages, $control_name . '[' . $name . ']', array('id' => $control_name . $name, 'list.attr' => 'class="inputbox"', 'list.select' => $value) ); } } list.php000066600000004325151372620150006242 0ustar00children() as $option) { $val = $option->attributes('value'); $text = $option->data(); $options[] = JHtml::_('select.option', $val, JText::_($text)); } return $options; } /** * Fetch the HTML code for the parameter element. * * @param string $name The field name. * @param mixed $value The value of the field. * @param JSimpleXMLElement &$node The current JSimpleXMLElement node. * @param string $control_name The name of the HTML control. * * @return string * * @deprecated 12.1 * @since 11.1 */ public function fetchElement($name, $value, &$node, $control_name) { $ctrl = $control_name . '[' . $name . ']'; $attribs = ' '; if ($v = $node->attributes('size')) { $attribs .= 'size="' . $v . '"'; } if ($v = $node->attributes('class')) { $attribs .= 'class="' . $v . '"'; } else { $attribs .= 'class="inputbox"'; } if ($m = $node->attributes('multiple')) { $attribs .= 'multiple="multiple"'; $ctrl .= '[]'; } return JHtml::_( 'select.genericlist', $this->_getOptions($node), $ctrl, array('id' => $control_name . $name, 'list.attr' => $attribs, 'list.select' => $value) ); } } helpsites.php000066600000003363151372620150007270 0ustar00getShortVersion()); $helpsites = JHelp::createSiteList(JPATH_ADMINISTRATOR . '/help/helpsites.xml', $value); array_unshift($helpsites, JHtml::_('select.option', '', JText::_('local'))); return JHtml::_( 'select.genericlist', $helpsites, $control_name . '[' . $name . ']', array('id' => $control_name . $name, 'list.attr' => 'class="inputbox"', 'list.select' => $value) ); } } index.html000066600000000037151372620150006547 0ustar00 imagelist.php000066600000002577151372620150007254 0ustar00addAttribute('filter', $filter); $parameter = $this->_parent->loadElement('filelist'); return $parameter->fetchElement($name, $value, $node, $control_name); } } modulelayouts.php000066600000005275151372620150010202 0ustar00attributes('client_id')) ? $v : 0; $options = array(); $path1 = null; $path2 = null; // Load template entries for each menuid $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select('template'); $query->from('#__template_styles'); $query->where('client_id = ' . (int) $clientId); $query->where('home = 1'); $db->setQuery($query); $template = $db->loadResult(); if ($module = $node->attributes('module')) { $base = ($clientId == 1) ? JPATH_ADMINISTRATOR : JPATH_SITE; $module = preg_replace('#\W#', '', $module); $path1 = $base . '/modules/' . $module . '/tmpl'; $path2 = $base . '/templates/' . $template . '/html/' . $module; $options[] = JHTML::_('select.option', '', ''); } if ($path1 && $path2) { jimport('joomla.filesystem.file'); $path1 = JPath::clean($path1); $path2 = JPath::clean($path2); $files = JFolder::files($path1, '^[^_]*\.php$'); foreach ($files as $file) { $options[] = JHTML::_('select.option', JFile::stripExt($file)); } if (is_dir($path2) && $files = JFolder::files($path2, '^[^_]*\.php$')) { $options[] = JHTML::_('select.optgroup', JText::_('JOPTION_FROM_DEFAULT')); foreach ($files as $file) { $options[] = JHTML::_('select.option', JFile::stripExt($file)); } $options[] = JHTML::_('select.optgroup', JText::_('JOPTION_FROM_DEFAULT')); } } // Merge any additional options in the XML definition. $options = array_merge(parent::_getOptions($node), $options); return $options; } } folderlist.php000066600000004177151372620150007443 0ustar00attributes('directory'); $filter = $node->attributes('filter'); $exclude = $node->attributes('exclude'); $folders = JFolder::folders($path, $filter); $options = array(); foreach ($folders as $folder) { if ($exclude) { if (preg_match(chr(1) . $exclude . chr(1), $folder)) { continue; } } $options[] = JHtml::_('select.option', $folder, $folder); } if (!$node->attributes('hide_none')) { array_unshift($options, JHtml::_('select.option', '-1', JText::_('JOPTION_DO_NOT_USE'))); } if (!$node->attributes('hide_default')) { array_unshift($options, JHtml::_('select.option', '', JText::_('JOPTION_USE_DEFAULT'))); } return JHtml::_( 'select.genericlist', $options, $control_name . '[' . $name . ']', array('id' => 'param' . $name, 'list.attr' => 'class="inputbox"', 'list.select' => $value) ); } } radio.php000066600000003022151372620150006356 0ustar00children() as $option) { $val = $option->attributes('value'); $text = $option->data(); $options[] = JHtml::_('select.option', $val, $text); } return JHtml::_('select.radiolist', $options, '' . $control_name . '[' . $name . ']', '', 'value', 'text', $value, $control_name . $name, true); } } password.php000066600000003045151372620150007127 0ustar00attributes('size') ? 'size="' . $node->attributes('size') . '"' : ''); $class = ($node->attributes('class') ? 'class="' . $node->attributes('class') . '"' : 'class="text_area"'); return ''; } } filelist.php000066600000004414151372620150007101 0ustar00attributes('directory'); $filter = $node->attributes('filter'); $exclude = $node->attributes('exclude'); $stripExt = $node->attributes('stripext'); $files = JFolder::files($path, $filter); $options = array(); if (!$node->attributes('hide_none')) { $options[] = JHtml::_('select.option', '-1', JText::_('JOPTION_DO_NOT_USE')); } if (!$node->attributes('hide_default')) { $options[] = JHtml::_('select.option', '', JText::_('JOPTION_USE_DEFAULT')); } if (is_array($files)) { foreach ($files as $file) { if ($exclude) { if (preg_match(chr(1) . $exclude . chr(1), $file)) { continue; } } if ($stripExt) { $file = JFile::stripExt($file); } $options[] = JHtml::_('select.option', $file, $file); } } return JHtml::_( 'select.genericlist', $options, $control_name . '[' . $name . ']', array('id' => 'param' . $name, 'list.attr' => 'class="inputbox"', 'list.select' => $value) ); } } calendar.php000066600000003141151372620150007033 0ustar00attributes('format') ? $node->attributes('format') : '%Y-%m-%d'); $class = $node->attributes('class') ? $node->attributes('class') : 'inputbox'; $id = $control_name . $name; $name = $control_name . '[' . $name . ']'; return JHtml::_('calendar', $value, $name, $id, $format, array('class' => $class)); } } sql.php000066600000003465151372620150006072 0ustar00setQuery($node->attributes('query')); $key = ($node->attributes('key_field') ? $node->attributes('key_field') : 'value'); $val = ($node->attributes('value_field') ? $node->attributes('value_field') : $name); $options = $db->loadObjectlist(); // Check for an error. if ($db->getErrorNum()) { JError::raiseWarning(500, $db->getErrorMsg()); return false; } if (!$options) { $options = array(); } return JHtml::_( 'select.genericlist', $options, $control_name . '[' . $name . ']', array( 'id' => $control_name . $name, 'list.attr' => 'class="inputbox"', 'list.select' => $value, 'option.key' => $key, 'option.text' => $val ) ); } } hidden.php000066600000004056151372620150006523 0ustar00attributes('class') ? 'class="' . $node->attributes('class') . '"' : 'class="text_area"'); return ''; } /** * Fetch tooltip for a hidden element * * @param string $label Element label * @param string $description Element description (which renders as a tool tip) * @param JXMLElement &$xmlElement Element object * @param string $control_name Control name * @param string $name Element name * * @return string * * @deprecated 12.1 * @since 11.1 */ public function fetchTooltip($label, $description, &$xmlElement, $control_name = '', $name = '') { // Deprecation warning. JLog::add('JElementHidden::fetchTooltip() is deprecated.', JLog::WARNING, 'deprecated'); return false; } } .htaccess000066600000000177151372620150006355 0ustar00 Order allow,deny Deny from all text.php000066600000003222151372620150006246 0ustar00attributes('size') ? 'size="' . $node->attributes('size') . '"' : ''); $class = ($node->attributes('class') ? 'class="' . $node->attributes('class') . '"' : 'class="text_area"'); // Required to avoid a cycle of encoding & $value = htmlspecialchars(htmlspecialchars_decode($value, ENT_QUOTES), ENT_QUOTES, 'UTF-8'); return ''; } } menuitem.php000066600000010040151372620150007101 0ustar00_parent->get('menu_type'); if (!empty($menuType)) { $where = ' WHERE menutype = ' . $db->Quote($menuType); } else { $where = ' WHERE 1'; } // Load the list of menu types // TODO: move query to model $query = 'SELECT menutype, title' . ' FROM #__menu_types' . ' ORDER BY title'; $db->setQuery($query); $menuTypes = $db->loadObjectList(); if ($state = $node->attributes('state')) { $where .= ' AND published = ' . (int) $state; } // load the list of menu items // TODO: move query to model $query = 'SELECT id, parent_id, title, menutype, type' . ' FROM #__menu' . $where . ' ORDER BY menutype, parent_id, ordering'; $db->setQuery($query); $menuItems = $db->loadObjectList(); // Establish the hierarchy of the menu // TODO: use node model $children = array(); if ($menuItems) { // First pass - collect children foreach ($menuItems as $v) { $pt = $v->parent_id; $list = @$children[$pt] ? $children[$pt] : array(); array_push($list, $v); $children[$pt] = $list; } } // Second pass - get an indent list of the items $list = JHtml::_('menu.treerecurse', 0, '', array(), $children, 9999, 0, 0); // Assemble into menutype groups $n = count($list); $groupedList = array(); foreach ($list as $k => $v) { $groupedList[$v->menutype][] = &$list[$k]; } // Assemble menu items to the array $options = array(); $options[] = JHtml::_('select.option', '', JText::_('JOPTION_SELECT_MENU_ITEM')); foreach ($menuTypes as $type) { if ($menuType == '') { $options[] = JHtml::_('select.option', '0', ' ', 'value', 'text', true); $options[] = JHtml::_('select.option', $type->menutype, $type->title . ' - ' . JText::_('JGLOBAL_TOP'), 'value', 'text', true); } if (isset($groupedList[$type->menutype])) { $n = count($groupedList[$type->menutype]); for ($i = 0; $i < $n; $i++) { $item = &$groupedList[$type->menutype][$i]; // If menutype is changed but item is not saved yet, use the new type in the list if (JRequest::getString('option', '', 'get') == 'com_menus') { $currentItemArray = JRequest::getVar('cid', array(0), '', 'array'); $currentItemId = (int) $currentItemArray[0]; $currentItemType = JRequest::getString('type', $item->type, 'get'); if ($currentItemId == $item->id && $currentItemType != $item->type) { $item->type = $currentItemType; } } $disable = strpos($node->attributes('disable'), $item->type) !== false ? true : false; $options[] = JHtml::_('select.option', $item->id, '   ' . $item->treename, 'value', 'text', $disable); } } } return JHtml::_( 'select.genericlist', $options, $control_name . '[' . $name . ']', array('id' => $control_name . $name, 'list.attr' => 'class="inputbox"', 'list.select' => $value) ); } } timezones.php000066600000012062151372620150007301 0ustar00get('offset'); } // LOCALE SETTINGS $timezones = array(JHtml::_('select.option', -12, JText::_('UTC__12_00__INTERNATIONAL_DATE_LINE_WEST')), JHtml::_('select.option', -11, JText::_('UTC__11_00__MIDWAY_ISLAND__SAMOA')), JHtml::_('select.option', -10, JText::_('UTC__10_00__HAWAII')), JHtml::_('select.option', -9.5, JText::_('UTC__09_30__TAIOHAE__MARQUESAS_ISLANDS')), JHtml::_('select.option', -9, JText::_('UTC__09_00__ALASKA')), JHtml::_('select.option', -8, JText::_('UTC__08_00__PACIFIC_TIME__US__AMP__CANADA_')), JHtml::_('select.option', -7, JText::_('UTC__07_00__MOUNTAIN_TIME__US__AMP__CANADA_')), JHtml::_('select.option', -6, JText::_('UTC__06_00__CENTRAL_TIME__US__AMP__CANADA___MEXICO_CITY')), JHtml::_('select.option', -5, JText::_('UTC__05_00__EASTERN_TIME__US__AMP__CANADA___BOGOTA__LIMA')), JHtml::_('select.option', -4, JText::_('UTC__04_00__ATLANTIC_TIME__CANADA___CARACAS__LA_PAZ')), JHtml::_('select.option', -4.5, JText::_('UTC__04_30__VENEZUELA')), JHtml::_('select.option', -3.5, JText::_('UTC__03_30__ST__JOHN_S__NEWFOUNDLAND__LABRADOR')), JHtml::_('select.option', -3, JText::_('UTC__03_00__BRAZIL__BUENOS_AIRES__GEORGETOWN')), JHtml::_('select.option', -2, JText::_('UTC__02_00__MID_ATLANTIC')), JHtml::_('select.option', -1, JText::_('UTC__01_00__AZORES__CAPE_VERDE_ISLANDS')), JHtml::_('select.option', 0, JText::_('UTC_00_00__WESTERN_EUROPE_TIME__LONDON__LISBON__CASABLANCA')), JHtml::_('select.option', 1, JText::_('UTC__01_00__AMSTERDAM__BERLIN__BRUSSELS__COPENHAGEN__MADRID__PARIS')), JHtml::_('select.option', 2, JText::_('UTC__02_00__ISTANBUL__JERUSALEM__KALININGRAD__SOUTH_AFRICA')), JHtml::_('select.option', 3, JText::_('UTC__03_00__BAGHDAD__RIYADH__MOSCOW__ST__PETERSBURG')), JHtml::_('select.option', 3.5, JText::_('UTC__03_30__TEHRAN')), JHtml::_('select.option', 4, JText::_('UTC__04_00__ABU_DHABI__MUSCAT__BAKU__TBILISI')), JHtml::_('select.option', 4.5, JText::_('UTC__04_30__KABUL')), JHtml::_('select.option', 5, JText::_('UTC__05_00__EKATERINBURG__ISLAMABAD__KARACHI__TASHKENT')), JHtml::_('select.option', 5.5, JText::_('UTC__05_30__BOMBAY__CALCUTTA__MADRAS__NEW_DELHI__COLOMBO')), JHtml::_('select.option', 5.75, JText::_('UTC__05_45__KATHMANDU')), JHtml::_('select.option', 6, JText::_('UTC__06_00__ALMATY__DHAKA')), JHtml::_('select.option', 6.5, JText::_('UTC__06_30__YAGOON')), JHtml::_('select.option', 7, JText::_('UTC__07_00__BANGKOK__HANOI__JAKARTA__PHNOM_PENH')), JHtml::_('select.option', 8, JText::_('UTC__08_00__BEIJING__PERTH__SINGAPORE__HONG_KONG')), JHtml::_('select.option', 8.75, JText::_('UTC__08_00__WESTERN_AUSTRALIA')), JHtml::_('select.option', 9, JText::_('UTC__09_00__TOKYO__SEOUL__OSAKA__SAPPORO__YAKUTSK')), JHtml::_('select.option', 9.5, JText::_('UTC__09_30__ADELAIDE__DARWIN__YAKUTSK')), JHtml::_('select.option', 10, JText::_('UTC__10_00__EASTERN_AUSTRALIA__GUAM__VLADIVOSTOK')), JHtml::_('select.option', 10.5, JText::_('UTC__10_30__LORD_HOWE_ISLAND__AUSTRALIA_')), JHtml::_('select.option', 11, JText::_('UTC__11_00__MAGADAN__SOLOMON_ISLANDS__NEW_CALEDONIA')), JHtml::_('select.option', 11.5, JText::_('UTC__11_30__NORFOLK_ISLAND')), JHtml::_('select.option', 12, JText::_('UTC__12_00__AUCKLAND__WELLINGTON__FIJI__KAMCHATKA')), JHtml::_('select.option', 12.75, JText::_('UTC__12_45__CHATHAM_ISLAND')), JHtml::_('select.option', 13, JText::_('UTC__13_00__TONGA')), JHtml::_('select.option', 14, JText::_('UTC__14_00__KIRIBATI'))); return JHtml::_( 'select.genericlist', $timezones, $control_name . '[' . $name . ']', array('id' => $control_name . $name, 'list.attr' => 'class="inputbox"', 'list.select' => $value) ); } } menu.php000066600000003230151372620150006225 0ustar00 $control_name . $name, 'list.attr' => 'class="inputbox"', 'list.select' => $value) ); } } textarea.php000066600000003167151372620150007107 0ustar00attributes('rows'); $cols = $node->attributes('cols'); $class = ($node->attributes('class') ? 'class="' . $node->attributes('class') . '"' : 'class="text_area"'); // Convert
tags so they are not visible when editing $value = str_replace('
', "\n", $value); return ''; } } templatestyle.php000066600000004517151372620150010166 0ustar00setQuery($query); $data = $db->loadObjectList(); $default = JHtml::_('select.option', 0, JText::_('JOPTION_USE_DEFAULT'), 'id', 'description'); array_unshift($data, $default); $selected = $this->_getSelected(); $html = JHTML::_('select.genericlist', $data, $control_name . '[' . $name . ']', 'class="inputbox" size="6"', 'id', 'description', $selected); return $html; } /** * Get the selected template style. * * @return integer The template style id. * * @since 11.1 * @deprecated 12.1 Use jFormFieldTemplateStyle instead. */ protected function _getSelected() { // Deprecation warning. JLog::add('JElementTemplateStyle::_getSelected() is deprecated.', JLog::WARNING, 'deprecated'); $id = JRequest::getVar('cid', 0); $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select($query->qn('template_style_id'))->from($query->qn('#__menu'))->where($query->qn('id') . ' = ' . (int) $id[0]); $db->setQuery($query); $result = $db->loadResult(); return $result; } } editors.php000066600000003424151372620150006737 0ustar00setQuery($query); $editors = $db->loadObjectList(); array_unshift($editors, JHtml::_('select.option', '', JText::_('JOPTION_SELECT_EDITOR'))); return JHtml::_( 'select.genericlist', $editors, $control_name . '[' . $name . ']', array('id' => $control_name . $name, 'list.attr' => 'class="inputbox"', 'list.select' => $value) ); } }