Файловый менеджер - Редактировать - /home/lmsyaran/public_html/pusher/views.tar
Назад
search/tmpl/default.php 0000644 00000002342 15116776336 0011142 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_finder * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; JHtml::_('behavior.core'); JHtml::_('formbehavior.chosen'); JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); JHtml::_('stylesheet', 'com_finder/finder.css', array('version' => 'auto', 'relative' => true)); ?> <div class="finder<?php echo $this->pageclass_sfx; ?>"> <?php if ($this->params->get('show_page_heading')) : ?> <h1> <?php if ($this->escape($this->params->get('page_heading'))) : ?> <?php echo $this->escape($this->params->get('page_heading')); ?> <?php else : ?> <?php echo $this->escape($this->params->get('page_title')); ?> <?php endif; ?> </h1> <?php endif; ?> <?php if ($this->params->get('show_search_form', 1)) : ?> <div id="search-form"> <?php echo $this->loadTemplate('form'); ?> </div> <?php endif; ?> <?php // Load the search results layout if we are performing a search. ?> <?php if ($this->query->search === true) : ?> <div id="search-results"> <?php echo $this->loadTemplate('results'); ?> </div> <?php endif; ?> </div> search/tmpl/default.xml 0000644 00000013442 15116776336 0011156 0 ustar 00 <?xml version="1.0" encoding="utf-8"?> <metadata> <layout title="COM_FINDER_MENU_SEARCH_VIEW_DEFAULT_TITLE"> <help key = "JHELP_MENUS_MENU_ITEM_FINDER_SEARCH" /> <message> <![CDATA[COM_FINDER_MENU_SEARCH_VIEW_DEFAULT_TEXT]]> </message> </layout> <fields name="request" addfieldpath="/administrator/components/com_finder/models/fields"> <fieldset name="request"> <field name="q" type="text" label="COM_FINDER_SEARCH_SEARCH_QUERY_LABEL" description="COM_FINDER_SEARCH_SEARCH_QUERY_DESC" size="30" /> <field name="f" type="searchfilter" label="COM_FINDER_SEARCH_FILTER_SEARCH_LABEL" description="COM_FINDER_SEARCH_FILTER_SEARCH_DESC" default="" /> </fieldset> </fields> <fields name="params" addfieldpath="/administrator/components/com_finder/models/fields"> <fieldset name="basic"> <field name="show_date_filters" type="list" label="COM_FINDER_CONFIG_SHOW_DATE_FILTERS_LABEL" description="COM_FINDER_CONFIG_SHOW_DATE_FILTERS_DESC" default="" useglobal="true" class="chzn-color" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="show_advanced" type="list" label="COM_FINDER_CONFIG_SHOW_ADVANCED_LABEL" description="COM_FINDER_CONFIG_SHOW_ADVANCED_DESC" default="" useglobal="true" class="chzn-color" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="expand_advanced" type="list" label="COM_FINDER_CONFIG_EXPAND_ADVANCED_LABEL" description="COM_FINDER_CONFIG_EXPAND_ADVANCED_DESC" default="" useglobal="true" class="chzn-color" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field type="spacer" /> <field name="show_description" type="list" label="COM_FINDER_CONFIG_SHOW_DESCRIPTION_LABEL" description="COM_FINDER_CONFIG_SHOW_DESCRIPTION_DESC" default="" useglobal="true" class="chzn-color" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field name="description_length" type="number" label="COM_FINDER_CONFIG_DESCRIPTION_LENGTH_LABEL" description="COM_FINDER_CONFIG_DESCRIPTION_LENGTH_DESC" default="" size="5" useglobal="true" /> <field name="show_url" type="list" label="COM_FINDER_CONFIG_SHOW_URL_LABEL" description="COM_FINDER_CONFIG_SHOW_URL_DESC" default="" useglobal="true" class="chzn-color" > <option value="1">JSHOW</option> <option value="0">JHIDE</option> </field> <field type="spacer" /> </fieldset> <fieldset name="advanced"> <field name="show_pagination_limit" type="list" label="JGLOBAL_DISPLAY_SELECT_LABEL" description="JGLOBAL_DISPLAY_SELECT_DESC" validate="options" class="chzn-color" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="show_pagination" type="list" label="JGLOBAL_PAGINATION_LABEL" description="JGLOBAL_PAGINATION_DESC" validate="options" class="chzn-color" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> <option value="2">JGLOBAL_AUTO</option> </field> <field name="show_pagination_results" type="list" label="JGLOBAL_PAGINATION_RESULTS_LABEL" description="JGLOBAL_PAGINATION_RESULTS_DESC" validate="options" class="chzn-color" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> <field name="allow_empty_query" type="list" label="COM_FINDER_ALLOW_EMPTY_QUERY_LABEL" description="COM_FINDER_ALLOW_EMPTY_QUERY_DESC" default="" useglobal="true" class="chzn-color" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="show_suggested_query" type="list" label="COM_FINDER_CONFIG_SHOW_SUGGESTED_QUERY_LABEL" description="COM_FINDER_CONFIG_SHOW_SUGGESTED_QUERY_DESC" default="" useglobal="true" class="chzn-color" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="show_explained_query" type="list" label="COM_FINDER_CONFIG_SHOW_EXPLAINED_QUERY_LABEL" description="COM_FINDER_CONFIG_SHOW_EXPLAINED_QUERY_DESC" default="" useglobal="true" class="chzn-color" > <option value="1">JYES</option> <option value="0">JNO</option> </field> <field name="sort_order" type="list" label="COM_FINDER_CONFIG_SORT_ORDER_LABEL" description="COM_FINDER_CONFIG_SORT_ORDER_DESC" default="" useglobal="true" > <option value="relevance">COM_FINDER_CONFIG_SORT_OPTION_RELEVANCE</option> <option value="date">COM_FINDER_CONFIG_SORT_OPTION_START_DATE</option> <option value="price">COM_FINDER_CONFIG_SORT_OPTION_LIST_PRICE</option> </field> <field name="sort_direction" type="list" label="COM_FINDER_CONFIG_SORT_DIRECTION_LABEL" description="COM_FINDER_CONFIG_SORT_DIRECTION_DESC" default="" useglobal="true" > <option value="desc">COM_FINDER_CONFIG_SORT_OPTION_DESCENDING</option> <option value="asc">COM_FINDER_CONFIG_SORT_OPTION_ASCENDING</option> </field> </fieldset> <fieldset name="integration"> <field name="show_feed_link" type="list" label="JGLOBAL_SHOW_FEED_LINK_LABEL" description="JGLOBAL_SHOW_FEED_LINK_DESC" validate="options" class="chzn-color" > <option value="">JGLOBAL_USE_GLOBAL</option> <option value="0">JHIDE</option> <option value="1">JSHOW</option> </field> </fieldset> </fields> </metadata> search/tmpl/default_form.php 0000644 00000006730 15116776336 0012172 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_finder * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; if ($this->params->get('show_advanced', 1) || $this->params->get('show_autosuggest', 1)) { JHtml::_('jquery.framework'); $script = " jQuery(function() {"; if ($this->params->get('show_advanced', 1)) { /* * This segment of code disables select boxes that have no value when the * form is submitted so that the URL doesn't get blown up with null values. */ $script .= " jQuery('#finder-search').on('submit', function(e){ e.stopPropagation(); // Disable select boxes with no value selected. jQuery('#advancedSearch').find('select').each(function(index, el) { var el = jQuery(el); if(!el.val()){ el.attr('disabled', 'disabled'); } }); });"; } /* * This segment of code sets up the autocompleter. */ if ($this->params->get('show_autosuggest', 1)) { JHtml::_('script', 'jui/jquery.autocomplete.min.js', array('version' => 'auto', 'relative' => true)); $script .= " var suggest = jQuery('#q').autocomplete({ serviceUrl: '" . JRoute::_('index.php?option=com_finder&task=suggestions.suggest&format=json&tmpl=component') . "', paramName: 'q', minChars: 1, maxHeight: 400, width: 300, zIndex: 9999, deferRequestBy: 500 });"; } $script .= " });"; JFactory::getDocument()->addScriptDeclaration($script); } ?> <form id="finder-search" action="<?php echo JRoute::_($this->query->toUri()); ?>" method="get" class="form-inline"> <?php echo $this->getFields(); ?> <?php // DISABLED UNTIL WEIRD VALUES CAN BE TRACKED DOWN. ?> <?php if (false && $this->state->get('list.ordering') !== 'relevance_dsc') : ?> <input type="hidden" name="o" value="<?php echo $this->escape($this->state->get('list.ordering')); ?>" /> <?php endif; ?> <fieldset class="word"> <label for="q"> <?php echo JText::_('COM_FINDER_SEARCH_TERMS'); ?> </label> <input type="text" name="q" id="q" size="30" value="<?php echo $this->escape($this->query->input); ?>" class="inputbox" /> <?php if ($this->escape($this->query->input) != '' || $this->params->get('allow_empty_query')) : ?> <button name="Search" type="submit" class="btn btn-primary"> <span class="icon-search icon-white"></span> <?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?> </button> <?php else : ?> <button name="Search" type="submit" class="btn btn-primary disabled"> <span class="icon-search icon-white"></span> <?php echo JText::_('JSEARCH_FILTER_SUBMIT'); ?> </button> <?php endif; ?> <?php if ($this->params->get('show_advanced', 1)) : ?> <a href="#advancedSearch" data-toggle="collapse" class="btn"> <span class="icon-list" aria-hidden="true"></span> <?php echo JText::_('COM_FINDER_ADVANCED_SEARCH_TOGGLE'); ?> </a> <?php endif; ?> </fieldset> <?php if ($this->params->get('show_advanced', 1)) : ?> <div id="advancedSearch" class="collapse<?php if ($this->params->get('expand_advanced', 0)) echo ' in'; ?>"> <hr /> <?php if ($this->params->get('show_advanced_tips', 1)) : ?> <div id="search-query-explained"> <div class="advanced-search-tip"> <?php echo JText::_('COM_FINDER_ADVANCED_TIPS'); ?> </div> <hr /> </div> <?php endif; ?> <div id="finder-filter-window"> <?php echo JHtml::_('filter.select', $this->query, $this->params); ?> </div> </div> <?php endif; ?> </form> search/tmpl/default_result.php 0000644 00000004767 15116776336 0012555 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_finder * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\String\StringHelper; // Get the mime type class. $mime = !empty($this->result->mime) ? 'mime-' . $this->result->mime : null; $show_description = $this->params->get('show_description', 1); if ($show_description) { // Calculate number of characters to display around the result $term_length = StringHelper::strlen($this->query->input); $desc_length = $this->params->get('description_length', 255); $pad_length = $term_length < $desc_length ? (int) floor(($desc_length - $term_length) / 2) : 0; // Make sure we highlight term both in introtext and fulltext if (!empty($this->result->summary) && !empty($this->result->body)) { $full_description = FinderIndexerHelper::parse($this->result->summary . $this->result->body); } else { $full_description = $this->result->description; } // Find the position of the search term $pos = $term_length ? StringHelper::strpos(StringHelper::strtolower($full_description), StringHelper::strtolower($this->query->input)) : false; // Find a potential start point $start = ($pos && $pos > $pad_length) ? $pos - $pad_length : 0; // Find a space between $start and $pos, start right after it. $space = StringHelper::strpos($full_description, ' ', $start > 0 ? $start - 1 : 0); $start = ($space && $space < $pos) ? $space + 1 : $start; $description = JHtml::_('string.truncate', StringHelper::substr($full_description, $start), $desc_length, true); } $route = $this->result->route; // Get the route with highlighting information. if (!empty($this->query->highlight) && empty($this->result->mime) && $this->params->get('highlight_terms', 1) && JPluginHelper::isEnabled('system', 'highlight')) { $route .= '&highlight=' . base64_encode(json_encode($this->query->highlight)); } ?> <li> <h4 class="result-title <?php echo $mime; ?>"> <a href="<?php echo JRoute::_($route); ?>"> <?php echo $this->result->title; ?> </a> </h4> <?php if ($show_description && $description !== '') : ?> <p class="result-text<?php echo $this->pageclass_sfx; ?>"> <?php echo $description; ?> </p> <?php endif; ?> <?php if ($this->params->get('show_url', 1)) : ?> <div class="small result-url<?php echo $this->pageclass_sfx; ?>"> <?php echo $this->baseUrl, JRoute::_($this->result->route); ?> </div> <?php endif; ?> </li> search/tmpl/default_results.php 0000644 00000006263 15116776336 0012731 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_finder * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; ?> <?php // Display the suggested search if it is different from the current search. ?> <?php if (($this->suggested && $this->params->get('show_suggested_query', 1)) || ($this->explained && $this->params->get('show_explained_query', 1))) : ?> <div id="search-query-explained"> <?php // Display the suggested search query. ?> <?php if ($this->suggested && $this->params->get('show_suggested_query', 1)) : ?> <?php // Replace the base query string with the suggested query string. ?> <?php $uri = JUri::getInstance($this->query->toUri()); ?> <?php $uri->setVar('q', $this->suggested); ?> <?php // Compile the suggested query link. ?> <?php $linkUrl = JRoute::_($uri->toString(array('path', 'query'))); ?> <?php $link = '<a href="' . $linkUrl . '">' . $this->escape($this->suggested) . '</a>'; ?> <?php echo JText::sprintf('COM_FINDER_SEARCH_SIMILAR', $link); ?> <?php elseif ($this->explained && $this->params->get('show_explained_query', 1)) : ?> <?php // Display the explained search query. ?> <?php echo $this->explained; ?> <?php endif; ?> </div> <?php endif; ?> <?php // Display the 'no results' message and exit the template. ?> <?php if (($this->total === 0) || ($this->total === null)) : ?> <div id="search-result-empty"> <h2><?php echo JText::_('COM_FINDER_SEARCH_NO_RESULTS_HEADING'); ?></h2> <?php $multilang = JFactory::getApplication()->getLanguageFilter() ? '_MULTILANG' : ''; ?> <p><?php echo JText::sprintf('COM_FINDER_SEARCH_NO_RESULTS_BODY' . $multilang, $this->escape($this->query->input)); ?></p> </div> <?php // Exit this template. ?> <?php return; ?> <?php endif; ?> <?php // Activate the highlighter if enabled. ?> <?php if (!empty($this->query->highlight) && $this->params->get('highlight_terms', 1)) : ?> <?php JHtml::_('behavior.highlighter', $this->query->highlight); ?> <?php endif; ?> <?php // Display a list of results ?> <br id="highlighter-start" /> <ul class="search-results<?php echo $this->pageclass_sfx; ?> list-striped"> <?php $this->baseUrl = JUri::getInstance()->toString(array('scheme', 'host', 'port')); ?> <?php foreach ($this->results as $result) : ?> <?php $this->result = &$result; ?> <?php $layout = $this->getLayoutFile($this->result->layout); ?> <?php echo $this->loadTemplate($layout); ?> <?php endforeach; ?> </ul> <br id="highlighter-end" /> <?php // Display the pagination ?> <div class="search-pagination"> <div class="pagination"> <?php echo $this->pagination->getPagesLinks(); ?> </div> <div class="search-pages-counter"> <?php // Prepare the pagination string. Results X - Y of Z ?> <?php $start = (int) $this->pagination->get('limitstart') + 1; ?> <?php $total = (int) $this->pagination->get('total'); ?> <?php $limit = (int) $this->pagination->get('limit') * $this->pagination->get('pages.current'); ?> <?php $limit = (int) ($limit > $total ? $total : $limit); ?> <?php echo JText::sprintf('COM_FINDER_SEARCH_RESULTS_OF', $start, $limit, $total); ?> </div> </div> search/view.feed.php 0000644 00000005167 15116776336 0010426 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_finder * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * Search feed view class for the Finder package. * * @since 2.5 */ class FinderViewSearch extends JViewLegacy { /** * Method to display the view. * * @param string $tpl A template file to load. [optional] * * @return mixed JError object on failure, void on success. * * @since 2.5 */ public function display($tpl = null) { // Get the application $app = JFactory::getApplication(); // Adjust the list limit to the feed limit. $app->input->set('limit', $app->get('feed_limit')); // Get view data. $state = $this->get('State'); $params = $state->get('params'); $query = $this->get('Query'); $results = $this->get('Results'); // Push out the query data. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); $explained = JHtml::_('query.explained', $query); // Set the document title. $title = $params->get('page_title', ''); if (empty($title)) { $title = $app->get('sitename'); } elseif ($app->get('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title); } elseif ($app->get('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename')); } $this->document->setTitle($title); // Configure the document description. if (!empty($explained)) { $this->document->setDescription(html_entity_decode(strip_tags($explained), ENT_QUOTES, 'UTF-8')); } // Set the document link. $this->document->link = JRoute::_($query->toUri()); // If we don't have any results, we are done. if (empty($results)) { return; } // Convert the results to feed entries. foreach ($results as $result) { // Convert the result to a feed entry. $item = new JFeedItem; $item->title = $result->title; $item->link = JRoute::_($result->route); $item->description = $result->description; // Use Unix date to cope for non-english languages $item->date = (int) $result->start_date ? JHtml::_('date', $result->start_date, 'U') : $result->indexdate; // Get the taxonomy data. $taxonomy = $result->getTaxonomy(); // Add the category to the feed if available. if (isset($taxonomy['Category'])) { $node = array_pop($taxonomy['Category']); $item->category = $node->title; } // Loads item info into RSS array $this->document->addItem($item); } } } search/view.html.php 0000644 00000017066 15116776336 0010470 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_finder * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; use Joomla\CMS\Helper\SearchHelper; /** * Search HTML view class for the Finder package. * * @since 2.5 */ class FinderViewSearch extends JViewLegacy { /** * The query object * * @var FinderIndexerQuery */ protected $query; /** * The application parameters * * @var Registry The parameters object */ protected $params; /** * The model state * * @var object */ protected $state; protected $user; /** * An array of results * * @var array * * @since 3.8.0 */ protected $results; /** * The total number of items * * @var integer * * @since 3.8.0 */ protected $total; /** * The pagination object * * @var JPagination * * @since 3.8.0 */ protected $pagination; /** * Method to display the view. * * @param string $tpl A template file to load. [optional] * * @return mixed JError object on failure, void on success. * * @since 2.5 */ public function display($tpl = null) { $app = JFactory::getApplication(); $params = $app->getParams(); // Get view data. $state = $this->get('State'); $query = $this->get('Query'); JDEBUG ? JProfiler::getInstance('Application')->mark('afterFinderQuery') : null; $results = $this->get('Results'); JDEBUG ? JProfiler::getInstance('Application')->mark('afterFinderResults') : null; $total = $this->get('Total'); JDEBUG ? JProfiler::getInstance('Application')->mark('afterFinderTotal') : null; $pagination = $this->get('Pagination'); JDEBUG ? JProfiler::getInstance('Application')->mark('afterFinderPagination') : null; // Flag indicates to not add limitstart=0 to URL $pagination->hideEmptyLimitstart = true; // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } // Configure the pathway. if (!empty($query->input)) { $app->getPathway()->addItem($this->escape($query->input)); } // Push out the view data. $this->state = &$state; $this->params = &$params; $this->query = &$query; $this->results = &$results; $this->total = &$total; $this->pagination = &$pagination; // Check for a double quote in the query string. if (strpos($this->query->input, '"')) { // Get the application router. $router = &$app::getRouter(); // Fix the q variable in the URL. if ($router->getVar('q') !== $this->query->input) { $router->setVar('q', $this->query->input); } } // Log the search SearchHelper::logSearch($this->query->input, 'com_finder'); // Push out the query data. JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); $this->suggested = JHtml::_('query.suggested', $query); $this->explained = JHtml::_('query.explained', $query); // Escape strings for HTML output $this->pageclass_sfx = htmlspecialchars($params->get('pageclass_sfx', '')); // Check for layout override only if this is not the active menu item // If it is the active menu item, then the view and category id will match $active = $app->getMenu()->getActive(); if (isset($active->query['layout'])) { // We need to set the layout in case this is an alternative menu item (with an alternative layout) $this->setLayout($active->query['layout']); } $this->prepareDocument($query); JDEBUG ? JProfiler::getInstance('Application')->mark('beforeFinderLayout') : null; parent::display($tpl); JDEBUG ? JProfiler::getInstance('Application')->mark('afterFinderLayout') : null; } /** * Method to get hidden input fields for a get form so that control variables * are not lost upon form submission * * @return string A string of hidden input form fields * * @since 2.5 */ protected function getFields() { $fields = null; // Get the URI. $uri = JUri::getInstance(JRoute::_($this->query->toUri())); $uri->delVar('q'); $uri->delVar('o'); $uri->delVar('t'); $uri->delVar('d1'); $uri->delVar('d2'); $uri->delVar('w1'); $uri->delVar('w2'); $elements = $uri->getQuery(true); // Create hidden input elements for each part of the URI. foreach ($elements as $n => $v) { if (is_scalar($v)) { $fields .= '<input type="hidden" name="' . $n . '" value="' . $v . '" />'; } } return $fields; } /** * Method to get the layout file for a search result object. * * @param string $layout The layout file to check. [optional] * * @return string The layout file to use. * * @since 2.5 */ protected function getLayoutFile($layout = null) { // Create and sanitize the file name. $file = $this->_layout . '_' . preg_replace('/[^A-Z0-9_\.-]/i', '', $layout); // Check if the file exists. jimport('joomla.filesystem.path'); $filetofind = $this->_createFileName('template', array('name' => $file)); $exists = JPath::find($this->_path['template'], $filetofind); return ($exists ? $layout : 'result'); } /** * Prepares the document * * @param FinderIndexerQuery $query The search query * * @return void * * @since 2.5 */ protected function prepareDocument($query) { $app = JFactory::getApplication(); $menus = $app->getMenu(); $title = null; // Because the application sets a default page title, // we need to get it from the menu item itself $menu = $menus->getActive(); if ($menu) { $this->params->def('page_heading', $this->params->get('page_title', $menu->title)); } else { $this->params->def('page_heading', JText::_('COM_FINDER_DEFAULT_PAGE_TITLE')); } $title = $this->params->get('page_title', ''); if (empty($title)) { $title = $app->get('sitename'); } elseif ($app->get('sitename_pagetitles', 0) == 1) { $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title); } elseif ($app->get('sitename_pagetitles', 0) == 2) { $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename')); } $this->document->setTitle($title); if ($layout = $this->params->get('article_layout')) { $this->setLayout($layout); } // Configure the document meta-description. if (!empty($this->explained)) { $explained = $this->escape(html_entity_decode(strip_tags($this->explained), ENT_QUOTES, 'UTF-8')); $this->document->setDescription($explained); } elseif ($this->params->get('menu-meta_description')) { $this->document->setDescription($this->params->get('menu-meta_description')); } // Configure the document meta-keywords. if (!empty($query->highlight)) { $this->document->setMetaData('keywords', implode(', ', $query->highlight)); } elseif ($this->params->get('menu-meta_keywords')) { $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords')); } if ($this->params->get('robots')) { $this->document->setMetadata('robots', $this->params->get('robots')); } // Add feed link to the document head. if ($this->params->get('show_feed_link', 1) == 1) { // Add the RSS link. $props = array('type' => 'application/rss+xml', 'title' => 'RSS 2.0'); $route = JRoute::_($this->query->toUri() . '&format=feed&type=rss'); $this->document->addHeadLink($route, 'alternate', 'rel', $props); // Add the ATOM link. $props = array('type' => 'application/atom+xml', 'title' => 'Atom 1.0'); $route = JRoute::_($this->query->toUri() . '&format=feed&type=atom'); $this->document->addHeadLink($route, 'alternate', 'rel', $props); } } } search/view.opensearch.php 0000644 00000002515 15116776336 0011644 0 ustar 00 <?php /** * @package Joomla.Site * @subpackage com_finder * * @copyright (C) 2011 Open Source Matters, Inc. <https://www.joomla.org> * @license GNU General Public License version 2 or later; see LICENSE.txt */ defined('_JEXEC') or die; /** * OpenSearch View class for Finder * * @since 2.5 */ class FinderViewSearch extends JViewLegacy { /** * Method to display the view. * * @param string $tpl A template file to load. [optional] * * @return mixed JError object on failure, void on success. * * @since 2.5 */ public function display($tpl = null) { $doc = JFactory::getDocument(); $app = JFactory::getApplication(); $params = JComponentHelper::getParams('com_finder'); $doc->setShortName($params->get('opensearch_name', $app->get('sitename'))); $doc->setDescription($params->get('opensearch_description', $app->get('MetaDesc'))); // Add the URL for the search $searchUri = JUri::base() . 'index.php?option=com_finder&q={searchTerms}'; // Find the menu item for the search $menu = $app->getMenu(); $items = $menu->getItems('link', 'index.php?option=com_finder&view=search'); if (isset($items[0])) { $searchUri .= '&Itemid=' . $items[0]->id; } $htmlSearch = new JOpenSearchUrl; $htmlSearch->template = JRoute::_($searchUri); $doc->addUrl($htmlSearch); } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0.03 |
proxy
|
phpinfo
|
Настройка